MmeasInquire()函数

Synopsis

Inquire about a marker, result, or context buffer.

Format

long MmeasInquire(MeasId, ParamToInquire, FirstValuePtr, SecondValuePtr)

MIL_ID MeasId; Identifier of a marker, measurement result, or measurement context buffer
long InquireType; Parameter to inquire
void *FirstValuePtr; Storage location for first value
void *SecondValuePtr; Storage location for second value

Description

This function inquires about a specific marker parameter, context-control setting, or measurement result buffer type.

The MeasId parameter specifies the identifier of the marker, measurement context, or measurement result buffer from which information will be obtained.

The InquireType parameter specifies the particular setting to inquire about. The FirstValuePtr and SecondValuePtr parameters specify the addresses of the variables in which the requested information is to be written. If only one value is to be returned, it will be returned to the FirstValuePtr and the SecondValuePtr should be set to M_NULL.

When performing an inquiry on a marker buffer (to determine the default or user-defined value of a marker characteristic) InquireType can be set to one of the following values:

InquireType Description
M_MARKER_TYPE The type of marker (MmeasAllocMarker).
M_CONTROL_FLAG The control flag passed at marker allocation time (MmeasAllocMarker).
M_ORIENTATION The orientation of the marker (MmeasSetMarker).
M_POSITION The X and Y coordinates of the marker center (MmeasSetMarker). The X coordinate is returned to the FirstValuePtr and the Y-coordinate is returned t the SecondValuePtr.
M_POSITION_X The X coordinate of the marker center (MmeasSetMarker).
M_POSITION_Y The Y coordinate of the marker center (MmeasSetMarker).
M_POSITION_VARIATION The tolerance of position variation (MmeasSetMarker).
M_POSITION_INSIDE_STRIPE Whether the specified position is inside or outside of the stripe
(M_YES, M_NO, or M_ANY).
M_WIDTH The width of a stripe marker (MmeasSetMarker).
M_WIDTH_VARIATION The width variation of a marker (MmeasSetMarker).
M_POLARITY The polarity of a marker (MmeasSetMarker). When inquiring about a stripe marker, the polarity of its first edge (left edge) is returned to the FirstValuePtr and the polarity of its second edge is returned to the SecondValuePtr.
M_CONTRAST The contrast of a marker (one value for an edge; two for a stripe) (MmeasSetMarker).
M_CONTRAST_VARIATION The contrast variation of a marker (MmeasSetMarker).
M_BOX_ORIGIN The X and Y coordinates of the marker measurement box’s origin (MmeasSetMarker). The X coordinate is returned to the FirstValuePtr and the Y coordinate to the SecondValuePtr.
M_BOX_CENTER The X and Y coordinates of the marker measurement box’s center (MmeasSetMarker). The X coordinate is returned to the FirstValuePtr and the Y coordinate to the SecondValuePtr.
M_BOX_SIZE The width and height of the marker measurement box (MmeasSetMarker). The width is returned to the FirstValuePtr and the height is returned to the SecondValuePtr.
M_BOX_ANGLE The angle of the marker measurement box (MmeasSetMarker).
M_BOX_ANGLE_MODE Use multiple-angle search or, if disabled, search at fixed angle (MmeasSetMarker).
M_BOX_ANGLE_DELTA_NEG
and
M_BOX_ANGLE_DELTA_POS
The range of angles to be searched for the marker: from (M_BOX_ANGLE – M_BOX_ANGLE_DELTA_NEG) to (M_BOX_ANGLE + M_BOX_ANGLE_DELTA_POS) inclusively, starting with an angle close to that of M_BOX_ANGLE. (MmeasSetMarker).
M_BOX_ANGLE_TOLERANCE The rotation tolerance of the marker. This is the maximum angle at which a rotated marker can be found and still meet the acceptance level. This is the step angle used for a multi-angle search. (MmeasSetMarker).
M_BOX_ANGLE_ACCURACY The desired precision for the resulting angle of the marker. (MmeasSetMarker).
M_BOX_ANGLE_INTERPOLATION_MODE The type of interpolation used when performing a search at an angle. (MmeasSetMarker).
M_BOX_ANGLE_REFERENCE The center of rotation used when performing a search at an angle (MmeasSetMarker).
M_BOX_FIRST_CENTER The X and Y coordinates of the marker measurement box’s first edge center point (MmeasSetMarker). The X coordinate is returned to the FirstValuePtr and the Y coordinate to the SecondValuePtr.
M_BOX_SECOND_CENTER The X and Y-coordinates of the marker measurement box’s second edge center point (MmeasSetMarker). The X-coordinate is returned to the FirstValuePtr and the Y-coordinate to the SecondValuePtr.
M_EDGE_STRENGTH The maximum pixel value variation of the edge marker (as a percentage). (MmeasSetMarker).
M_EDGE_STRENGTH_VARIATION The tolerance of the maximum pixel value variation of the edge marker. (MmeasSetMarker).
M_EDGE_INSIDE The number of edges between the external edges of a stripe marker.
M_EDGE_INSIDE_VARIATION The tolerance of the number of edges between the external edges of a stripe marker.
M_EDGE_THRESHOLD The minimum pixel value in order to consider an edge in the search. The value is represented as a percentage of the image buffer’s maximum possible value.
M_MARKER_REFERENCE The X and Y-offsets of the marker reference (MmeasSetMarker). The X-offset is returned to the FirstValuePtr and the Y-offset to the SecondValuePtr.
For weighting purposes only:
M_WEIGHT_FACTOR+M_EDGE_STRENGTH
or M_CONTRAST
or M_POSITION
or M_WIDTH
or M_EDGE_INSIDE
The specific weight assigned to the specified parameter (as a percentage) (MmeasSetMarker).

When performing an inquiry on a measurement context buffer, InquireType can be set to one of the following values.

InquireType Description
M_PIXEL_ASPECT_RATIO The pixel aspect ratio (MmeasControl).
M_PIXEL_ASPECT_RATIO_INPUT The input pixel aspect ratio interpretation mode (MmeasControl).
M_PIXEL_ASPECT_RATIO_OUTPUT The output pixel aspect ratio interpretation mode (MmeasControl).
M_ZERO_OFFSET_X The pixel reference X-offset (MmeasControl).
M_ZERO_OFFSET_Y The pixel reference Y-offset (MmeasControl).
M_CONTROL_FLAG The control flag given at context allocation time (MmeasAllocContext).

When performing an inquiry on a measurement result buffer, InquireType can be set to M_RESULT_TYPE to indicate the type of result buffer allocated (MmeasAllocResult).

Results are returned to FirstValuePtr and SecondValuePtr as type “double”. To have results returned as type “long”, combine the InquireType with M_TYPE_LONG (for example, M_MARKER_TYPE+M_TYPE_LONG).

Returned value

The returned value is the requested first value buffer information, cast to long.

See also

MmeasAllocMarker, MmeasAllocResult, MmeasAllocContext, MmeasSetMarker, MmeasControl

《MmeasInquire()函数》上有1条评论

评论已关闭。