> ## Documentation Index
> Fetch the complete documentation index at: https://docs.abbyy.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Region Object (IRegion Interface)

This is a supplementary object. It is designed to store the information about the region of an ABBYY FlexiCapture SDK block.

A *region* is represented as a set of rectangles positioned one under another in such a way that the top line of the lower rectangle is the bottom line of the upper one (so that the rectangles do not overlap). Some examples of correct and incorrect ABBYY FlexiCapture SDK regions are shown on the following figure:

![](https://mintcdn.com/abbyy/DG4YBah30S0eFFo5/images/flexi-capture/sdk/Regions.gif?s=74f94819d4b8b683407f3ea8bc4d5c45)

An empty **Region** object can be created by calling the [**IEngine::CreateRegion**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/engine-createxxx.md) method, and then rectangles can be added to it one-by-one by calling the **AddRect** method. We recommend that you add rectangles in top to bottom order, because the **Region** object is optimized for it, and this is the fastest way to add rectangles to it.

## Properties

| **Name** | **Type** | **Description** |
| - | - | - |
| [**Bottom**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/region-bottom.md) | [**Integer**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/propertiestypes.md), read-only | Returns the coordinate of the bottom border of the specified rectangle. |
| **BoundingRectangle** | [**Rectangle**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/rectangle.md), [read-only](https://docs.abbyy.com/flexi-capture/sdk/guided-tour/properties.md#readonly-properties) | Returns the minimum bounding rectangle of the region. |
| [**Count**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/count.md) | [**Integer**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/propertiestypes.md), read-only | Stores the number of rectangles in the region. |
| **IsEmpty** | [**Boolean**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/propertiestypes.md), read-only | Checks if the region is empty. |
| [**Left**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/region-left.md) | [**Integer**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/propertiestypes.md), read-only | Returns the coordinate of the left border of the specified rectangle. |
| [**Right**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/region-right.md) | [**Integer**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/propertiestypes.md), read-only | Returns the coordinate of the right border of the specified rectangle. |
| [**Top**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/region-top.md) | [**Integer**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/propertiestypes.md), read-only | Returns the coordinate of the top border of the specified rectangle. |

## Methods

| **Name** | **Description** |
| - | - |
| [**AddRect**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/region-addrect.md) | Adds an area to the region. |
| [**CopyFrom**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/copyfrom.md) | Initializes properties of the current object with values of similar properties of another object. |
| [**HasIntersectionWithRect**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/region-hasintersectionwithrect.md) | Checks if the supplied rectangle has intersection with the current region. |
| [**HasIntersectionWithRegion**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/region-hasintersectionwithregion.md) | Checks if the supplied region has intersection with the current region. |
| [**IsEqual**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/region-isequal.md) | Checks if the regions are equal. |
| [**IsPointInRegion**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/region-ispointinregion.md) | Checks if the supplied point is inside the current region. |
| [**IsRectInRegion**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/region-isrectinregion.md) | Checks if the supplied rectangle is inside the current region. |
| [**IsRegionInRegion**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/region-isregioninregion.md) | Checks if the supplied region is inside the current region. |
| [**LoadFromFile**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/loadfromfile.md) | Restores the object contents from a file on disk. |
| [**LoadFromMemory**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/loadfrommemory.md) | Restores the object contents from the global memory. |
| [**MakeEmpty**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/region-makeempty.md) | Removes all rectangles from the region. |
| [**SaveToFile**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/savetofile.md) | Saves the object contents into a file on disk. |
| [**SaveToMemory**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/savetomemory.md) | Saves the object contents into the global memory. |

## Output parameter

This object is the output parameter of the following methods and properties:

* [**CreateRegion**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/engine-createxxx.md) method of the [**Engine**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/engine.md) object
* **Region** property of the [**Block**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/block.md) object
* **Region** property of the [**BlockDefinition**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/blockdefinition.md) object
* **Region** property of the [**RecognizedCharacterInfo**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/recognizedcharacterinfo.md) object
* **MarkingRegion** property of the [**TextRecognitionParams**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/textrecognitionparams.md) object
* **ClipRegion** property of the [**ImageModification**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/imagemodification.md) object
* **Region** property of the [**TextRegion**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/textregion.md) object

## Input parameter

This object is the input parameter of the following methods:

* [**MatchBlock**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/block-matchblock.md) method and **Region** property of the [**Block**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/block.md) object
* [**AddNew**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/blockdefinitions-addnew.md) method of the [**BlockDefinitions**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/blockdefinitions.md) object
* [**FilterColor**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/imageprocessingtools-filtercolor.md), [**FillRegionWithColor**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/imageprocessingtools-fillregionwithcolor.md), [**InvertRegion**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/imageprocessingtools-invertregion.md) methods of the [**ImageProcessingTools**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/imageprocessingtools.md) object
* [**ClipRegion**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/imagemodification.md#clipregion) property of the [**ImageModification**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/imagemodification.md) object
* [**DetectBlocks**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/pagedefinition-detectblocks.md) method of the [**PageDefinition**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/pagedefinition.md) object

## See also

[Working with Properties](https://docs.abbyy.com/flexi-capture/sdk/guided-tour/properties.md)
