| Customize Help
| Save Settings

M3dregSetLocation



Function Map
Synopsis
Sets the rough location of the working coordinate system of a point cloud with respect to either the working coordinate system of another point cloud, or the global coordinate system.
Syntax
void M3dregSetLocation(
MIL_ID Context3dregId, //in
MIL_INT Index, //in
MIL_INT Reference, //in
MIL_ID ParamId, //in
MIL_INT ParamIndex, //in
MIL_INT ParamReference, //in
MIL_INT64 ControlFlag //in
)
Description

This function sets the rough location of the working coordinate system of a point cloud with respect to a specified reference. A point cloud's reference is either the working coordinate system of another point cloud, or the global coordinate system. The rough location is stored in the point cloud's corresponding registration element, in the pairwise 3D registration context. Each registration element contains the registration information for a single point cloud.

The first iteration of the registration operation is called the preregistration. Specify the type of preregistration to perform using M3dregControl() with M_PREREGISTRATION_MODE. If M_PREREGISTRATION_MODE is set to M_USER_DEFINED, M3dregCalculate() will preregister a point cloud using the preregistration transformation matrix specified by this function. If M_PREREGISTRATION_MODE is set to M_CENTROID, the point cloud will be rotated according to the preregistration transformation matrix specified by this function, and translated so that the centroids of the two points clouds share the same coordinates. The translation component of the specified preregistration transformation matrix is ignored.

This function can copy the rough location from another registration element, or from the results of a previous registration operation.

You can set the rough location of several point clouds through repeated calls to M3dregSetLocation(), and perform all registrations with one call to M3dregCalculate(). Some restrictions apply when selecting references for point clouds. One point cloud must use the global coordinate system as its reference. Additionally, the references for points clouds cannot be circularly dependent. If you take a specific point cloud and look at its reference, and then at its reference's reference, and continue through the series of point clouds linked in this manner, the initial point cloud must never be another's reference.

By default, in a pairwise 3D registration context, the first registration element has the global coordinate system as its reference, and the first registration element is the reference of all other registration elements.

Note that this function reference has not been updated for a MIL system added during a MIL update. Refer to the MIL system's release note to see if there is complementary information.
Parameters
This function is not supported on the selected boards.
Parameters
Context3dregId

Specifies the identifier of the pairwise 3D registration context in which to store the rough location.

Index

Specifies the index of the registration element in the pairwise 3D registration context to set.

function map For specifying the index
Click to summarizeValue Description
Click to summarize M_ALL

Specifies to set all registration elements in the pairwise 3D registration context.

If ParamId is a pairwise 3D registration context or pairwise 3D registration result buffer, then the number of registration elements in the pairwise 3D registration context must be less than or equal to the number of registration elements in the object passed to ParamId.

(summarize)
Click to summarize 0 <= Value < M3dregInquire(Context3dregId,
M_NUMBER_OF_REGISTRATION_ELEMENTS)

Specifies the index of the registration element in the pairwise 3D registration context.

Reference

Specifies the reference of the registration element in Context3dregId.

function map For specifying the reference
Click to summarizeValue Description
Click to summarize M_DEFAULT

Same as M_PREVIOUS.

Click to summarize M_COPY

Specifies to copy the rough location of ParamReference.

This setting is only available if ParamId specifies a pairwise 3D registration context or a pairwise 3D registration result buffer.

(summarize)
Click to summarize M_LAST

Specifies the index of the last registration element in the pairwise 3D registration context passed to Context3dregId.

Click to summarize M_NEXT

Specifies the index of the registration element after the one specified in Index, unless Index refers to the last registration element in the context. In this case, M_NEXT will specify the global coordinate system.

(summarize)
Click to summarize M_PREVIOUS

Specifies the index of the registration element before the one specified in Index, unless Index refers to the first registration element in the context. In this case, M_PREVIOUS will specify the global coordinate system.

(summarize)
Click to summarize M_REGISTRATION_GLOBAL

Specifies the global coordinate system.

Click to summarize M_UNCHANGED

Specifies not to modify the current reference of the registration element.

Click to summarize 0 <= Value < M3dregInquire(Context3dregId,
M_NUMBER_OF_REGISTRATION_ELEMENTS)

Specifies the index of the reference registration element.

This value should not equal the value specified for Index.

(summarize)
ParamId

