ImageGear Professional DLL v17.1 for Windows Accusoft
IG_REC_zone_info_set
Send Feedback  
ImageGear Professional DLL v17.1 for Windows > API Reference Guide > Recognition Component API Reference > Recognition Component Functions Reference > Zone Support Functions > IG_REC_zone_info_set

Glossary Item Box

Updates the zone data of a single zone in the zone list.

Declaration:

  Copy Code
AT_ERRCOUNT ACCUAPI IG_REC_zone_info_set(
   HIG_REC_IMAGE hImage,
   AT_INT nIndex,
   LPAT_REC_ZONE lpZoneInfo
);

Arguments:

hImage Handle of the image.
nIndex Index of the zone to be updated.
lpZoneInfo Pointer to a zone structure with the necessary updating zone data.

Return Value:

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

Supported Raster Image Formats:

See IG_REC_image_import.

Remarks:

  1. The index of the first zone in the zone list is zero (0).
  2. When updating a zone, the application should directly initialize the Rect, FillingMethod, RecognitionModule, Filter, and the Type fields of the zone, since they will not take on their default values.

    The type field of the zone being updated should be one of the following: IG_REC_WT_FLOW, IG_REC_WT_TABLE, IG_REC_WT_GRAPHIC.

  3. The preferred method for updating a zone is the following:
  4. It is the programmer's responsibility to specify a valid recognition module-filling method pair. Any incorrectly set zone will have no recognition result. For more detail see the Recognition module specifications.
  5. Calling this function may disable the Non-gridded table detection algorithm. This occurs when the zone coordinates after the update differ from their previous coordinate values. For more details see the IG_REC_decomp_nongridded_table_detect_set function.

Example:

  Copy Code
AT_ERRCOUNT ErrCount = 0;
HIG_REC_IMAGE higRecImage = 0;
HIGEAR higImage = 0;
AT_INT iZoneCount = 0;
AT_REC_ZONE rzInfo;
AT_INT iZoneIndex = 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);

for(iZoneIndex = 0; iZoneIndex < iZoneCount; iZoneIndex++)
{
    ErrCount += IG_REC_zone_info_get(higRecImage, iZoneIndex, &rzInfo);

    //...

    if(rzInfo.Type == IG_REC_WT_FLOW || rzInfo.Type == IG_REC_WT_TABLE || rzInfo.Type == IG_REC_WT_GRAPHIC)
        ErrCount += IG_REC_zone_info_set(higRecImage, iZoneIndex, &rzInfo);
}

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

See Also

HIG_REC_IMAGE

©2012. Accusoft Corporation. All Rights Reserved.