ImageGear Professional DLL v17.1 for Windows Accusoft
IG_REC_zone_node_array_get
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_node_array_get

Glossary Item Box

Retrieves the polygon made up of the vertices of the user zone.

Declaration:

  Copy Code
AT_ERRCOUNT ACCUAPI IG_REC_zone_node_array_get(
   HIG_REC_IMAGE hImage,
   AT_INT nZoneIndex,
   LPAT_POINT * lplpNodes,
   LPAT_INT lpNodeCount
);

Arguments:

hImage Image handle.
nZoneIndex Index of the zone in the zone list, from which the information is requested.
lplpNodes Pointer to an array of AT_POINT structures for storing the requested node information. Can't be NULL. After evaluating the result, the application should call IG_REC_free to free this array.
lpNodeCount Pointer to a number variable for storing the number of nodes in the lplpNodes array. Can't be NULL.

Return Value:

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

Supported Raster Image Formats:

See IG_REC_image_import.

Remarks:

This can be useful for an application with a GUI when drawing irregular zones.

Example:

  Copy Code
AT_ERRCOUNT ErrCount = 0;
HIG_REC_IMAGE higRecImage = 0;
HIGEAR higImage = 0;
AT_INT iZoneCount = 0;
LPAT_POINT lpPts = 0;
AT_INT iPtsNum = 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_node_array_get(higRecImage, 0, &lpPts, &iPtsNum);

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

See Also

HIG_REC_IMAGE

©2012. Accusoft Corporation. All Rights Reserved.