MIL_ID SysId, | //in |
MIL_INT64 Type, | //in |
MIL_ID *ContextOrRegionObjectIdPtr | //out |
This function allocates a metrology context or a derived metrology region object on the specified system. A metrology context contains all the information necessary to perform an MmetCalculate() operation, including global processing settings and a metrology template; the metrology template defines the set of features and geometric tolerances against which MmetCalculate() validates and measures objects in an image. A derived metrology region object is an optional container for specialized information about metrology regions (ROIs).
When you allocate a metrology context, MIL automatically creates a global frame, assigns it an index of 0, and labels it M_GLOBAL_FRAME. The global frame is the first coordinate system used to define the features to add to the metrology template of a metrology context. The global frame always exists and you cannot delete it. If the target image is not calibrated, the global frame's default origin (0,0) is aligned with the center of the top-left corner pixel of the target image. If the target image is calibrated, the global frame's default origin is aligned with the origin of the relative (world) coordinate system.
To add features (either physically measured or constructed) or geometric tolerances to the metrology template of a metrology context, use MmetAddFeature() or MmetAddTolerance(), respectively. To adjust metrology context, feature, and geometric tolerance settings, use MmetControl().
For physically measured features, you must also use MmetSetRegion() to set the metrology region that delimits the area in the target image from which to establish the feature. You can set the metrology region using explicit values or a graphics list; you can also derive a metrology region using other features. If you are using an explicitly-defined or a graphics list metrology region, you just need to allocate a metrology context, and specify it when you call MmetSetRegion(). If you are deriving a metrology region using other features, you must also allocate a derived metrology region object and specify it, as well as the metrology context, when you call MmetSetRegion().
When the metrology context or the derived metrology region object is no longer required, you should free them using MmetFree().
Specifies the system on which to allocate the metrology context or the derived metrology region object.
This parameter should be set to one of the following values:
For specifying the system
|
|||||||||||||||||||||||||||||||||||||||
Value | Description
|
||||||||||||||||||||||||||||||||||||||
M_DEFAULT_HOST |
Specifies the default Host system of the current MIL application. |
||||||||||||||||||||||||||||||||||||||
MIL system identifier |
Specifies a valid system identifier, previously allocated using MsysAlloc(). |
Specifies whether to allocate a metrology context or a derived metrology region object. This parameter should be set to one of the following values:
For specifying whether to allocate a
metrology context or a derived metrology region object
|
|||||||||||||||||||||||||||||||||||||||
Value | Description
|
||||||||||||||||||||||||||||||||||||||
M_DEFAULT |
Same as M_CONTEXT. |
||||||||||||||||||||||||||||||||||||||
M_CONTEXT |
Specifies a metrology context. |
||||||||||||||||||||||||||||||||||||||
M_DERIVED_GEOMETRY_REGION |
Specifies a derived metrology region object. (more details...) |
Header | Include mil.h. |
Library | Use mil.lib; milmetrol.lib. |
DLL | Requires mil.dll; milmetrol.dll. |