ZONEDATA

typedef struct _tagZoneData
{
   L_UINT uStructSize;
   RECT rcArea;
   L_INT Id;
   FILLMETHOD FillMethod;
   RECOGMODULE RecogModule;
   CHAR_FILTER CharFilter;
   ZONETYPE Type;
   L_UINT uFlags;
   L_CHAR szSection[MAX_SECTION_NAME_LENGTH];
   VERIFICATIONCALLBACK pfnCallback;
   L_VOID L_FAR * pUserData;
} ZONEDATA, L_FAR * pZONEDATA;

The ZONEDATA structure contains all the necessary information for describing a zone. A zone is a rectangular area on an image containing a feature of interest to the user. The image data covered by each zone is handled and processed (typically recognized) separately.

Member

Description

uStructSize

Specifies the structure size. It should be equal to sizeof(ZONEDATA).

rcArea

Coordinates of the zone (RECT)

Id

Identifier of the zone, mainly managed by the engine

FillMethod

Zone filling method. For a list of possible values, refer to FILLMETHOD.

RecogModule

Recognition module associated with the zone. For a list of possible values, refer to RECOGMODULE.

CharFilter

Character Set filter for the zone. For a list of possible values, refer to CHAR_FILTER.

Type

Zone type. For a list of possible values, refer to ZONETYPE.

uFlags

Flags that control the checking process. Possible values are given below. These values can be combined using OR (|)

 

Value

Meaning

 

ZONE_CHK_LANGDICT_PROHIBIT

[0x00000001] Prohibit the use of the Language dictionary.

 

ZONE_CHK_USERDICT_PROHIBIT

[0x00000002] Prohibit the use of the User dictionary.

 

ZONE_CHK_CHECKCBF_PROHIBIT

[0x00000004] Prohibit the use of the user-written checking callback function.

 

ZONE_CHK_VERTDICT_PROHIBIT

[0x00000008] Prohibit the use of the Vertical dictionary

 

ZONE_CHK_IGNORE_WHITESPACE

[0x00000010] Ignore white space characters (SPACE and TAB characters) during checking. This field should be used together with the ZONE_CHK_PASS_LINES.

 

ZONE_CHK_IGNORE_CASE

[0x00000020] Case insensitive UD-checking

 

ZONE_CHK_PASS_LINES

[0x00000040] Instructs the RECOGMODULE to pass entire lines to the checker, instead of words. Do not use this attribute in conjunction with spell checking.

 

ZONE_CHK_CORRECTION_DISABLED

[0x00000080] Correction done by the Spell module is disabled even if it is enabled at page-level

 

ZONE_CHK_INCLUDE_PUNCTUATION

[0x00000100] Checking will consider punctuation characters on the boundaries of the strings, as well

 

ZONE_CHK_CORRECT_PROPERNAMES

[0x00000200] Enables the correction of words beginning with an uppercase letter inside a sentence (i.e. typically but not always proper names)

 

ZONE_CHK_LANGDICT_USED

[0x00010000] "After recognition flag": the Language dictionary was enabled during the checking process (spell checking was activated for the zone)

 

ZONE_CHK_USERDICT_USED

[0x00020000] "After recognition flag": the User dictionary was enabled during the checking process (UD-checking was activated for the zone).

 

ZONE_CHK_CHECKCBF_USED

[0x00040000] "After recognition flag": a user-written checking callback function was enabled during the checking process (user-written checking was activated)

szSection

Contains a null terminated string, such as the section name in the User dictionary assigned to the zone or an empty string

pfnCallback

Address of a user-written verification callback function (VERIFICATIONCALLBACK function) or NULL.

pUserData

More user data used in pUserData parameter of the VERIFICATIONCALLBACK function

Comments

Zones in an image are built into a sequential list, called the zone list. Each zone receives an internal index number, reflecting its position in this list. In some cases, this zone order even determines the zone content order in the final output document. The index of the first zone in the zone list is zero (0).

The zone type parameter type is used to classify the zone into one of the three basic zone categories: flow text, table or graphics. To set this, use ZONE_FLOWTEXT, ZONE_TABLE or ZONE_GRAPHIC, respectively.

Flow text:Any of the following text types can appear instead of ZONE_FLOWTEXT: ZONE_COLUMN, ZONE_HEADER, ZONE_FOOTER, ZONE_CAPTION, ZONE_TITLE, ZONE_OTHER. One of these values is typically created by the page-layout decomposition (auto-zoning) process, however they have the same meaning for the recognition algorithms: the zone contains flow text.

Table text:ZONE_TABLE is for table-type zones. With this, the engine will try to reconstruct the original table text layout of the zone in the final output document.

Graphics zones:For these, use the ZONE_GRAPHIC type. When specified, no recognition will run on the zone and all other recognition related settings would be ignored. The related ZONE_SGRAPHIC type can appear as the result of the page-layout decomposition (auto-zoning) process, and also signifies a graphic zone.

pZONEDATA is a pointer to a ZONEDATA structure. Where the function parameter type is pZONEDATA, declare a ZONEDATA variable, update the structure's fields, and pass the variable's address in the parameter. Declaring a pZONEDATA variable is necessary only if the program requires a pointer.