| MIL 10 Reference
| Customize Help
| Save Settings

MmeasControl



See also
Availability
Not available in MIL-Lite
Available in MIL

Available on Windows
Available on Linux

Available on Non-Matrox computer
Available on Matrox 4Sight-X
Available on Matrox 4Sight GP
Available on Matrox Supersight
function map Function map
Examples
Synopsis
Control a measurement context or result buffer setting.
Syntax
void MmeasControl(
MIL_ID ContextOrResultId, //in
MIL_INT64 ControlType, //in
MIL_DOUBLE ControlValue //in
)
Description

This function allows you to control a measurement context or result buffer setting. These settings control the behavior of measurement operations (MmeasFindMarker() and MmeasCalculate()), which subsequently affects the results that you obtain (MmeasGetResult() or MmeasGetResultSingle()) or draw (MmeasDraw()).

Note that this function reference has not been updated for a MIL system added during a MIL update. Refer to the MIL system's release note to see if there is complementary information.
Parameters
This function is not supported on the selected boards.
Parameters
ContextOrResultId

Specifies the identifier of the measurement context or result buffer.

function map For specifying the measurement context or result buffer identifier
CollapseValue Description
Collapse Measurement context ID

Specifies a valid measurement context, previously allocated using MmeasAllocContext().

Collapse Measurement result buffer ID

Specifies a valid measurement result buffer, previously allocated using MmeasAllocResult().

ControlType

Specifies the type of control to set.

See the Parameter associations section for possible values that can be specified.

ControlValue

Specifies the required value for the control.

See the Parameter associations section for possible values that can be specified.

The tables below list possible values for the ControlType and ControlValue parameters.

The following ControlType and corresponding ControlValue parameter settings can be specified for a measurement context. In this case, you must set the ContextOrResultId parameter to a measurement context.

function map For a measurement context
CollapseControlType Description
ControlValue
Collapse M_PIXEL_ASPECT_RATIO

Sets the pixel width to pixel height ratio. INQ

(summarize)
Collapse Value

Specifies the ratio.

The default value is 1.0.

(summarize)
Collapse M_PIXEL_ASPECT_RATIO_INPUT

Sets whether to use M_PIXEL_ASPECT_RATIO to correct measurement inputs. INQ

(summarize)
Collapse M_CORRECTED

Specifies to correct measurement inputs with the specified aspect ratio.

This is the default value.

(summarize)
Collapse M_NORMAL

Specifies to not correct measurement inputs (ratio of 1.0).

Collapse M_PIXEL_ASPECT_RATIO_OUTPUT

Sets whether to use M_PIXEL_ASPECT_RATIO to correct measurement results (output data). INQ

(summarize)
Collapse M_CORRECTED

Specifies to correct measurement results with the specified aspect ratio.

This is the default value.

(summarize)
Collapse M_NORMAL

Specifies to not correct measurement results (ratio of 1.0).

The following ControlType and corresponding ControlValue parameter settings can be specified for a measurement result buffer. In this case, you must set the ContextOrResultId parameter to a measurement result buffer.

function map For a measurement result buffer
CollapseControlType Description
ControlValue
Collapse M_RESULT_OUTPUT_UNITS

Sets whether to return results of MmeasCalculate() in pixels or world units. This essentially sets the output coordinate system to use. The setting of this control type will only affect functions within this module which return positional results. This control type can be changed at any time to return results in the required output units.

Use MmeasSetMarker() with M_RESULT_OUTPUT_UNITS to control the units in which results found using MmeasFindMarker() are returned. INQ

(summarize)
Collapse M_DEFAULT

Same as M_ACCORDING_TO_CALIBRATION.

Collapse M_ACCORDING_TO_CALIBRATION

Specifies that results are returned in world units if the result was calculated on an image associated with a calibration context; otherwise, specifies that results are returned in pixel units.

Collapse M_PIXEL

Specifies that results are returned in pixel units, with respect to the pixel coordinate system.

Collapse M_WORLD

Specifies that results are returned in world units, with respect to the relative coordinate system. If world units are specified, calling MmeasGetResult() or MmeasGetResultSingle() generates an error if the result was not calculated on a calibrated image.

(summarize)
Type-specific versions of the function
void MmeasControlInt64 (MIL_ID ContextOrResultId, MIL_INT64 ControlType, MIL_INT64 ControlValue)
Parameters

ContextOrResultId

See ContextOrResultId of the main function for a description.

ControlType

See ControlType of the main function for a description.

ControlValue

See ControlValue of the main function for a description.

Compilation information
Header Include mil.h.
Library Use mil.lib; milmeas.lib.
DLL Requires mil.dll; milmeas.dll.
PIXEL ASPECT RATIO PIXEL ASPECT RATIO INPUT CORRECTED NORMAL PIXEL ASPECT RATIO OUTPUT CORRECTED NORMAL RESULT OUTPUT UNITS DEFAULT ACCORDING TO CALIBRATION PIXEL WORLD