cisst-saw
Loading...
Searching...
No Matches
nmrRegistrationRigid.h File Reference

Go to the source code of this file.

Functions

template<class _vectorOwnerType>
bool CISST_EXPORT nmrRegistrationRigid (vctDynamicConstVectorBase< _vectorOwnerType, vct3 > &dataSet1, vctDynamicConstVectorBase< _vectorOwnerType, vct3 > &dataSet2, vctFrm3 &transform, double *fre=0)

Function Documentation

◆ nmrRegistrationRigid()

template<class _vectorOwnerType>
bool CISST_EXPORT nmrRegistrationRigid ( vctDynamicConstVectorBase< _vectorOwnerType, vct3 > & dataSet1,
vctDynamicConstVectorBase< _vectorOwnerType, vct3 > & dataSet2,
vctFrm3 & transform,
double * fre = 0 )

Perform a paired-point rigid registration using the SVD method proposed by Arun(1987) and modified by Umeyama(1991).

Parameters
dataSet1The first set of fiducial points
dataSet2The second set of fiducial points
transformThe computed transformation from dataSet1 to dataSet2
frePointer to location to store Fiducial Registration Error (FRE), if not 0.
Returns
true if registration successful
Note
This function is templated so that it will work when the data sets are of type vctDynamicConstVectorRef or vctDynamicConstVector. The explicit template instantiations are in the cpp file.

This function is wrapped for Python, as follows:

(transform, fre) = nmrRigidRegistration(dataSet1, dataSet2)

where dataSet1 and dataSet2 are 2D numpy arrays, such as ((1.0, 2.0, 3.0), (4.0, 5.0, 6.0), ...). The Python function throws an exception if registration fails for any reason, including problems with the input data (e.g., data sets not the same number of points).