Get the total number of legal values for a tag.
Declaration:
Copy Code | |
---|---|
AT_ERRCOUNT ACCUAPI IG_ISIS_choice_get_count( HISISDRV hDriver, AT_MODE nTag, LPWORD lpwCount ); |
Arguments:
Name | Type | Description |
hDriver | HISISDRV | The handle to the driver. |
nTag | AT_MODE | Specifies the tag for which the count of legal choice values is being requested. |
lpwCount | LPWORD | The address of an unsigned integer in which the number of legal values will be stored. If a choice node is defined for the tag, then this parameter will contain the available number of values in the currently-selected node. If no choice node is defined for the tag, this parameter returns a value of 1. |
Return Value:
Returns the number of ImageGear errors that occurred during this function call. If there are no errors, the return value is IGE_SUCCESS.
Supported Raster Image Formats:
This function does not process image pixels.
Example:
See IG_ISIS_choice_get_ascii example.
Remarks:
The IG_ISIS_choice_get_count function retrieves the total number of legal values from a specified tag.
The IG_ISIS_choice_get_countfunction can be used to determine the valid range of the wIndex parameter to use in other IG_ISIS_choice_get... functions. The range is zero to (*lpwCount - 1).
If the tag is defined, IG_ISIS_choice_get_count always returns IGE_SUCCESS. The value returned in lpwCount is valid, and its value depends on the type of choice node for the specified tag:
- If a choice node is defined for the tag, lpwCount specifies the available number of values in the current node.
- If the choice node is a range node, the value returned in lpwCount specifies the number of values computed by ((MAX - MIN) / STEP).
- If no choice node is defined for the tag, lpwCount contains the value 1.
IG_ISIS_choice_get_count returns the correct value even if the choices for a tag are represented as a range (low, high, step).