| MIL 10 Reference
| Customize Help
| Save Settings

MmeasAllocMarker



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
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 if there is complementary information.
Parameters
This function is not supported on the selected boards.
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
CollapseValue Description
Collapse M_DEFAULT_HOST

Specifies the default Host system of the current MIL application.

Collapse 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
CollapseValue Description
Collapse M_CIRCLE

Specifies a circle marker buffer.

Collapse M_EDGE

Specifies an edge marker buffer.

Collapse M_POINT

Specifies a point marker buffer.

Collapse 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