#include <vtkProcrustesAlignmentFilter.h>
vtkProcrustesAlignmentFilter is a filter that takes a set of pointsets (any object derived from vtkPointSet) and aligns them in a least-squares sense to their mutual mean. The algorithm is iterated until convergence, as the mean must be recomputed after each alignment.
Call SetNumberOfInputs(n) before calling SetInput(0) ... SetInput(n-1).
Retrieve the outputs using GetOutput(0) ... GetOutput(n-1).
The default (in vtkLandmarkTransform) is for a similarity alignment. For a rigid-body alignment (to build a 'size-and-shape' model) use:
GetLandmarkTransform()->SetModeToRigidBody().
Affine alignments are not normally used but are left in for completeness:
GetLandmarkTransform()->SetModeToAffine().
vtkProcrustesAlignmentFilter is an implementation of:
J.C. Gower (1975) Generalized Procrustes Analysis. Psychometrika, 40:33-51.
Definition at line 67 of file vtkProcrustesAlignmentFilter.h.
Reimplemented from vtkPointSetAlgorithm.
Definition at line 70 of file vtkProcrustesAlignmentFilter.h.
vtkProcrustesAlignmentFilter::vtkProcrustesAlignmentFilter | ( | ) | [protected] |
vtkProcrustesAlignmentFilter::~vtkProcrustesAlignmentFilter | ( | ) | [protected] |
virtual const char* vtkProcrustesAlignmentFilter::GetClassName | ( | ) | [virtual] |
Reimplemented from vtkPointSetAlgorithm.
static int vtkProcrustesAlignmentFilter::IsTypeOf | ( | const char * | name | ) | [static] |
Return 1 if this class type is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeMacro found in vtkSetGet.h.
Reimplemented from vtkPointSetAlgorithm.
virtual int vtkProcrustesAlignmentFilter::IsA | ( | const char * | name | ) | [virtual] |
Return 1 if this class is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeMacro found in vtkSetGet.h.
Reimplemented from vtkPointSetAlgorithm.
static vtkProcrustesAlignmentFilter* vtkProcrustesAlignmentFilter::SafeDownCast | ( | vtkObject * | o | ) | [static] |
Reimplemented from vtkPointSetAlgorithm.
void vtkProcrustesAlignmentFilter::PrintSelf | ( | ostream & | os, | |
vtkIndent | indent | |||
) | [virtual] |
Prints information about the state of the filter.
Reimplemented from vtkPointSetAlgorithm.
static vtkProcrustesAlignmentFilter* vtkProcrustesAlignmentFilter::New | ( | ) | [static] |
Creates with similarity transform.
Reimplemented from vtkPointSetAlgorithm.
virtual vtkLandmarkTransform* vtkProcrustesAlignmentFilter::GetLandmarkTransform | ( | ) | [virtual] |
Get the internal landmark transform. Use it to constrain the number of degrees of freedom of the alignment (i.e. rigid body, similarity, etc.). The default is a similarity alignment.
virtual vtkPoints* vtkProcrustesAlignmentFilter::GetMeanPoints | ( | ) | [virtual] |
Get the estimated mean point cloud
void vtkProcrustesAlignmentFilter::SetNumberOfInputs | ( | int | n | ) |
Specify how many pointsets are going to be given as input.
void vtkProcrustesAlignmentFilter::SetInput | ( | int | idx, | |
vtkPointSet * | p | |||
) |
Specify the input pointset with index idx. Call SetNumberOfInputs before calling this function.
Reimplemented from vtkPointSetAlgorithm.
void vtkProcrustesAlignmentFilter::SetInput | ( | int | idx, | |
vtkDataObject * | input | |||
) |
Specify the input pointset with index idx. Call SetNumberOfInputs before calling this function.
Reimplemented from vtkPointSetAlgorithm.
virtual void vtkProcrustesAlignmentFilter::SetStartFromCentroid | ( | bool | ) | [virtual] |
When on, the initial alignment is to the centroid of the cohort curves. When off, the alignment is to the centroid of the first input. Default is off for backward compatibility.
virtual bool vtkProcrustesAlignmentFilter::GetStartFromCentroid | ( | ) | [virtual] |
When on, the initial alignment is to the centroid of the cohort curves. When off, the alignment is to the centroid of the first input. Default is off for backward compatibility.
virtual void vtkProcrustesAlignmentFilter::StartFromCentroidOn | ( | ) | [virtual] |
When on, the initial alignment is to the centroid of the cohort curves. When off, the alignment is to the centroid of the first input. Default is off for backward compatibility.
virtual void vtkProcrustesAlignmentFilter::StartFromCentroidOff | ( | ) | [virtual] |
When on, the initial alignment is to the centroid of the cohort curves. When off, the alignment is to the centroid of the first input. Default is off for backward compatibility.
vtkPointSet* vtkProcrustesAlignmentFilter::GetInput | ( | int | idx | ) |
Retrieve the input point set with index idx (usually only for pipeline tracing).
virtual int vtkProcrustesAlignmentFilter::RequestData | ( | vtkInformation * | , | |
vtkInformationVector ** | , | |||
vtkInformationVector * | ||||
) | [protected, virtual] |
Usual data generation method.
Reimplemented from vtkPointSetAlgorithm.
virtual int vtkProcrustesAlignmentFilter::FillInputPortInformation | ( | int | port, | |
vtkInformation * | info | |||
) | [protected, virtual] |
Fill the input port information objects for this algorithm. This is invoked by the first call to GetInputPortInformation for each port so subclasses can specify what they can handle.
Reimplemented from vtkPointSetAlgorithm.
Definition at line 122 of file vtkProcrustesAlignmentFilter.h.
bool vtkProcrustesAlignmentFilter::StartFromCentroid [protected] |
Definition at line 124 of file vtkProcrustesAlignmentFilter.h.
vtkPoints* vtkProcrustesAlignmentFilter::MeanPoints [protected] |
Definition at line 126 of file vtkProcrustesAlignmentFilter.h.