Medical Imaging Interaction Toolkit  2024.12.99-0da743f6
Medical Imaging Interaction Toolkit
mitk::WeightedPointTransform Class Reference

This class implements an extension of the weighted point based registration algorithm from A. Danilchenko, R. Balachandran and J. M. Fitzpatrick. More...

#include <mitkWeightedPointTransform.h>

Inheritance diagram for mitk::WeightedPointTransform:
Collaboration diagram for mitk::WeightedPointTransform:

Public Member Functions

 mitkClassMacroItkParent (WeightedPointTransform, itk::Object)
 
Pointer Clone () const
 
void ComputeTransformation ()
 Method which registers both point sets. More...
 
virtual void SetThreshold (double _arg)
 Sets the threshold of the registration. Default value is 0.0001. More...
 
virtual void SetMaxIterations (double _arg)
 Sets the maximum number of iterations of the registration. Default value is 1000. More...
 
virtual int GetIterations ()
 
virtual double GetFRE ()
 
virtual void SetFRENormalizationFactor (double _arg)
 Sets the FRE normalization factor. Default value is 1.0. More...
 
virtual double GetFRENormalizationFactor ()
 
void SetMovingPointSet (vtkSmartPointer< vtkPoints > p)
 
void SetCovarianceMatricesMoving (const CovarianceMatrixList &matrices)
 
void SetFixedPointSet (vtkSmartPointer< vtkPoints > p)
 
void SetCovarianceMatricesFixed (const CovarianceMatrixList &matrices)
 
const Translation & GetTransformT () const
 
const Rotation & GetTransformR () const
 

Static Public Member Functions

static Pointer New ()
 

Protected Member Functions

 WeightedPointTransform ()
 
 ~WeightedPointTransform () override
 
void C_maker (vtkPoints *X, const WeightMatrixList &W, itk::VariableSizeMatrix< double > &returnValue)
 
void E_maker (vtkPoints *X, vtkPoints *Y, const WeightMatrixList &W, vnl_vector< double > &returnValue)
 
double CalculateConfigChange (vtkPoints *X, vtkPoints *X_new)
 
void WeightedPointRegister (vtkPoints *X, vtkPoints *Y, const CovarianceMatrixList &Sigma_X, const CovarianceMatrixList &Sigma_Y, double Threshold, int MaxIterations, Rotation &TransformationR, Translation &TransformationT, double &FRE, int &n)
 This method performs a variant of the weighted point register algorithm presented by A. Danilchenko, R. Balachandran and J. M. Fitzpatrick in January 2010. (Modified in January 2011) converted to C++ by Alfred Franz in March/April 2010. More...
 

Protected Attributes

double m_Threshold
 
int m_MaxIterations
 
int m_Iterations
 
double m_FRE
 
double m_FRENormalizationFactor
 
vtkSmartPointer< vtkLandmarkTransform > m_LandmarkTransform
 
vtkSmartPointer< vtkPoints > m_FixedPointSet
 
vtkSmartPointer< vtkPoints > m_MovingPointSet
 
CovarianceMatrixList m_CovarianceMatricesMoving
 
CovarianceMatrixList m_CovarianceMatricesFixed
 
Translation m_Translation
 
Rotation m_Rotation
 

Detailed Description

This class implements an extension of the weighted point based registration algorithm from A. Danilchenko, R. Balachandran and J. M. Fitzpatrick.

The class implements an extension of the weighted point based registration from A. Danilchenko et al. presented by L. Maier-Hein et al. in "Convergent Iterative Closest-Point Algorithm to Accommodate Anisotropic and Inhomogenous Localization Error.", IEEE T Pattern Anal 34 (8), 1520-1532, 2012. The extension computes, in order to ensure the convergence of the algorithm, an isotropic estimation by an unweighted point based registration algorithm as an initial estimate. The implemantion was originally ported to C/C++ by A. Franz.

Note
Some methods are accelerated when OpenMP is enabled.

Definition at line 52 of file mitkWeightedPointTransform.h.

Constructor & Destructor Documentation

◆ WeightedPointTransform()

mitk::WeightedPointTransform::WeightedPointTransform ( )
protected

◆ ~WeightedPointTransform()

mitk::WeightedPointTransform::~WeightedPointTransform ( )
overrideprotected

Member Function Documentation

◆ C_maker()

