NifTK
16.4.1 - 0798f20
CMIC's Translational Medical Imaging Platform
|
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... | |
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.
niftk::VTKIterativeClosestPoint::VTKIterativeClosestPoint | ( | ) |
niftk::VTKIterativeClosestPoint::~VTKIterativeClosestPoint | ( | ) |
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.
Set the maximum number of ICP iterations, default 100.
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.
Set the number of TLS iterations, default 0.
If zero, (the default), this feature is off.
Set the TLS percentage [1 - 100], default 50.