MIL_ID ContextId, | //in |
MIL_INT64 FeatureType, | //in |
MIL_INT64 Geometry, | //in |
MIL_INT FeatureLabel, | //in |
MIL_INT64 BuildOperation, | //in |
const MIL_INT *FeatureLabelArrayPtr, | //in |
const MIL_INT *SubFeatureIndexArrayPtr, | //in |
MIL_INT SizeOfArray, | //in |
MIL_INT64 ControlFlag | //in |
This function adds a feature to the metrology template of the specified metrology context. This function can also modify an existing feature of a metrology template. To delete features, use MmetControl() with M_DELETE.
To add several features to the template, you must call this function for each feature to add.
Features can either be physically measured from the target image or constructed from a set of other features, which can be referred to as base features. When a feature is composed of several instances of the same feature type, it is considered a multiple feature. Every instance of the feature type is a subfeature of the multiple feature. A single feature is a feature that has only one instance of the feature type. All supported features are single features, except for the edgel feature (M_MEASURED or M_CONSTRUCTED with M_EDGEL) and the measured multiple point feature (M_MEASURED with M_POINT). When adding a constructed feature that requires a point, it is possible to isolate and use a specific point subfeature of a measured multiple point feature. This is not true for the edgel feature since it is always used as a group.
Every feature has a position in the metrology template. For a physically measured feature, its position can be considered to be set according to the metrology region in which it is expected to be established (MmetSetRegion()). By default, the metrology region is infinite (the whole target image). For a constructed feature, its position in the template is defined by the position of the features used to construct it (its base features). The position of a feature is relative to a reference coordinate system, referred to as the reference frame. The global frame is the default. 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 change the reference frame to a local frame, use MmetControl() with M_REFERENCE_FRAME. Local frames are coordinate systems located anywhere within the metrology template and defined as metrology features.
Once a feature is added to the template, it is possible to change its position using MmetSetPosition(). In addition, you can modify the feature so that it is constructed from a new set of base features and/or a new build operation; to do so, call MmetAddFeature() with M_MODIFY. Note that you cannot modify a feature's geometry.
To define the acceptable geometric relationship between several features in the template or the acceptable deviation from the definition of a feature, add a geometric tolerance, using MmetAddTolerance(). To calculate the added features and validate the geometric tolerances in the target image, use MmetCalculate(). To change the settings of a feature in the template, use MmetControl().
Specifies the identifier of the metrology context containing the template. The metrology context must have been previously allocated on the required system using MmetAlloc().
Specifies the type of feature to add (M_CONSTRUCTED or M_MEASURED) or specifies to modify a feature (M_MODIFY).
See the Parameter associations section for possible values that can be specified.
Specifies the geometric shape of the feature to add. If modifying a feature (M_MODIFY), this parameter must be set to M_DEFAULT.
See the Parameter associations section for possible values that can be specified.
Specifies the label of the feature.
For specifying label values
|
|||||||||||||||||||||||||||||||||||||||
Value | Description
|
||||||||||||||||||||||||||||||||||||||
M_DEFAULT |
Specifies the label value, as automatically determined by MIL. |
||||||||||||||||||||||||||||||||||||||
Value |
Specifies the label value. (more details...) |
Specifies the operation to use to build the feature.
See the Parameter associations section for possible values that can be specified.
Specifies the array that holds the label of every feature to use to construct the feature. Features used to construct a feature are considered to be its base features.
Set this parameter to M_NULL when adding measured features or parametrically constructed features (M_PARAMETRIC).
Specifies the array that holds the index of every subfeature to use to construct the feature. Features used to construct a feature are considered to be its base features.
If all features referenced by FeatureLabelArrayPtr are single features, set SubFeatureIndexArrayPtr to M_NULL. This is also true when adding measured features or parametrically constructed features (M_PARAMETRIC).
If some features referenced by FeatureLabelArrayPtr are multiple features, set SubFeatureIndexArrayPtr to an array that is the same size as the FeatureLabelArrayPtr array. Set each element of the SubFeatureIndexArrayPtr array to the index of the subfeature to use for the feature at the corresponding element of the FeatureLabelArrayPtr array; for single features, set their corresponding element in the SubFeatureIndexArrayPtr array to 0.
Specifies the size of the arrays that hold the information that will be used to construct the feature (FeatureLabelArrayPtr and SubFeatureIndexArrayPtr). When setting the FeatureLabelArrayPtr parameter to M_NULL, set this parameter to 0.
The tables below list possible values for the FeatureType, Geometry, and BuildOperation parameters.
To add a constructed feature, the FeatureType, Geometry, and BuildOperation parameters can be set to the following values. Note that certain build operations for constructed features require base features, which you can specify using the FeatureLabelArrayPtr parameter and, if necessary, the SubFeatureIndexArrayPtr parameter.
For adding a constructed
feature
|
|||||||||||||||||||||||||||||||||||||||
FeatureType |
Description
|
||||||||||||||||||||||||||||||||||||||
Geometry | |||||||||||||||||||||||||||||||||||||||
BuildOperation | |||||||||||||||||||||||||||||||||||||||
M_CONSTRUCTED |
Adds a constructed feature. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_ARC |
Adds a constructed arc feature. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_DEFAULT |
Same as M_PARAMETRIC. |
||||||||||||||||||||||||||||||||||||||
M_CLONE_FEATURE |
Specifies that the arc feature is cloned from the specified base feature. |
||||||||||||||||||||||||||||||||||||||
M_CONSTRUCTION |
Specifies that the arc feature is built from a geometric construction using the specified base features. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_FIT |
Specifies that the arc feature is built from the arc that best fits the specified base features. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_PARAMETRIC |
Specifies that the arc feature is built from the following MmetControl() parametric controls: M_POSITION_X, M_POSITION_Y, M_ANGLE_START, M_ANGLE_END, and M_RADIUS. |
||||||||||||||||||||||||||||||||||||||
M_CIRCLE |
Adds a constructed circle feature. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_DEFAULT |
Same as M_PARAMETRIC. |
||||||||||||||||||||||||||||||||||||||
M_CLONE_FEATURE |
Specifies that the circle feature is cloned from the specified base feature. |
||||||||||||||||||||||||||||||||||||||
M_CONSTRUCTION |
Specifies that the circle feature is built from a geometric construction using the specified base features. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_FIT |
Specifies that the circle feature is built from the circle that best fits the specified base features. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_INNER_FIT |
Specifies that the circle feature is built from the best inner fit of a circle around the specified base features. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_OUTER_FIT |
Specifies that the circle feature is built from the best outer fit of a circle around the specified base features. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_PARAMETRIC |
Specifies that the circle feature is built from the following MmetControl() parametric controls: M_POSITION_X, M_POSITION_Y, and M_RADIUS. |
||||||||||||||||||||||||||||||||||||||
M_EDGEL |
Adds a constructed edgel feature. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_CLONE_FEATURE |
Specifies that the edgel feature is cloned from the specified base feature. |
||||||||||||||||||||||||||||||||||||||
M_COPY_FEATURE_EDGELS |
Specifies that the edgel feature is constructed by copying the edgels of the specified base features. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_LINE |
Adds a constructed line feature. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_DEFAULT |
Same as M_PARAMETRIC. |
||||||||||||||||||||||||||||||||||||||
M_ANGLE |
Specifies that the line feature is built at a specified angle from the specified linear base feature (segment or line), and passing through the specified point base feature. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_BISECTOR |
Specifies that the line feature is built where it divides, in two equal parts, an angle formed by the specified base features. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_CLONE_FEATURE |
Specifies that the line feature is cloned from the specified base feature. |
||||||||||||||||||||||||||||||||||||||
M_CONSTRUCTION |
Specifies that the line feature is built from a geometric construction using the specified base features. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_FIT |
Specifies that the line feature is built from the resulting best fit of the specified base feature. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_PARALLEL |
Specifies that the line feature is built parallel to the specified linear base feature (segment or line), and passing through the specified point base feature. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_PARAMETRIC |
Specifies that the line feature is built from the following MmetControl() parametric controls: M_LINE_A, M_LINE_B, and M_LINE_C. |
||||||||||||||||||||||||||||||||||||||
M_PERPENDICULAR |
Specifies that the line feature is built perpendicular to the specified linear base feature (segment or line), and passing through the specified point base feature. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_SECTOR_RELATIVE |
Specifies that the line feature is built where it divides, in two parts, an angle formed by the specified base features. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_LOCAL_FRAME |
Adds a constructed local frame feature. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_DEFAULT |
Same as M_PARAMETRIC. |
||||||||||||||||||||||||||||||||||||||
M_CLONE_FEATURE |
Specifies that the local frame feature is cloned from the specified base feature. |
||||||||||||||||||||||||||||||||||||||
M_CONSTRUCTION |
Specifies that the local frame feature is built from a geometric construction using the specified base features. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_PARAMETRIC |
Specifies that the local frame feature is built from the following MmetControl() parametric controls: M_POSITION_X, M_POSITION_Y, and M_ANGLE. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_POINT |
Adds a constructed point feature. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_DEFAULT |
Same as M_PARAMETRIC. |
||||||||||||||||||||||||||||||||||||||
M_ANGLE_ABSOLUTE |
Specifies that the point feature is built at the specified absolute angle, on the contour of the specified base feature. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_ANGLE_RELATIVE |
Specifies that the point feature is built at the specified relative angle, on the contour of the specified base feature. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_CENTER |
Specifies that the point feature is built at the center of the specified base feature(s). (more details...) |
||||||||||||||||||||||||||||||||||||||
M_CLONE_FEATURE |
Specifies that the point feature is cloned from the specified base feature. |
||||||||||||||||||||||||||||||||||||||
M_CLOSEST |
Specifies that the point feature is built at the point on the first specified base feature that is closest to the second specified base feature. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_EXTENDED_INTERSECTION |
Specifies that the point feature is built at the point of intersection between the extension of the first and second specified base features. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_INTERSECTION |
Specifies that the point feature is built at the point of intersection between the first and second specified base features. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_MAX_DISTANCE_POINT |
Specifies that the point feature is built at the point on the first specified base feature that is farthest from any point on the second specified base feature. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_MIDDLE |
Specifies that the point feature is built at the midpoint of the contour (edge) of the specified base feature. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_PARAMETRIC |
Specifies that the point feature is built from the following MmetControl() parametric controls: M_POSITION_X and M_POSITION_Y. |
||||||||||||||||||||||||||||||||||||||
M_POSITION_ABSOLUTE |
Specifies that the point feature is built at the specified position on the contour of the specified base feature. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_POSITION_END |
Specifies that the point feature is built at the end of the contour of the specified base feature. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_POSITION_RELATIVE |
Specifies that the point feature is built at the specified relative position on the contour of the specified base feature. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_POSITION_START |
Specifies that the point feature is built at the start position of the contour of the specified base feature. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_SEGMENT |
Adds a constructed segment feature. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_DEFAULT |
Same as M_PARAMETRIC. |
||||||||||||||||||||||||||||||||||||||
M_CLONE_FEATURE |
Specifies that the segment feature is cloned from the specified base feature. |
||||||||||||||||||||||||||||||||||||||
M_CONSTRUCTION |
Specifies that the segment feature is built from a geometric construction using the specified base features. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_FIT |
Specifies that the segment feature is built from the line that best fits the specified base features. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_INNER_FIT |
Specifies that the segment feature is built from the segment that has the best inner fit in the specified base features. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_OUTER_FIT |
Specifies that the segment feature is built from the outer fit of the specified base features. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_PARAMETRIC |
Specifies that the segment feature is built from the following MmetControl() parametric controls: M_POSITION_START_X, M_POSITION_START_Y, M_POSITION_END_X, and M_POSITION_END_Y. |
To add a measured feature, the FeatureType, Geometry, and BuildOperation parameters can be set to the following values.
For adding a measured
feature
|
|||||||||||||||||||||||||||||||||||||||
FeatureType |
Description
|
||||||||||||||||||||||||||||||||||||||
Geometry | |||||||||||||||||||||||||||||||||||||||
BuildOperation | |||||||||||||||||||||||||||||||||||||||
M_MEASURED |
Adds a physically measured feature. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_ARC |
Adds a physically measured arc feature. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_DEFAULT |
Same as M_FIT. |
||||||||||||||||||||||||||||||||||||||
M_FIT |
Specifies that the measured arc feature is built using a best fit operation applied to the data (edgels) extracted from the metrology region. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_CIRCLE |
Adds a physically measured circle feature. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_DEFAULT |
Same as M_FIT. |
||||||||||||||||||||||||||||||||||||||
M_FIT |
Specifies that the measured circle feature is built using a best fit operation applied to the data (edgels) extracted from the metrology region. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_INNER_FIT |
Specifies that the measured circle feature is built using the best inner fit operation applied to the data (edgels) extracted from the metrology region. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_OUTER_FIT |
Specifies that the measured circle feature is built using the best outer fit operation applied to the data (edgels) extracted from the metrology region. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_EDGEL |
Adds a physically measured edgel feature. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_DEFAULT |
Specifies that the measured edgel feature is built by extracting all the edgels in the metrology region. |
||||||||||||||||||||||||||||||||||||||
M_POINT |
Adds a physically measured point feature. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_DEFAULT |
Same as M_FIT. |
||||||||||||||||||||||||||||||||||||||
M_FIT |
Specifies that the measured point feature is built using a best fit operation applied to the data (edgels) extracted from the metrology region. |
||||||||||||||||||||||||||||||||||||||
M_SEGMENT |
Adds a physically measured segment feature. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_DEFAULT |
Same as M_FIT. |
||||||||||||||||||||||||||||||||||||||
M_FIT |
Specifies that the measured segment feature is built from the line that best fits the data (edgels) extracted from the metrology region. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_INNER_FIT |
Specifies that the measured segment feature is built from the segment that has the best inner fit applied to the data (edgels) extracted from the metrology region. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_OUTER_FIT |
Specifies that the measured segment feature is built from the segment that has the best outer fit applied to the data (edgels) extracted from the metrology region. (more details...) |
To modify a feature, the FeatureType, Geometry, and BuildOperation parameters can be set to the following values.
For modifying a feature
|
|||||||||||||||||||||||||||||||||||||||
FeatureType |
Description
|
||||||||||||||||||||||||||||||||||||||
Geometry | |||||||||||||||||||||||||||||||||||||||
BuildOperation | |||||||||||||||||||||||||||||||||||||||
M_MODIFY |
Modifies the build operation of the specified feature, and/or for a constructed feature, modifies its base features, which is the set of features used to build the constructed feature. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_DEFAULT |
Specifies to use the current geometry of the feature. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_DEFAULT |
Specifies to change only the features from which the selected feature is built (its base features) and that the selected feature's build operation should not be changed. |
||||||||||||||||||||||||||||||||||||||
BuildOperation |
Specifies a new build operation for the selected feature. (more details...) |
Header | Include mil.h. |
Library | Use mil.lib; milmetrol.lib. |
DLL | Requires mil.dll; milmetrol.dll. |