void mitk::WeightedPointTransform::C_maker ( vtkPoints *  X,
const WeightMatrixList &  W,
itk::VariableSizeMatrix< double > &  returnValue 
)
protected

original matlab-function:

Constructs the C matrix of the linear version of the registration problem, Cq = e, where q = [delta_angle(1:3),delta_translation(1:3)] and e is produced by e_maker(X,Y,W)

Authors: JM Fitzpatrick and R Balachandran Creation: February 2009


converted to C++ by Alfred Franz in March/April 2010

◆ CalculateConfigChange()

double mitk::WeightedPointTransform::CalculateConfigChange ( vtkPoints *  X,
vtkPoints *  X_new 
)
protected

This method computes the change in a root mean squared sense between the previous and the actual iteration. The computed value is used as a termination constraint of the algorithm and compared against the threshold.

Parameters
XThe moving point set in the previous iteration step.
X_newThe moving point set in the actual step.
Returns
The computed change between the two point sets.

◆ Clone()

Pointer mitk::WeightedPointTransform::Clone ( ) const

◆ ComputeTransformation()

void mitk::WeightedPointTransform::ComputeTransformation ( )

Method which registers both point sets.

◆ E_maker()

void mitk::WeightedPointTransform::E_maker ( vtkPoints *  X,
vtkPoints *  Y,
const WeightMatrixList &  W,
vnl_vector< double > &  returnValue 
)
protected

original matlab-function:

Constructs the e vector of the linear version of the registration problem, Cq = e, where q = [delta_angle(1:3),delta_translation(1:3)] and C is produced by C_maker(X,W)

Authors: JM Fitzpatrick and R Balachandran Creation: February 2009


converted to C++ by Alfred Franz in March/April 2010

◆ GetFRE()

virtual double mitk::WeightedPointTransform::GetFRE ( )
virtual
Returns
Returns the FRE of the last run of the registration algorithm. Returns -1 if there was no run of the registration yet.

◆ GetFRENormalizationFactor()

virtual double mitk::WeightedPointTransform::GetFRENormalizationFactor ( )
virtual
Returns
Returns the current FRE normalization factor.

◆ GetIterations()

virtual int mitk::WeightedPointTransform::GetIterations ( )
virtual
Returns
Returns the number of iterations of the last run of the registration algorithm. Returns -1 if there was no run of the registration yet.

◆ GetTransformR()

const Rotation& mitk::WeightedPointTransform::GetTransformR ( ) const
inline

The rotation matrix computed by the algorithm.

Definition at line 130 of file mitkWeightedPointTransform.h.

◆ GetTransformT()

const Translation& mitk::WeightedPointTransform::GetTransformT ( ) const
inline

The translation vector computed by the algorithm.

Returns
3x1 translation vector.

Definition at line 126 of file mitkWeightedPointTransform.h.

◆ mitkClassMacroItkParent()

mitk::WeightedPointTransform::mitkClassMacroItkParent ( WeightedPointTransform  ,
itk::Object   
)

◆ New()

static Pointer mitk::WeightedPointTransform::New ( )
static

◆ SetCovarianceMatricesFixed()

void mitk::WeightedPointTransform::SetCovarianceMatricesFixed ( const CovarianceMatrixList &  matrices)

Set the list of 3x3 covariance matrices belonging to the fixed point set.

Parameters
matricesList of covariance matrices.

◆ SetCovarianceMatricesMoving()

void mitk::WeightedPointTransform::SetCovarianceMatricesMoving ( const CovarianceMatrixList &  matrices)

Set the list of 3x3 covariance matrices belonging to the moving point set.

Parameters
matricesList of covariance matrices.

◆ SetFixedPointSet()

void mitk::WeightedPointTransform::SetFixedPointSet ( vtkSmartPointer< vtkPoints >  p)

Sets the fixed point set used for the registration.

Parameters
pThe input point set.

◆ SetFRENormalizationFactor()

virtual void mitk::WeightedPointTransform::SetFRENormalizationFactor ( double  _arg)
virtual

Sets the FRE normalization factor. Default value is 1.0.

◆ SetMaxIterations()

virtual void mitk::WeightedPointTransform::SetMaxIterations ( double  _arg)
virtual

Sets the maximum number of iterations of the registration. Default value is 1000.

◆ SetMovingPointSet()

void mitk::WeightedPointTransform::SetMovingPointSet ( vtkSmartPointer< vtkPoints >  p)

