transform_metrology_object — Transform metrology objects of a metrology model, e.g. for alignment.
transform_metrology_object is obsolete and is only provided for reasons of backward compatibility. New applications should use the operator align_metrology_model instead.
transform_metrology_object translates and rotates the metrology objects contained in MetrologyHandle specified by the index Index according to the parameters Row, Column, and Phi.
The index Index refer to the index returned by the operators add_metrology_object_circle_measure, add_metrology_object_ellipse_measure, add_metrology_object_line_measure, or add_metrology_object_rectangle2_measure. Index may contain a single value or a tuple of values. If all metrology objects shall be transformed, Index can be set to 'all'.
The parameter Mode can be set to 'absolute' or 'relative' and specifies the effect of the transformation:
The metrology objects are translated to the image coordinates Row and Column and rotated by Phi with respect to the image coordinate system.
For metrology objects of the type ellipse, or rectangle, the origin of the rotation is defined in the center of the metrology object as specified in the operators add_metrology_object_ellipse_measure or add_metrology_object_rectangle2_measure. For lines and circles, Phi is ignored.
The values of the transformation are considered as relative values, i.e., they are specified relative to the previous position and rotation of the metrology object.
For metrology objects of the type ellipse, or rectangle, the origin of the rotation is defined in the center of the metrology object as specified in the operators add_metrology_object_ellipse_measure, or add_metrology_object_rectangle2_measure. For lines, the starting point of the line is used as origin of the rotation. For circles, Phi is ignored.
transform_metrology_object is fastest if no rotation is defined, the original and translated measure regions both lie completely within the image. In all other cases, the measure regions have to be newly generated, which is slower.
Note that any results (fitted geometric shapes) that have been generated by the operator apply_metrology_model before calling transform_metrology_object are discarded during the transformation.
This operator modifies the state of the following input parameter:
Handle of the metrology model.
Index of the metrology objects.
Default value: 'all'
Suggested values: 'all', 0, 1, 2
Translation in row direction.
Translation in column direction.
Mode of the transformation.
Default value: 'absolute'
Suggested values: 'absolute', 'relative'
If the parameters are valid, the operator transform_metrology_object returns the value 2 (H_MSG_TRUE). If necessary, an exception is raised.