| Customize Help
| Save Settings

MmeasAllocMarker



Function Map
Synopsis
Allocate a measurement marker buffer.
Syntax
MIL_ID MmeasAllocMarker(
MIL_ID SystemId, //in
MIL_INT64 MarkerType, //in
MIL_INT64 ControlFlag, //in
MIL_ID *MarkerIdPtr //out
)
Description

This function allocates a measurement marker buffer on the specified system. You can allocate an edge, stripe, circle, or point marker buffer.

Once allocated, you can specify a marker's essential characteristics using MmeasSetMarker(); for an edge, stripe, or circle marker, you can also specify score characteristics using MmeasSetScore(). For an edge, stripe, or circle marker, MIL uses both essential and score characteristics to find the marker in a target image when you call MmeasFindMarker(). You cannot search for a point marker; you must define it at a specific location with MmeasSetMarker(). A point marker is typically used as a reference position when taking measurements between two markers using MmeasCalculate().

By default, when you allocate a marker buffer, it defines a single-occurrence marker. However, using MmeasSetMarker() with M_NUMBER, you can define an edge, stripe, or point marker as a multiple-occurrence marker. For edge and stripe markers, this allows you to search for multiple instances of the same image characteristics. For point markers, this allows you to define equidistant reference positions. You cannot define a multiple-occurrence circle marker.

When a marker buffer is no longer required, release its memory using MmeasFree().

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
SystemId INQ

Specifies the system on which to allocate the marker buffer.

This parameter should be set to one of the following values:

function map For specifying the system identifier
Click to summarizeValue Description
Click to summarize M_DEFAULT_HOST

Specifies the default Host system of the current MIL application.

Click to summarize MIL system identifier

Specifies a valid system identifier, previously allocated using MsysAlloc().

MarkerType INQ

Specifies the type of marker buffer to allocate.

This parameter must be set to one of the values below.

function map For specifying the type of marker buffer to allocate
Click to summarizeValue Description
Click to summarize M_CIRCLE

Specifies a circle marker buffer.

Click to summarize M_EDGE

Specifies an edge marker buffer.

Click to summarize M_POINT

Specifies a point marker buffer.

Click to summarize M_STRIPE

Specifies a stripe marker buffer.

ControlFlag

Reserved for future expansion and must be set to M_DEFAULT.

MarkerIdPtr

Specifies the address of the variable in which to write the marker buffer identifier. Since the MmeasAllocMarker() function also returns the marker buffer identifier, you can set this parameter to M_NULL. If allocation fails, M_NULL is written as the identifier.

Return value
The returned value is the marker buffer identifier if the allocation is successful. If allocation fails, M_NULL is returned.
Compilation information
Header Include mil.h.
Library Use mil.lib; milmeas.lib.
DLL Requires mil.dll; milmeas.dll.
DEFAULT HOST CIRCLE EDGE POINT STRIPE