NifTK  16.4.1 - 0798f20
CMIC's Translational Medical Imaging Platform
Public Member Functions | List of all members
niftk::VTKIterativeClosestPoint Class Reference

Uses vtkIterativeClosestPointTransform to register two vtkPolyData sets. More...

Public Member Functions

 VTKIterativeClosestPoint ()
 
 ~VTKIterativeClosestPoint ()
 
double Run ()
 Perform a vtk Iterative Closest Point (ICP) registration on the two data sets. More...
 
double GetRMSResidual (vtkPolyData &source) const
 Calculates the RMS residual, using the current transformation and the supplied source data-set. More...
 
vtkSmartPointer< vtkMatrix4x4 > GetTransform () const
 returns the transform to move the source to the target. More...
 
void ApplyTransform (vtkPolyData *solution)
 Transform the source to the target, placing the result in solution. More...
 
void SetSource (vtkSmartPointer< vtkPolyData >)
 Set the source poly data. More...
 
void SetTarget (vtkSmartPointer< vtkPolyData >)
 Set the target polydata. More...
 
void SetICPMaxLandmarks (unsigned int)
 Set the maximum number of ICP landmarks, default 50. More...
 
void SetICPMaxIterations (unsigned int)
 Set the maximum number of ICP iterations, default 100. More...
 
void SetTLSIterations (unsigned int)
 Set the number of TLS iterations, default 0. More...
 
void SetTLSPercentage (unsigned int)
 Set the TLS percentage [1 - 100], default 50. More...
 

Detailed Description

Uses vtkIterativeClosestPointTransform to register two vtkPolyData sets.

This class requires that one (normally target) contains cells. i.e. a surface of triangles for instance. If the source contains cells, but the target does not, the registration is reversed, and then once completed, the transform is inverted.

This class also implements a Trimmed Least Squares (TLS) approach, whereby the ICP is repeated. At each iteration, controlled by SetTLSIterations(), the best matching number of points, controlled by SetTLSPercentage() is retained, and the outliers are discarded.

Constructor & Destructor Documentation

niftk::VTKIterativeClosestPoint::VTKIterativeClosestPoint ( )
niftk::VTKIterativeClosestPoint::~VTKIterativeClosestPoint ( )

Member Function Documentation

void niftk::VTKIterativeClosestPoint::ApplyTransform ( vtkPolyData *  solution)

Transform the source to the target, placing the result in solution.

double niftk::VTKIterativeClosestPoint::GetRMSResidual ( vtkPolyData &  source) const

Calculates the RMS residual, using the current transformation and the supplied source data-set.

vtkSmartPointer< vtkMatrix4x4 > niftk::VTKIterativeClosestPoint::GetTransform ( ) const

returns the transform to move the source to the target.

double niftk::VTKIterativeClosestPoint::Run ( )

Perform a vtk Iterative Closest Point (ICP) registration on the two data sets.

Returns
the RMS residual error, using the full source dataset.
void niftk::VTKIterativeClosestPoint::SetICPMaxIterations ( unsigned int  maxIterations)

Set the maximum number of ICP iterations, default 100.

void niftk::VTKIterativeClosestPoint::SetICPMaxLandmarks ( unsigned int  maxLandMarks)

Set the maximum number of ICP landmarks, default 50.

void niftk::VTKIterativeClosestPoint::SetSource ( vtkSmartPointer< vtkPolyData >  source)

Set the source poly data.

void niftk::VTKIterativeClosestPoint::SetTarget ( vtkSmartPointer< vtkPolyData >  target)

Set the target polydata.

void niftk::VTKIterativeClosestPoint::SetTLSIterations ( unsigned int  iterations)

Set the number of TLS iterations, default 0.

If zero, (the default), this feature is off.

void niftk::VTKIterativeClosestPoint::SetTLSPercentage ( unsigned int  percentage)

Set the TLS percentage [1 - 100], default 50.


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