#include "ltocr.h"
L_LTOCR_API L_INT EXT_FUNCTION L_OcrPage_IndexOfZone(page, ocrZone, L_INT* value)
| L_OcrPage page; | handle to the OCR page |
| const L_OcrZone* ocrZone; | pointer to L_OcrZone structure to find inside the page zones list |
| L_INT* value; | address to L_INT variable to be updated with the zone index |
Gets the index of the passed L_OcrZone structure inside the page internal zones list.
| Parameter | Description |
|---|---|
| page | Handle to the OCR page. |
| ocrZone | Pointer to L_OcrZone structure to find inside the page zones list. |
| value | Address to L_INT variable to be updated with the zone index. |
| SUCCESS | The function was successful. |
| < 1 | An error occurred. Refer to Return Codes. |
Gets the index of the passed L_OcrZone structure inside the page internal zones list.
This function checks for the L_OcrZone.Id member to determine if the zone exist inside the page so if you tried to find a zone you manually added you might not be able to find it because when the L_OcrPage_AddZone or L_OcrPage_InsertZone is called they change the zones order of all the zones in the list to keep them ordered from 0 to the number of zones - 1. So if the page have 3 zones and you tried to insert new zones at index 1 (which is the second element inside the zones list since its zero-based) then you have to update your copy of the L_OcrZone you just inserted to set the L_OcrZone.Id to 1 before you try to call L_OcrPage_IndexOfZone method if you wish to find the zone you just inserted.
Required DLLs and Libraries
| LTOCR For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application. |
For an example, refer to L_OcrPage_ExtractZoneMICRData.