| MIL 10 Reference
| Customize Help
| Save Settings

MregDraw



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
Draw specific features of the registration results in an image buffer or graphics list.
Syntax
void MregDraw(
MIL_ID ContextGraId, //in
MIL_ID ResultRegId, //in
MIL_ID DstImageBufOrListGraId, //in
MIL_INT64 Operation, //in
MIL_INT Index, //in
MIL_INT64 ControlFlag //in
)
Description

This function draws specific features of the registration results in the destination image buffer or graphics list.

From an M_STITCHING_RESULT result buffer, this function can draw a box surrounding the associated image(s) of one or all of the registration elements.

From an M_EXTENDED_DEPTH_OF_FIELD_RESULT result buffer, this function can draw the extended depth of field (EDoF) image into an image buffer.

To draw these results, the required information must be available in the registration result buffer.

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
ContextGraId

Specifies the identifier of the graphics context to use when drawing. This parameter must be set to one of the following value. Note that while this parameter is required for calling MregDraw(), when using an M_EXTENDED_DEPTH_OF_FIELD_RESULT result buffer, this parameter will not affect the function.

function map For specifying the graphics context
CollapseValue Description
Collapse M_DEFAULT

Specifies that the default graphics context of the current MIL application is used.

Note that there is a different default graphics context for each thread.

(summarize)
Collapse MIL graphics context identifier

Specifies a valid graphics context identifier, which you have allocated using MgraAlloc().

ResultRegId

Specifies the identifier of the registration result buffer from which to extract the results to draw. The registration result buffer must have been previously allocated on the required system using MregAllocResult().

DstImageBufOrListGraId

Specifies the identifier of the destination image buffer or graphics list in which to draw. The buffer can be any valid MIL image buffer allocated using MbufAlloc...(). The graphics list must be previously allocated using MgraAllocList(). By drawing into a display's overlay buffer or associating the graphics list with the display, you can also annotate an image non-destructively.

If specifying an image buffer, it must not have a region of interest (ROI) associated with it. Using an image buffer with an ROI will cause an error.

Operation

Specifies the type of operation to perform. This parameter can be set to one of the following:

function map For specifying the operation
CollapseValue Description
Collapse M_DRAW_BOX

Draws the bounding box of the image associated with the specified registration element, at its position, angle, and scale. The position, angle, and scale are determined by the registration.

Note that this operation is only available for an M_STITCHING_RESULT registration result buffer.

(summarize)
Collapse M_DRAW_EDOF_IMAGE

Draws the extended depth of field (EDoF) image into the target buffer. The DstImageBufOrListGraId input must be an image buffer. The Index parameter must be set to M_DEFAULT.

Note that this operation is only available for an M_EXTENDED_DEPTH_OF_FIELD_RESULT registration result buffer.

(summarize)
Index

Specifies the registration element that is associated with the image whose features you want to draw when drawing results of an M_STITCHING_RESULT registration result buffer. This parameter must be set to one of the values below.

function map For specifying the registration element
CollapseValue Description
Collapse M_DEFAULT

Specifies the default value.

For an M_STITCHING_RESULT result buffer, same as M_ALL.

For an M_EXTENDED_DEPTH_OF_FIELD_RESULT result buffer, this is the only possible value.

(summarize)
Collapse M_ALL

Specifies all registration elements.

Collapse 0 <= Value <= M_NUMBER_OF_ELEMENTS-1

Specifies the registration element's index.

ControlFlag

Reserved for future expansion and must be set to M_DEFAULT.

Compilation information
Header Include mil.h.
Library Use mil.lib; milreg.lib.
DLL Requires mil.dll; milreg.dll.
DEFAULT NONE DRAW BOX DRAW EDOF IMAGE DEFAULT ALL NUMBER OF ELEMENTS-1 DEFAULT