ImageGear Professional DLL v18.1 for Windows
IG_REC_zone_layout_set
Send Feedback
ImageGear Professional v18.1 > API Reference Guide > Recognition Component API Reference > Recognition Component Functions Reference > Zone Support Functions > IG_REC_zone_layout_set

Glossary Item Box

Updates zone shape information.

Declaration:

  Copy Code
AT_ERRCOUNT ACCUAPI IG_REC_zone_layout_set(
   HIG_REC_IMAGE hImage,
   AT_INT nZoneIndex,
   LPAT_RECT lpRects,
   AT_INT nRectCount
);

Arguments:

Name Type Description
hImage HIG_REC_IMAGE Image handle.
nZoneIndex AT_INT Index of the zone to be updated.
lpRects LPAT_RECT An array of AT_RECT structures with the shape information.
nRectCount AT_INT Number of rectangles in the lpRects array.

Return Value:

Returns the number of ImageGear errors that occurred during this function call.

Supported Raster Image Formats:

See IG_REC_image_import.

Example:

  Copy Code
AT_ERRCOUNT ErrCount = 0;
HIG_REC_IMAGE higRecImage = 0;
HIGEAR higImage = 0;
AT_INT iZoneCount = 0;
LPAT_RECT lpRects = 0;
AT_INT iRectNum = 0;

ErrCount += IG_load_file("Multipage.tif", &higImage); 
ErrCount += IG_REC_image_import(higImage, &higRecImage);
ErrCount += IG_REC_zones_locate(higRecImage, NULL);

ErrCount += IG_REC_zones_count_get(higRecImage, &iZoneCount);
if(iZoneCount)
{
        ErrCount += IG_REC_zone_layout_get(higRecImage, 0, &lpRects, &iRectNum);
        //...
        ErrCount += IG_REC_zone_layout_set(higRecImage, 0, lpRects, iRectNum);
}

ErrCount += IG_REC_image_delete(higRecImage);
ErrCount += IG_image_delete(higImage);
ErrCount += IG_REC_free(lpRects);

Remarks:

The union of rectangles must have a so-called "pizza box" shape: the top of each rectangle in the union must touch the bottom of the upper rectangle (i.e., the bottom of the upper one and the top of the lower one is exactly the same). A rectangle can touch at most one rectangle above and one below. Zones that cannot have a pizza box shape include: Table zones - they must be rectangular; Vertical text zones for Asian or Western languages - they must be rectangular.

See Also

HIG_REC_IMAGE

©2014. Accusoft Corporation. All Rights Reserved.