Sets the moving point set used for the registration.

Parameters
pThe input point set.

◆ SetThreshold()

virtual void mitk::WeightedPointTransform::SetThreshold ( double  _arg)
virtual

Sets the threshold of the registration. Default value is 0.0001.

◆ WeightedPointRegister()

void mitk::WeightedPointTransform::WeightedPointRegister ( vtkPoints *  X,
vtkPoints *  Y,
const CovarianceMatrixList &  Sigma_X,
const CovarianceMatrixList &  Sigma_Y,
double  Threshold,
int  MaxIterations,
Rotation &  TransformationR,
Translation &  TransformationT,
double &  FRE,
int &  n 
)
protected

This method performs a variant of the weighted point register algorithm presented by A. Danilchenko, R. Balachandran and J. M. Fitzpatrick in January 2010. (Modified in January 2011) converted to C++ by Alfred Franz in March/April 2010.

Parameters
X(input) the moving point set
Y(input) the fixed (static) point set
Sigma_X(input) a 3-by-3-by-N array, each page containing the weighting matrix for the Nth pair of points in X
Sigma_Y(input) a 3-by-3-by-N array, each page containing the weighting matrix for the Nth pair of points in Y
Threshold(input) the relative size of the change to the moving set above which the iteration continues
MaxIterations(input) the maximum number of iterations allowed
TransformationR(output) this variable will hold the computed rotation matrix
TransformationT(output) this variable will hold the computed translation vector
FRE(output) this variable will hold the computed rotation FRE of the transformation
n(output) this variable will hold the number of iterations used by the algorithm

Member Data Documentation

◆ m_CovarianceMatricesFixed

CovarianceMatrixList mitk::WeightedPointTransform::m_CovarianceMatricesFixed
protected

Covariance matrices of the moving point set (Sigma_Y).

Definition at line 163 of file mitkWeightedPointTransform.h.

◆ m_CovarianceMatricesMoving

CovarianceMatrixList mitk::WeightedPointTransform::m_CovarianceMatricesMoving
protected

Covariance matrices of the moving point set (Sigma_X).

Definition at line 160 of file mitkWeightedPointTransform.h.

◆ m_FixedPointSet

vtkSmartPointer<vtkPoints> mitk::WeightedPointTransform::m_FixedPointSet
protected

The fixed point set (Y).

Definition at line 154 of file mitkWeightedPointTransform.h.

◆ m_FRE

double mitk::WeightedPointTransform::m_FRE
protected

The fiducial registration error (FRE) used in the algorithm.

Definition at line 145 of file mitkWeightedPointTransform.h.

◆ m_FRENormalizationFactor

double mitk::WeightedPointTransform::m_FRENormalizationFactor
protected

Normalization factor for the FRE.

Definition at line 148 of file mitkWeightedPointTransform.h.

◆ m_Iterations

int mitk::WeightedPointTransform::m_Iterations
protected

The amount of iterations needed by the algorithm.

Definition at line 142 of file mitkWeightedPointTransform.h.

◆ m_LandmarkTransform

vtkSmartPointer<vtkLandmarkTransform> mitk::WeightedPointTransform::m_LandmarkTransform
protected

Isotropic point based registration used for initial estimate.

Definition at line 151 of file mitkWeightedPointTransform.h.

◆ m_MaxIterations

int mitk::WeightedPointTransform::m_MaxIterations
protected

Max allowed iterations used by the algorithm.

Definition at line 139 of file mitkWeightedPointTransform.h.

◆ m_MovingPointSet

vtkSmartPointer<vtkPoints> mitk::WeightedPointTransform::m_MovingPointSet
protected

Moving point set (X).

Definition at line 157 of file mitkWeightedPointTransform.h.

◆ m_Rotation

Rotation mitk::WeightedPointTransform::m_Rotation
protected

3x3 rotation matrix.

Definition at line 169 of file mitkWeightedPointTransform.h.

◆ m_Threshold

double mitk::WeightedPointTransform::m_Threshold
protected

Threshold used to terminate the algorithm.

Definition at line 136 of file mitkWeightedPointTransform.h.

◆ m_Translation

Translation mitk::WeightedPointTransform::m_Translation
protected

3x1 translation vector.

Definition at line 166 of file mitkWeightedPointTransform.h.


The documentation for this class was generated from the following file: