MIL_ID ContextId, | //in |
MIL_INT Index, | //in |
MIL_INT Target, | //in |
MIL_INT64 ParamType, | //in |
MIL_DOUBLE Param1, | //in |
MIL_DOUBLE Param2, | //in |
MIL_DOUBLE Param3, | //in |
MIL_DOUBLE Param4, | //in |
MIL_INT64 ControlFlag | //in |
This function sets the rough location of the specified registration element's image with respect to another registration element's image or the global pixel coordinate system. The MregCalculate() function uses this location to find the transformations that optimally position the images in the global pixel coordinate system.
You can explicitly specify the rough location or you can copy it from a registration element of another registration context or a result element of a registration result buffer. When copying the rough location, you can use the same reference index as the element from which you are copying the rough location. Alternatively, you can specify a different reference index.
The more precise the information, the faster the registration calculation will be. If you know the exact position of the image, you can bypass the optimization step of the calculation by either disabling the MregControl() M_OPTIMIZE_LOCATION control type or replacing the image in the array by M_NULL (see the Skipping the optimization step subsection of the Customizing your registration settings section of Chapter 9: Registration). In this case, the transformation that you specify using MregSetLocation() becomes the optimal transformation. Upon calling MregCalculate(), this transformation will be converted so that it maps the image into the global pixel coordinate system without first converting it into its reference image's pixel coordinate system.
Some restrictions apply when selecting the image's reference. The settings cannot be circularly defined. If you take a specific image and look at its reference, and then at its reference image's reference, and continue through the series of images linked in this manner, the first image must never appear as another image's reference. Furthermore, there should only be one image with its reference set to the global pixel coordinate system.
Specifies the registration context of the registration element to affect. The registration context must have been previously allocated on the required system using MregAlloc().
Specifies the index of the registration element. This parameter can be set to one of the following:
For specifying the index
|
|||||||||||||||||||||||||||||||||||||||
Value | Description
|
||||||||||||||||||||||||||||||||||||||
M_ALL |
Specifies that all of the registration elements will have their location set. |
||||||||||||||||||||||||||||||||||||||
0 <= Value <= Number of source elements-1 |
Specifies the index of the registration element. |
Specifies the reference of the registration element's image. The coordinate system associated with this reference is used as the reference coordinate system.
For specifying the reference
|
|||||||||||||||||||||||||||||||||||||||
Value | Description
|
||||||||||||||||||||||||||||||||||||||
M_DEFAULT |
Same as M_PREVIOUS. |
||||||||||||||||||||||||||||||||||||||
M_COPY |
Uses the same index as the reference of the element from which positional information is being copied. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_NEXT |
Specifies the reference to be the image associated with the registration element whose index follows the specified registration element's index. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_PREVIOUS |
Specifies the reference to be the image associated with the registration element whose index precedes the specified registration element's index. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_REGISTRATION_GLOBAL |
Specifies that the reference is the global pixel coordinate system. |
||||||||||||||||||||||||||||||||||||||
M_UNCHANGED |
Specifies that only the rough locations are changed; the same reference is used. |
||||||||||||||||||||||||||||||||||||||
0 <= Value <= Number of source elements-1 |
Specifies the index of the registration element of the reference image. |
Specifies the type of transformation to use to set the location of the registration element's image.
Set this parameter to M_DEFAULT if not used.
See the Parameter associations section for possible values that can be specified.
Specifies an attribute of the transformation. Its definition depends on the value of ParamType.
Set this parameter to M_DEFAULT if not used.
See the Parameter associations section for possible values that can be specified.
Specifies an attribute of the transformation. Its definition depends on the value of ParamType.
Set this parameter to M_DEFAULT if not used.
See the Parameter associations section for possible values that can be specified.
Specifies an attribute of the transformation. Its definition depends on the value of ParamType.
Set this parameter to M_DEFAULT if not used.
See the Parameter associations section for possible values that can be specified.
The table below lists possible values for the ParamType, Param1, Param2, and Param3 parameters.
Note that any unused parameters should be set to M_DEFAULT.
For specifying the transformation
type
|
|||||||||||||||||||||||||||||||||||||||
ParamType |
Description
|
||||||||||||||||||||||||||||||||||||||
Param1 | |||||||||||||||||||||||||||||||||||||||
Param2 | |||||||||||||||||||||||||||||||||||||||
Param3 | |||||||||||||||||||||||||||||||||||||||
M_COPY_REG_CONTEXT |
Specifies that the rough locations are copied from another registration context. (more details...) |
||||||||||||||||||||||||||||||||||||||
Param1 |
Specifies the identifier of the registration context from which to copy the transformation settings. (more details...) |
||||||||||||||||||||||||||||||||||||||
Param2 |
Specifies the registration element index from which to copy the transformation settings. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_DEFAULT |
Specifies the default index. (more details...) |
||||||||||||||||||||||||||||||||||||||
0 <= Value <= Number of source elements-1 |
Specifies the registration element's index. |
||||||||||||||||||||||||||||||||||||||
M_COPY_REG_RESULT |
Specifies that the transformation between two registration result elements is copied. (more details...) |
||||||||||||||||||||||||||||||||||||||
Param1 |
Specifies the identifier of the registration result buffer from which to copy the transformations. (more details...) |
||||||||||||||||||||||||||||||||||||||
Param2 |
Specifies the registration result element's index from which to copy the transformation settings. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_DEFAULT |
Specifies the default index. (more details...) |
||||||||||||||||||||||||||||||||||||||
0 <= Value <= Number of source elements-1 |
Specifies the registration result element's index. |
||||||||||||||||||||||||||||||||||||||
Param3 |
Specifies the registration result element's index of the target transformation element. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_DEFAULT |
Specifies that the target registration result element's index is the same as the one that is specified in the Target parameter. |
||||||||||||||||||||||||||||||||||||||
M_REGISTRATION_GLOBAL |
Specifies that the target registration result element's reference is the global pixel coordinate system. |
||||||||||||||||||||||||||||||||||||||
Value >= 0 |
Specifies the target registration result element's index. |
||||||||||||||||||||||||||||||||||||||
M_POSITION_XY |
Specifies the coordinates of the origin of the registration element's image in the coordinate system of its reference. (more details...) |
||||||||||||||||||||||||||||||||||||||
Param1 |
Sets the X-coordinate of the image's origin in its reference coordinate system. |
||||||||||||||||||||||||||||||||||||||
Param2 |
Sets the Y-coordinate of the image's origin in its reference coordinate system. |
||||||||||||||||||||||||||||||||||||||
M_POSITION_XY_ANGLE |
Specifies the coordinates of the origin and the angle of the registration element's image in the coordinate system of its reference. (more details...) |
||||||||||||||||||||||||||||||||||||||
Param1 |
Sets the X-coordinate of the image's origin in its reference coordinate system. |
||||||||||||||||||||||||||||||||||||||
Param2 |
Sets the Y-coordinate of the image's origin in its reference coordinate system. |
||||||||||||||||||||||||||||||||||||||
Param3 |
Sets the angle of the image in its reference coordinate system. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_WARP_4_CORNER |
Specifies the transformation that transforms an arbitrary quadrilateral in the current image's pixel coordinate system into a rectangle in its reference coordinate system. (more details...) |
||||||||||||||||||||||||||||||||||||||
Param1 |
Specifies the MIL identifier of the buffer to use to store the coordinates of the 6 points. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_WARP_4_CORNER_REVERSE |
Specifies the transformation that transforms a rectangle in the current image's pixel coordinate system into an arbitrary quadrilateral in its reference coordinate system. (more details...) |
||||||||||||||||||||||||||||||||||||||
Param1 |
Specifies the MIL identifier of the buffer to use to store the coordinates of the 6 points needed to warp the image. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_WARP_POLYNOMIAL |
Specifies the transformation matrix that transforms points in the reference coordinate system into points in the current image's pixel coordinate system. (more details...) |
||||||||||||||||||||||||||||||||||||||
Param1 |
Specifies the MIL identifier of the buffer containing the transformation matrix. (more details...) |
void MregSetLocationInt64
(MIL_ID ContextId,
MIL_INT Index,
MIL_INT Target,
MIL_INT64 ParamType,
MIL_INT64 Param1,
MIL_DOUBLE Param2,
MIL_DOUBLE Param3,
MIL_DOUBLE Param4,
MIL_INT64 ControlFlag)
Parameters
ContextId See ContextId of the main function for a description. Index See Index of the main function for a description. Target See Target of the main function for a description. ParamType See ParamType of the main function for a description. Param1 See Param1 of the main function for a description. Param2 See Param2 of the main function for a description. Param3 See Param3 of the main function for a description. Param4 See Param4 of the main function for a description. ControlFlag See ControlFlag of the main function for a description. |
Header | Include mil.h. |
Library | Use mil.lib; milreg.lib. |
DLL | Requires mil.dll; milreg.dll. |