Table: | For specifying the index |
MIL_ID ContextGraId, | //in |
MIL_ID MarkerOrResultMeasId, | //in |
MIL_ID DstImageBufOrListGraId, | //in |
MIL_INT64 Operation, | //in |
MIL_INT Index, | //in |
MIL_INT64 ControlFlag | //in |
This function performs the specified drawing operation on the expected marker characteristics (as set with MmeasSetMarker()) or the actual characteristics of the marker occurrences (as found with MmeasFindMarker()). This function can also perform the specified drawing operation on the result of a measurement calculation between two markers (MmeasCalculate()).
This function can execute multiple drawing operations simultaneously (for example, M_DRAW_SEARCH_REGION + M_DRAW_SEARCH_DIRECTION). MIL performs the drawing operations in the specified destination image buffer or 2D graphics list.
You can draw settings and results, obtained relative to an offset, at the top-left corner of the destination image, using MgraControl() with M_DRAW_OFFSET_X and M_DRAW_OFFSET_Y, and zoom them using MgraControl() with M_DRAW_ZOOM_X and M_DRAW_ZOOM_Y. For more information, see the Drawing graphics with offset and zoom subsection of the Drawing graphics section of Chapter 24: Generating graphics.
Note that you can draw characteristics specified or returned in world units (MmeasSetMarker() with M_INCLUSION_POINT_INPUT_UNITS, M_MARKER_REFERENCE_INPUT_UNITS, M_POINT_INPUT_UNITS, M_SEARCH_REGION_INPUT_UNITS, and/or M_RESULT_OUTPUT_UNITS set to M_WORLD). However, if you set any of these constants to M_WORLD and you specify to draw expected marker characteristics from a measurement marker, you must pass MmeasDraw() a calibrated target image. Otherwise, the function will generate an error.
Specifies the 2D graphics context to use. This parameter must be set to one of the following values:
For specifying the 2D graphics context
|
|||||||||||||||||||||||||||||||||||||||
Value | Description | ||||||||||||||||||||||||||||||||||||||
M_DEFAULT |
Specifies that the default 2D graphics context of the current MIL application is used. Note that there is a different default 2D graphics context for each thread. (summarize)Specifies that the default 2D graphics context of the current MIL application is used. (more details...) |
||||||||||||||||||||||||||||||||||||||
MIL 2D graphics context identifier |
Specifies a valid 2D graphics context identifier, which you have allocated using MgraAlloc(). |
Specifies the identifier of a measurement marker buffer or the identifier of a measurement result buffer. A measurement marker buffer contains both the expected marker characteristics that you specified with MmeasSetMarker(), and the actual marker characteristics that MIL found in the target image with MmeasFindMarker(). To specify which characteristics to draw (expected or found), use the ControlFlag parameter (M_MARKER or M_RESULT).
If you specify a measurement result buffer, it must contain results from MmeasCalculate().
Specifies the identifier of the destination image buffer or 2D graphics list in which to draw. The buffer can be any valid MIL image buffer allocated using MbufAlloc...(). The 2D graphics list must be previously allocated using MgraAllocList(). By drawing into a display's overlay buffer or associating the 2D 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.
Specifies the type of operation to perform. You can add the possible Operation parameter values in the tables below to draw multiple characteristics at once.
The following operations are available when using a measurement marker buffer (MarkerOrResultMeasId) with either M_MARKER or M_RESULT (ControlFlag), unless otherwise specified.
For measurement marker buffers with either M_MARKER
or M_RESULT
|
|||||||||||||||||||||||||||||||||||||||
Value | Description | ||||||||||||||||||||||||||||||||||||||
M_DRAW_INCLUSION_POINT |
Draws a cross (+) at the position of the marker's inclusion point. This applies to stripe markers. To specify an inclusion point, use MmeasSetMarker() with M_INCLUSION_POINT. M_DRAW_INCLUSION_POINT is only available with M_MARKER. (summarize)Draws a cross (+) at the position of the marker's inclusion point. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_DRAW_POSITION + |
Draws a cross (+) at the position of the marker, for each marker occurrence. This applies to edge, stripe, circle, and point markers. For edge, stripe, and circle markers, the found position is drawn (MmeasFindMarker()); you must specify M_RESULT. For point markers, the defined position is drawn (MmeasSetMarker() with M_POSITION), although you can specify either M_MARKER or M_RESULT. (summarize)Draws a cross (+) at the position of the marker, for each marker occurrence. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_DRAW_SEARCH_DIRECTION |
Draws an arrow starting from the middle of the marker's box search region and pointing towards the direction of the edge transition. This applies to edge and stripe markers; in this case, the search direction is based on the marker's orientation (MmeasSetMarker() with M_ORIENTATION). (summarize)Draws an arrow starting from the middle of the marker's box search region and pointing towards the direction of the edge transition. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_DRAW_SEARCH_REGION |
Draws the marker's search region. This applies to edge, stripe, and circle markers. (summarize)Draws the marker's search region. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_DRAW_SEARCH_REGION_CENTER |
Draws the center of the marker's search region. This applies to edge, stripe, and circle markers. (summarize)Draws the center of the marker's search region. (more details...) |
The following operations are available when using a measurement marker buffer (MarkerOrResultMeasId) with M_RESULT (ControlFlag).
For measurement marker buffers and
M_RESULT
|
|||||||||||||||||||||||||||||||||||||||
Value | Description | ||||||||||||||||||||||||||||||||||||||
M_DRAW_EDGES |
Draws a line along the found edges of the marker. This applies to edge, stripe, and circle markers. For circle markers, the fitted circle is drawn, along with the found radius and position. (summarize)Draws a line along the found edges of the marker. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_DRAW_EDGES_PROFILE + |
Draws the first derivative of the intensity profile (edgevalue) from which the marker was established. This applies to edge and stripe markers. If you are drawing in a 2D graphics list, you must add M_DRAW_IN_BOX to this operation. (summarize)Draws the first derivative of the intensity profile (edgevalue) from which the marker was established. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_DRAW_EDGEVALUE_MIN_IN_PROFILE + |
Draws the threshold above which a grayscale variation (edgevalue) can be considered an edge. This is a graphical representation of MmeasSetMarker() with M_EDGEVALUE_MIN. This applies to edge and stripe markers. If you are drawing in a 2D graphics list, you must add M_DRAW_IN_BOX to this operation. (summarize)Draws the threshold above which a grayscale variation (edgevalue) can be considered an edge. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_DRAW_EDGEVALUE_PEAK_WIDTH_IN_PROFILE + |
Draws a horizontal line, beginning and ending with arrows (for example, <--->), to indicate the width of the edge peak of an edge or stripe marker. This is a graphical representation of MmeasGetResult() with M_EDGEVALUE_PEAK_WIDTH. This applies to edge and stripe markers. For stripe markers, the width of both its outermost edges is drawn, unless you specify M_EDGE_FIRST or M_EDGE_SECOND. If you are drawing in a 2D graphics list, you must add M_DRAW_IN_BOX to this operation. (summarize)Draws a horizontal line, beginning and ending with arrows (for example, <--->), to indicate the width of the edge peak of an edge or stripe marker. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_DRAW_POSITION_IN_PROFILE + |
Draws a vertical bar at the position of the marker within its profile. This applies to edge and stripe markers. If you are drawing in a 2D graphics list, you must add M_DRAW_IN_BOX to this operation. (summarize)Draws a vertical bar at the position of the marker within its profile. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_DRAW_SPACING |
Draws an H-type line (|-|) indicating the found spacing. This applies to multiple-occurrence markers (edge and stripe). (summarize)Draws an H-type line (|-|) indicating the found spacing. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_DRAW_SUB_POSITIONS + |
Draws a cross (+) at the found positions of the subedges. This applies to edge, stripe, and circle markers. (summarize)Draws a cross (+) at the found positions of the subedges. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_DRAW_WIDTH |
Draws an H-type line (|-|) to indicate the width of the edge peak of an edge or stripe marker. This is a graphical representation of MmeasGetResult() with M_EDGE_WIDTH. This applies to stripe markers only. (summarize)Draws an H-type line (|-|) to indicate the width of the edge peak of an edge or stripe marker. (more details...) |
You can add the following value to the above-mentioned values to specify whether to scale down (resize) the drawing to fit within the dimensions of the box search region.
For scaling down the specified drawing (edge and
stripe markers only)
|
|||||||||||||||||||||||||||||||||||||||
|
Description | ||||||||||||||||||||||||||||||||||||||
M_DRAW_IN_BOX |
Performs the specified drawing operation (for example, M_DRAW_EDGES_PROFILE), except scaled down (resized) to fit within the dimensions of the box search region. If you do not use this combination value, the same drawing operation is performed (for example, the edge profile is drawn), but sized to fit the dimensions of the destination image buffer. (summarize)Performs the specified drawing operation (for example, M_DRAW_EDGES_PROFILE), except scaled down (resized) to fit within the dimensions of the box search region. (more details...) |
You can add one or more of the following values to the above-mentioned values to specify whether to perform the drawing operation on the first or second edge of a stripe.
For specifying the edge for which to perform the
drawing (stripe markers only)
|
|||||||||||||||||||||||||||||||||||||||
|
Description | ||||||||||||||||||||||||||||||||||||||
M_EDGE_FIRST |
Draws the specified characteristic for the first outermost edge of a stripe. The first edge of a stripe is the edge closest to the search region's origin. (summarize)Draws the specified characteristic for the first outermost edge of a stripe. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_EDGE_SECOND |
Draws the specified characteristic for the second outermost edge of a stripe. |
The following operation is available when using a measurement result buffer (MarkerOrResultMeasId).
For measurement result buffers and
M_RESULT
|
|||||||||||||||||||||||||||||||||||||||
Value | Description | ||||||||||||||||||||||||||||||||||||||
M_DRAW_LINE |
Draws the line that joins the two markers specified with MmeasCalculate(). |
Specifies the index of the result to draw from a measurement marker buffer or from a measurement result buffer. When drawing the expected characteristics of a marker (M_MARKER), MIL does not need any index information and you must set this parameter to M_DEFAULT.
This parameter must be set to one of the values below.
For specifying the index
|
|||||||||||||||||||||||||||||||||||||||
Value | Description | ||||||||||||||||||||||||||||||||||||||
M_DEFAULT |
Same as M_RESULT_ALL_OCCURRENCES, when drawing the results of a measurement marker buffer or a measurement result buffer. When drawing the expected characteristics of a marker, this parameter must be set to M_DEFAULT, which specifies that the index information is not needed. Note that when drawing the expected characteristics of a marker that is actually a multiple-occurrence marker, only the first instance of the marker is drawn. (summarize)Same as M_RESULT_ALL_OCCURRENCES, when drawing the results of a measurement marker buffer or a measurement result buffer. (more details...) |
||||||||||||||||||||||||||||||||||||||
Specifies that the operation will be performed for a measurement result buffer, according to the specified subregions (one or all) of the specified occurrences (one or all). You can only use M_RESULT_PER_SUBREGION() with edge and stripe markers for the following operations: M_DRAW_SEARCH_DIRECTION, M_DRAW_SEARCH_REGION, M_DRAW_SEARCH_REGION_CENTER, M_DRAW_EDGES_PROFILE, and M_DRAW_EDGEVALUE_MIN_IN_PROFILE. (summarize)Specifies that the operation will be performed for a measurement result buffer, according to the specified subregions (one or all) of the specified occurrences (one or all). (more details...) |
|||||||||||||||||||||||||||||||||||||||
Parameters | |||||||||||||||||||||||||||||||||||||||
Specifies the subregion. |
|||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||
Specifies the occurrence. |
|||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||
M_RESULT_ALL_OCCURRENCES |
Specifies that the operation will be performed for all results. |
||||||||||||||||||||||||||||||||||||||
Value |
Specifies the index of the result to draw. |
Specifies whether to perform the drawing operation on the expected marker characteristics, the actual marker characteristics found in the target image, or the results of the measurement calculation. This parameter must be set to one of the values below.
For specifying whether to use the expected
characteristics, the found characteristics, or the calculation
results
|
|||||||||||||||||||||||||||||||||||||||
Value | Description | ||||||||||||||||||||||||||||||||||||||
M_DEFAULT |
Same as M_RESULT. |
||||||||||||||||||||||||||||||||||||||
M_MARKER |
Specifies to use the expected characteristics of a marker (as set with MmeasSetMarker()). In this case, the MarkerOrResultMeasId parameter must be set to the identifier of a measurement marker buffer and the Index parameter must be set to M_DEFAULT. (summarize)Specifies to use the expected characteristics of a marker (as set with MmeasSetMarker()). (more details...) |
||||||||||||||||||||||||||||||||||||||
M_RESULT |
Specifies to use the actual marker characteristics located in the target image (MmeasFindMarker()), or the result of the measurement calculation (MmeasCalculate()). In this case, the MarkerOrResultMeasId parameter must be set to the identifier of either a measurement marker buffer or a measurement result buffer. (summarize)Specifies to use the actual marker characteristics located in the target image (MmeasFindMarker()), or the result of the measurement calculation (MmeasCalculate()). (more details...) |
Header | Include mil.h. |
Library | Use mil.lib; milmeas.lib. |
DLL | Requires mil.dll; milmeas.dll. |