Specifies the identifier of the MIL object from which to copy the rough location.

See the Parameter associations section for possible values that can be specified.

ParamIndex

Specifies the index of the registration element or registration result element in the MIL object passed to the ParamId parameter.

See the Parameter associations section for possible values that can be specified.

ParamReference

Specifies an attribute of the transformation that specifies a rough location.

See the Parameter associations section for possible values that can be specified.

ControlFlag

Reserved for future expansion and must be set to M_DEFAULT.

The table below lists possible values for the ParamId, ParamIndex, and ParamReference parameters.

Note that any unused parameters should be set to M_DEFAULT.

function map For specifying the reference point cloud
Click to summarizeParamId Description
ParamIndex
ParamReference
Click to summarize M_IDENTITY_MATRIX

Specifies to use an identity matrix for the preregistration iteration. This means the source point cloud will not be transformed or rotated in any way during the preregistration iteration.

(summarize)
Click to summarize ParamIndex

This parameter must be set to M_DEFAULT.

Click to summarize MIL pairwise 3D registration context ID

Specifies the identifier of a pairwise 3D registration context from which to copy the rough location. The context must have been previously allocated using M3dregAlloc() with M_PAIRWISE_REGISTRATION_CONTEXT.

(summarize)
Click to summarize ParamIndex

Specifies the index of the registration element in the pairwise 3D registration context passed to the ParamId parameter.

(summarize)
Click to summarize M_DEFAULT

Specifies the same value passed to the Index parameter.

Click to summarize M_ALL

Specifies to copy all registration elements. ParamIndex must be set to M_ALL if Index is set to M_ALL.

(summarize)
Click to summarize 0 <= Value < M3dregInquire(ParamId,
M_NUMBER_OF_REGISTRATION_ELEMENTS)

Specifies the index of the registration element.

Click to summarize MIL pairwise 3D registration result buffer ID

Specifies the identifier of a pairwise 3D registration result buffer from which to copy the rough location. The result buffer must have been previously allocated using M3dregAllocResult() with M_PAIRWISE_REGISTRATION_RESULT.

(summarize)
Click to summarize ParamIndex

Specifies the index of the registration result element in the pairwise 3D registration result buffer passed to the ParamId parameter.

(summarize)
Click to summarize M_DEFAULT

Specifies the same value passed to the Index parameter.

Click to summarize M_ALL

Specifies to copy all registration result elements. ParamIndex must be set to M_ALL if Index is set to M_ALL.

(summarize)
Click to summarize 0 <= Value < M3dregInquire(ParamId,
M_NUMBER_OF_REGISTRATION_ELEMENTS)

Specifies the index of the registration result element.

Click to summarize ParamReference

Specifies the index of another registration result element in the 3D registration result buffer passed to ParamId. The transformation that registers the point cloud associated with ParamIndex, to the point cloud associated with ParamReference, is used as the rough location.

(summarize)
Click to summarize M_DEFAULT

Specifies the same value passed to the Reference parameter.

This parameter cannot be set to M_DEFAULT when the Reference parameter is set to M_COPY.

(summarize)
Click to summarize M_REGISTRATION_GLOBAL

Specifies the global coordinate system.

Click to summarize 0 <= Value < M3dregInquire(ParamId,
M_NUMBER_OF_REGISTRATION_ELEMENTS)

Specifies the index of the registration result element.

Click to summarize MIL transformation matrix object ID

Specifies the identifier of a transformation matrix object from which to copy the rough location. The transformation matrix object must have been previously allocated with M3dgeoAlloc() with M_TRANSFORMATION_MATRIX.

(summarize)
Click to summarize ParamIndex

This parameter must be set to M_DEFAULT.

Compilation information
Header Include mil.h.
Library Use mil.lib; mil3dreg.lib.
DLL Requires mil.dll; mil3dreg.dll.
ALL NUMBER OF REGISTRATION ELEMENTS) DEFAULT COPY LAST NEXT PREVIOUS REGISTRATION GLOBAL UNCHANGED NUMBER OF REGISTRATION ELEMENTS) IDENTITY MATRIX DEFAULT ALL NUMBER OF REGISTRATION ELEMENTS) DEFAULT ALL NUMBER OF REGISTRATION ELEMENTS) DEFAULT REGISTRATION GLOBAL NUMBER OF REGISTRATION ELEMENTS)