| Customize Help
| Save Settings

MmeasControl



Function Map
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 when using a C compiler (not a C++ or other compiler) in 64-bit mode, MmeasControl() internally calls the MIL_DOUBLE version of this function (MmeasControlDouble()). If you need to pass integer values, call the MIL_INT64 version of this function (MmeasControlInt64()).
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 which MIL system’s documentation you should use in its place and any possible differences.
Parameters
This function is not supported on the selected boards.
This function reference has not been updated for the selected MIL system. To show the content of this page, choose a second MIL system; refer to the MIL system's release note to see which MIL system’s documentation to choose and any possible differences.
Parameters
ContextOrResultId

Specifies the identifier of the measurement context or result buffer.

function map For specifying the measurement context or result buffer identifier
Click to summarizeValue Description
Click to summarize Measurement context ID

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

Click to summarize 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
Click to summarize
ControlType
Description
ControlValue
Click to summarize M_PIXEL_ASPECT_RATIO

Sets the pixel width to pixel height ratio. INQ

(summarize)
Click to summarize Value

Specifies the ratio.

The default value is 1.0.

(summarize)
Click to summarize M_PIXEL_ASPECT_RATIO_INPUT

Sets whether to use M_PIXEL_ASPECT_RATIO to correct measurement inputs. INQ

(summarize)
Click to summarize M_CORRECTED

Specifies to correct measurement inputs with the specified aspect ratio.

This is the default value.

(summarize)
Click to summarize M_NORMAL

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

Click to summarize M_PIXEL_ASPECT_RATIO_OUTPUT

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

(summarize)
Click to summarize M_CORRECTED

Specifies to correct measurement results with the specified aspect ratio.

This is the default value.

(summarize)
Click to summarize 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
Click to summarize
ControlType
Description
ControlValue
Click to summarize 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)
Click to summarize M_DEFAULT

Same as M_ACCORDING_TO_CALIBRATION.

Click to summarize M_ACCORDING_TO_CALIBRATION

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

Click to summarize M_PIXEL

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

Click to summarize 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 when using a C compiler under 64-bit
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.

void MmeasControlDouble (MIL_ID ContextOrResultId, MIL_INT64 ControlType, MIL_DOUBLE 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