MIL_ID ResultId, | //in |
MIL_INT Index, | //in |
MIL_INT64 ResultType, | //in |
void *ResultArrayPtr | //out |
This function retrieves the result(s) of the specified type from a String Reader result buffer. Results are only available after calling MstrRead().
When retrieving results, you will need to know the required type and size of the array in which to store the results. Typically, the default data type is MIL_DOUBLE. For certain results (such as, M_TEXT, M_FORMATTED_STRING, and M_STRING), the default type of the required array depends on the selected encoding scheme (MstrControl() with M_ENCODING). You can specify any data type by explicitly adding it to the result. The size of the array depends on the result type.
All positional results are relative to the center of the top-left pixel in the target.
Unless otherwise specified, the value settings are applicable to both font based and fontless contexts.
Specifies the identifier of the String Reader result buffer from which to retrieve results.
Specifies where to get results. This parameter can be set to one of the following:
For specifying where to get
results
|
|||||||||||||||||||||||||||||||||||||||
Value | Description
|
||||||||||||||||||||||||||||||||||||||
M_DEFAULT |
Same as M_ALL. |
||||||||||||||||||||||||||||||||||||||
M_ALL |
Specifies that the results of all strings will be retrieved. |
||||||||||||||||||||||||||||||||||||||
M_GENERAL |
Specifies that the results relating to the entire String Reader context will be retrieved. |
||||||||||||||||||||||||||||||||||||||
0 to M_STRING_NUMBER - 1 |
Specifies the index of the string from which to get results. |
Specifies the type of result to retrieve.
See the Parameter associations section for possible values that can be specified.
Specifies the address in which to write results.
See the Parameter associations section for possible values that can be returned.
The tables below list possible values for the ResultType parameter and possible values returned to the ResultArrayPtr parameter.
When retrieving a general result (M_GENERAL), the ResultType parameter can be set to one of the following values.
Unless otherwise specified, the following values require that you pass the ResultArrayPtr parameter the address of a MIL_DOUBLE.
For retrieving general
results
|
|||||||||||||||||||||||||||||||||||||||
ResultType |
Description
|
||||||||||||||||||||||||||||||||||||||
ResultArrayPtr - Possible values returned |
|||||||||||||||||||||||||||||||||||||||
M_CHAR_NUMBER + |
Retrieves the total number of characters read (all strings together). (more details...) |
||||||||||||||||||||||||||||||||||||||
M_CONTEXT_ID + |
Retrieves the identifier of the String Reader context used by MstrRead() to obtain the results in the result buffer. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_STRING_NUMBER + |
Retrieves the total number of strings read. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_TEXT + |
Retrieves the entire text. (more details...) |
||||||||||||||||||||||||||||||||||||||
ResultArrayPtr data type info |
|
||||||||||||||||||||||||||||||||||||||
M_TEXT_ALLOC_SIZE_BYTE + |
Retrieves the number of bytes required to retrieve M_TEXT result(s). (more details...) |
||||||||||||||||||||||||||||||||||||||
M_TEXT_SIZE + |
Retrieves the total number of characters in the text. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_TIMEOUT_END + |
Retrieves whether the timeout limit was reached. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_FALSE |
Specifies that the timeout limit was not reached. |
||||||||||||||||||||||||||||||||||||||
M_TRUE |
Specifies that the timeout limit was reached. |
When retrieving individual string results, the ResultType parameter can be set to one of the following values. Results can be retrieved for a specific string, or for all strings (M_ALL), unless otherwise specified. Note that strings are ordered in the natural Latin-based reading order.
Unless otherwise specified, the following values require that you pass the ResultArrayPtr parameter the address of a MIL_DOUBLE (when retrieving a specific string) or the address of an array of type MIL_DOUBLE with a size equal to the number of strings read. This number can be obtained using MstrGetResult() with M_STRING_NUMBER (when retrieving all results).
For individual strings
|
|||||||||||||||||||||||||||||||||||||||
ResultType |
Description
|
||||||||||||||||||||||||||||||||||||||
ResultArrayPtr - Possible values returned |
|||||||||||||||||||||||||||||||||||||||
M_CHAR_ANGLE + |
Retrieves the angle of the characters in the string, in degrees. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_FOREGROUND_VALUE + |
Retrieves the foreground value of the string read. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_FORMATTED_STRING + |
Retrieves the formatted string. (more details...) |
||||||||||||||||||||||||||||||||||||||
ResultArrayPtr data type info |
|
||||||||||||||||||||||||||||||||||||||
M_FORMATTED_STRING_SIZE + |
Retrieves the number of characters in the formatted string. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_SKEW_ANGLE + |
Retrieves the angle of the characters' skew in the string, in degrees. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_STRING + |
Retrieves the terminating null character ("\0") that was located during the read operation. (more details...) |
||||||||||||||||||||||||||||||||||||||
ResultArrayPtr data type info |
|
||||||||||||||||||||||||||||||||||||||
M_STRING_ALLOC_SIZE_BYTE + |
Retrieves the number of bytes required to retrieve M_STRING result(s). (more details...) |
||||||||||||||||||||||||||||||||||||||
M_STRING_ANGLE + |
Retrieves the angle of the string, in degrees. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_STRING_ASPECT_RATIO + |
Retrieves the aspect ratio of the string. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_STRING_BOX_BL_X + |
Retrieves the X-position of the bottom-left corner of the bounding box of the string. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_STRING_BOX_BL_Y + |
Retrieves the Y-position of the bottom-left corner of the bounding box of the string. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_STRING_BOX_BR_X + |
Retrieves the X-position of the bottom-right corner of the bounding box of the string. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_STRING_BOX_BR_Y + |
Retrieves the Y-position of the bottom-right corner of the bounding box of the string. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_STRING_BOX_UL_X + |
Retrieves the X-position of the top-left corner of the bounding box of the string. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_STRING_BOX_UL_Y + |
Retrieves the Y-position of the top-left corner of the bounding box of the string. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_STRING_BOX_UR_X + |
Retrieves the X-position of the top-right corner of the bounding box of the string. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_STRING_BOX_UR_Y + |
Retrieves the Y-position of the top-right corner of the bounding box of the string. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_STRING_CHAR_SCORE_MAX + |
Retrieves the maximum character score of the string. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_STRING_CHAR_SCORE_MIN + |
Retrieves the minimum character score of the string. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_STRING_MODEL_INDEX + |
Retrieves the index of the string model read. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_STRING_MODEL_USER_LABEL + |
Retrieves the user label of the string model read. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_STRING_POSITION_X + |
Retrieves the X-position of the string. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_STRING_POSITION_Y + |
Retrieves the Y-position of the string. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_STRING_SCALE + |
Retrieves the scale of the string. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_STRING_SCORE + |
Retrieves the string score calculated during the read operation for the entire string. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_STRING_SIZE + |
Retrieves the size of the string. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_STRING_TARGET_SCORE + |
Retrieves the string target score calculated during the read operation for the entire string. (more details...) |
When retrieving results for individual characters of a string, the ResultType parameter can be set to one of the following values. Results can be returned for characters of a specific string or for characters of all (M_ALL) strings. However, an array of results is always returned. Note that characters in the string are ordered by their index position in the string.
Unless otherwise specified, when retrieving a specific string, the following values require that you pass the ResultArrayPtr parameter the address of an array of type MIL_DOUBLE with a size equal to the number of characters in the individual string. This number can be obtained using MstrGetResult() with M_STRING_SIZE. When retrieving all strings, the following values require that you pass the ResultArrayPtr parameter the address of an array of type MIL_DOUBLE with a size equal to the number of characters in all the strings. This number can be obtained using MstrGetResult() with M_CHAR_NUMBER.
For individual characters of a
string
|
|||||||||||||||||||||||||||||||||||||||
ResultType |
Description
|
||||||||||||||||||||||||||||||||||||||
ResultArrayPtr - Possible values returned |
|||||||||||||||||||||||||||||||||||||||
M_CHAR_ASPECT_RATIO + |
Retrieves the aspect ratio of the character. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_CHAR_BASELINE_DEVIATION + |
Retrieves the baseline deviation of every read character within the string. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_CHAR_BOX_BL_X + |
Retrieves the X-position of the bottom-left corner of the bounding box of each character. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_CHAR_BOX_BL_Y + |
Retrieves the Y-position of the bottom-left corner of the bounding box of each character. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_CHAR_BOX_BR_X + |
Retrieves the X-position of the bottom-right corner of the bounding box of each character. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_CHAR_BOX_BR_Y + |
Retrieves the Y-position of the bottom-right corner of the bounding box of each character. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_CHAR_BOX_UL_X + |
Retrieves the X-position of the top-left corner of the bounding box of each character. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_CHAR_BOX_UL_Y + |
Retrieves the Y-position of the top-left corner of the bounding box of each character. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_CHAR_BOX_UR_X + |
Retrieves the X-position of the top-right corner of the bounding box of each character. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_CHAR_BOX_UR_Y + |
Retrieves the Y-position of the top-right corner of the bounding box of each character. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_CHAR_CONSECUTIVE_SPACE + |
Retrieves the number of consecutive spaces that can be inserted between this character and the following one in the string. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_CHAR_FONT + |
Retrieves the index of the font of each individual character within the string(s). (more details...) |
||||||||||||||||||||||||||||||||||||||
M_CHAR_FONT_USER_LABEL + |
Retrieves the user label of the font of each individual character within the string(s). (more details...) |
||||||||||||||||||||||||||||||||||||||
M_CHAR_HOMOGENEITY_SCORE + |
Retrieves the homogeneity score of each individual character within the string(s). (more details...) |
||||||||||||||||||||||||||||||||||||||
M_CHAR_INDEX + |
Retrieves the index of the character in the font for each individual character within the string(s). (more details...) |
||||||||||||||||||||||||||||||||||||||
M_CHAR_POSITION_X + |
Retrieves the X-position of the character. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_CHAR_POSITION_Y + |
Retrieves the Y-position of the character. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_CHAR_SCALE + |
Retrieves the scale of the character. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_CHAR_SCORE + |
Retrieves the score of each individual character within the string(s). (more details...) |
||||||||||||||||||||||||||||||||||||||
M_CHAR_SIMILARITY_SCORE + |
Retrieves the similarity score of each individual character within the string(s). (more details...) |
||||||||||||||||||||||||||||||||||||||
M_CHAR_VALUE + |
Retrieves the value of each character read. (more details...) |
||||||||||||||||||||||||||||||||||||||
ResultArrayPtr data type info |
|
When retrieving transformation coefficient results for individual characters of a string, the ResultType parameter can be set to one of the following values.
Transformation coefficients allow you to transform any point from the character's source image (the image from which the characters were defined) to its corresponding position in the target image (forward), or from the read position in the target image to its corresponding position in the character's source image (reverse). This is done using the following equations:
x d = A x s + B y s + C .
y d = D x s + E y s + F .
where A, B, C, D, E, and F are the transformation coefficients (forward or reverse); x s and y s specify the source coordinates (character image for forward transformation or target image for reverse transformation); and, x d and y d specify the destination coordinates (target image for forward transformation or character image for reverse transformation).
Unless otherwise specified, when retrieving a specific string, the following values require that you pass the ResultArrayPtr parameter the address of an array of type MIL_DOUBLE with a size equal to the number of characters in the individual string. This number can be obtained using MstrGetResult() with M_STRING_SIZE. When retrieving all strings, the following values require that you pass the ResultArrayPtr parameter the address of an array of type MIL_DOUBLE with a size equal to the number of characters in all the strings. This number can be obtained using MstrGetResult() with M_CHAR_NUMBER.
For retrieving transformation coefficient
results for individual characters of a string with a font-based
context
|
|||||||||||||||||||||||||||||||||||||||
ResultType |
Description
|
||||||||||||||||||||||||||||||||||||||
ResultArrayPtr - Possible values returned |
|||||||||||||||||||||||||||||||||||||||
M_A_FORWARD + |
Retrieves the forward transformation coefficient A. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_A_REVERSE + |
Retrieves the reverse transformation coefficient A. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_B_FORWARD + |
Retrieves the forward transformation coefficient B. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_B_REVERSE + |
Retrieves the reverse transformation coefficient B. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_C_FORWARD + |
Retrieves the forward transformation coefficient C. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_C_REVERSE + |
Retrieves the reverse transformation coefficient C. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_D_FORWARD + |
Retrieves the forward transformation coefficient D. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_D_REVERSE + |
Retrieves the reverse transformation coefficient D. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_E_FORWARD + |
Retrieves the forward transformation coefficient E. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_E_REVERSE + |
Retrieves the reverse transformation coefficient E. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_F_FORWARD + |
Retrieves the forward transformation coefficient F. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_F_REVERSE + |
Retrieves the reverse transformation coefficient F. (more details...) |
You can add one of the following values to the above-mentioned values to cast the requested results to a required data type.
For casting the result to a required data
type
|
|||||||||||||||||||||||||||||||||||||||
ResultType |
Description
|
||||||||||||||||||||||||||||||||||||||
ResultArrayPtr - Possible values returned |
|||||||||||||||||||||||||||||||||||||||
M_TYPE_CHAR |
Casts the requested results to a char. (more details...) |
||||||||||||||||||||||||||||||||||||||
ResultArrayPtr data type info |
|
||||||||||||||||||||||||||||||||||||||
M_TYPE_MIL_DOUBLE |
Casts the requested results to a MIL_DOUBLE. (more details...) |
||||||||||||||||||||||||||||||||||||||
ResultArrayPtr data type info |
|
||||||||||||||||||||||||||||||||||||||
M_TYPE_MIL_FLOAT |
Casts the requested results to a MIL_FLOAT. (more details...) |
||||||||||||||||||||||||||||||||||||||
ResultArrayPtr data type info |
|
||||||||||||||||||||||||||||||||||||||
M_TYPE_MIL_ID |
Casts the requested results to a MIL_ID. (more details...) |
||||||||||||||||||||||||||||||||||||||
ResultArrayPtr data type info |
|
||||||||||||||||||||||||||||||||||||||
M_TYPE_MIL_INT |
Casts the requested results to a MIL_INT. (more details...) |
||||||||||||||||||||||||||||||||||||||
ResultArrayPtr data type info |
|
||||||||||||||||||||||||||||||||||||||
M_TYPE_MIL_INT16 |
Casts the requested results to a MIL_INT16. (more details...) |
||||||||||||||||||||||||||||||||||||||
ResultArrayPtr data type info |
|
||||||||||||||||||||||||||||||||||||||
M_TYPE_MIL_INT32 |
Casts the requested results to a MIL_INT32. (more details...) |
||||||||||||||||||||||||||||||||||||||
ResultArrayPtr data type info |
|
||||||||||||||||||||||||||||||||||||||
M_TYPE_MIL_INT64 |
Casts the requested results to a MIL_INT64. (more details...) |
||||||||||||||||||||||||||||||||||||||
ResultArrayPtr data type info |
|
||||||||||||||||||||||||||||||||||||||
M_TYPE_TEXT_CHAR |
Casts the requested results to a MIL_TEXT_CHAR. (more details...) |
||||||||||||||||||||||||||||||||||||||
ResultArrayPtr data type info |
|
When retrieving errors or warnings reported by the last call to MstrExpert(), the ResultType parameter can be set to one of the following values.
To retrieve general errors or warnings (relating to the entire String Reader context), the Index parameter must be set to M_GENERAL. To retrieve errors or warnings for a specific string, or for all strings, the Index parameter must be set to the string's index, or to M_ALL.
For retrieving errors or warnings
reported by the last call to MstrExpert()
|
|||||||||||||||||||||||||||||||||||||||
ResultType |
Description
|
||||||||||||||||||||||||||||||||||||||
ResultArrayPtr - Possible values returned |
|||||||||||||||||||||||||||||||||||||||
M_REPORT_ERRORS + |
Retrieves a list of all the errors reported by the last call to MstrExpert(). (more details...) |
||||||||||||||||||||||||||||||||||||||
ResultArrayPtr data type info |
|
||||||||||||||||||||||||||||||||||||||
M_REPORT_NUMBER_OF_ERRORS + |
Retrieves the number of errors reported by the last call to MstrExpert(). (more details...) |
||||||||||||||||||||||||||||||||||||||
ResultArrayPtr data type info |
|
||||||||||||||||||||||||||||||||||||||
M_REPORT_NUMBER_OF_WARNINGS + |
Retrieves the number of warnings reported by the last call to MstrExpert(). (more details...) |
||||||||||||||||||||||||||||||||||||||
ResultArrayPtr data type info |
|
||||||||||||||||||||||||||||||||||||||
M_REPORT_WARNINGS + |
Retrieves a list of all the warnings reported by the last call to MstrExpert(). (more details...) |
||||||||||||||||||||||||||||||||||||||
ResultArrayPtr data type info |
|
You can add the following value to the above-mentioned values to determine whether a result is available.
For determining whether results are
available
|
|||||||||||||||||||||||||||||||||||||||
ResultType |
Description
|
||||||||||||||||||||||||||||||||||||||
ResultArrayPtr - Possible values returned |
|||||||||||||||||||||||||||||||||||||||
M_AVAILABLE |
Retrieves whether a result is available to be returned. (more details...) |
||||||||||||||||||||||||||||||||||||||
ResultArrayPtr data type info |
Data
type: MIL_DOUBLE |
||||||||||||||||||||||||||||||||||||||
M_NULL |
Specifies that the result is not available to be retrieved. |
||||||||||||||||||||||||||||||||||||||
Value != 0 |
Specifies that the result is available to be retrieved. |
Header | Include mil.h. |
Library | Use mil.lib; milstr.lib. |
DLL | Requires mil.dll; milstr.dll. |