VTK
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
vtkIterativeClosestPointTransform Class Reference

Implementation of the ICP algorithm. More...

#include <vtkIterativeClosestPointTransform.h>

Inheritance diagram for vtkIterativeClosestPointTransform:
[legend]
Collaboration diagram for vtkIterativeClosestPointTransform:
[legend]

Public Types

typedef vtkLinearTransform Superclass
 
- Public Types inherited from vtkLinearTransform
typedef vtkHomogeneousTransform Superclass
 
- Public Types inherited from vtkHomogeneousTransform
typedef vtkAbstractTransform Superclass
 
- Public Types inherited from vtkAbstractTransform
typedef vtkObject Superclass
 
- Public Types inherited from vtkObject
typedef vtkObjectBase Superclass
 

Public Member Functions

virtual int IsA (const char *type)
 
vtkIterativeClosestPointTransformNewInstance () const
 
void PrintSelf (ostream &os, vtkIndent indent)
 
void Inverse ()
 
vtkAbstractTransformMakeTransform ()
 
void SetSource (vtkDataSet *source)
 
void SetTarget (vtkDataSet *target)
 
virtual vtkDataSetGetSource ()
 
virtual vtkDataSetGetTarget ()
 
void SetLocator (vtkCellLocator *locator)
 
virtual vtkCellLocatorGetLocator ()
 
virtual void SetMaximumNumberOfIterations (int)
 
virtual int GetMaximumNumberOfIterations ()
 
virtual int GetNumberOfIterations ()
 
virtual void SetCheckMeanDistance (int)
 
virtual int GetCheckMeanDistance ()
 
virtual void CheckMeanDistanceOn ()
 
virtual void CheckMeanDistanceOff ()
 
virtual void SetMeanDistanceMode (int)
 
virtual int GetMeanDistanceMode ()
 
void SetMeanDistanceModeToRMS ()
 
void SetMeanDistanceModeToAbsoluteValue ()
 
const char * GetMeanDistanceModeAsString ()
 
virtual void SetMaximumMeanDistance (double)
 
virtual double GetMaximumMeanDistance ()
 
virtual double GetMeanDistance ()
 
virtual void SetMaximumNumberOfLandmarks (int)
 
virtual int GetMaximumNumberOfLandmarks ()
 
virtual void SetStartByMatchingCentroids (int)
 
virtual int GetStartByMatchingCentroids ()
 
virtual void StartByMatchingCentroidsOn ()
 
virtual void StartByMatchingCentroidsOff ()
 
virtual vtkLandmarkTransformGetLandmarkTransform ()
 
- Public Member Functions inherited from vtkLinearTransform
vtkLinearTransformNewInstance () const
 
void PrintSelf (ostream &os, vtkIndent indent)
 
void TransformPoints (vtkPoints *inPts, vtkPoints *outPts)
 
virtual void TransformNormals (vtkDataArray *inNms, vtkDataArray *outNms)
 
virtual void TransformVectors (vtkDataArray *inVrs, vtkDataArray *outVrs)
 
void TransformNormal (const float in[3], float out[3])
 
void TransformNormal (const double in[3], double out[3])
 
doubleTransformNormal (double x, double y, double z)
 
doubleTransformNormal (const double normal[3])
 
floatTransformFloatNormal (float x, float y, float z)
 
floatTransformFloatNormal (const float normal[3])
 
doubleTransformDoubleNormal (double x, double y, double z)
 
doubleTransformDoubleNormal (const double normal[3])
 
doubleTransformVector (double x, double y, double z)
 
doubleTransformVector (const double normal[3])
 
void TransformVector (const float in[3], float out[3])
 
void TransformVector (const double in[3], double out[3])
 
floatTransformFloatVector (float x, float y, float z)
 
floatTransformFloatVector (const float vec[3])
 
doubleTransformDoubleVector (double x, double y, double z)
 
doubleTransformDoubleVector (const double vec[3])
 
void TransformPointsNormalsVectors (vtkPoints *inPts, vtkPoints *outPts, vtkDataArray *inNms, vtkDataArray *outNms, vtkDataArray *inVrs, vtkDataArray *outVrs)
 
vtkLinearTransformGetLinearInverse ()
 
void InternalTransformPoint (const float in[3], float out[3])
 
void InternalTransformPoint (const double in[3], double out[3])
 
virtual void InternalTransformNormal (const float in[3], float out[3])
 
virtual void InternalTransformNormal (const double in[3], double out[3])
 
virtual void InternalTransformVector (const float in[3], float out[3])
 
virtual void InternalTransformVector (const double in[3], double out[3])
 
void InternalTransformDerivative (const float in[3], float out[3], float derivative[3][3])
 
void InternalTransformDerivative (const double in[3], double out[3], double derivative[3][3])
 
- Public Member Functions inherited from vtkHomogeneousTransform
vtkHomogeneousTransformNewInstance () const
 
void GetMatrix (vtkMatrix4x4 *m)
 
vtkMatrix4x4GetMatrix ()
 
vtkHomogeneousTransformGetHomogeneousInverse ()
 
- Public Member Functions inherited from vtkAbstractTransform
vtkAbstractTransformNewInstance () const
 
doubleTransformNormalAtPoint (const double point[3], const double normal[3])
 
doubleTransformVectorAtPoint (const double point[3], const double vector[3])
 
vtkAbstractTransformGetInverse ()
 
void SetInverse (vtkAbstractTransform *transform)
 
void DeepCopy (vtkAbstractTransform *)
 
void Update ()
 
virtual int CircuitCheck (vtkAbstractTransform *transform)
 
unsigned long GetMTime ()
 
virtual void UnRegister (vtkObjectBase *O)
 
void TransformPoint (const float in[3], float out[3])
 
void TransformPoint (const double in[3], double out[3])
 
doubleTransformPoint (double x, double y, double z)
 
doubleTransformPoint (const double point[3])
 
floatTransformFloatPoint (float x, float y, float z)
 
floatTransformFloatPoint (const float point[3])
 
doubleTransformDoublePoint (double x, double y, double z)
 
doubleTransformDoublePoint (const double point[3])
 
void TransformNormalAtPoint (const float point[3], const float in[3], float out[3])
 
void TransformNormalAtPoint (const double point[3], const double in[3], double out[3])
 
doubleTransformDoubleNormalAtPoint (const double point[3], const double normal[3])
 
floatTransformFloatNormalAtPoint (const float point[3], const float normal[3])
 
void TransformVectorAtPoint (const float point[3], const float in[3], float out[3])
 
void TransformVectorAtPoint (const double point[3], const double in[3], double out[3])
 
doubleTransformDoubleVectorAtPoint (const double point[3], const double vector[3])
 
floatTransformFloatVectorAtPoint (const float point[3], const float vector[3])
 
- Public Member Functions inherited from vtkObject
vtkObjectNewInstance () const
 
virtual void DebugOn ()
 
virtual void DebugOff ()
 
bool GetDebug ()
 
void SetDebug (bool debugFlag)
 
virtual void Modified ()
 
unsigned long AddObserver (unsigned long event, vtkCommand *, float priority=0.0f)
 
unsigned long AddObserver (const char *event, vtkCommand *, float priority=0.0f)
 
vtkCommandGetCommand (unsigned long tag)
 
void RemoveObserver (vtkCommand *)
 
void RemoveObservers (unsigned long event, vtkCommand *)
 
void RemoveObservers (const char *event, vtkCommand *)
 
int HasObserver (unsigned long event, vtkCommand *)
 
int HasObserver (const char *event, vtkCommand *)
 
void RemoveObserver (unsigned long tag)
 
void RemoveObservers (unsigned long event)
 
void RemoveObservers (const char *event)
 
void RemoveAllObservers ()
 
int HasObserver (unsigned long event)
 
int HasObserver (const char *event)
 
template<class U , class T >
unsigned long AddObserver (unsigned long event, U observer, void(T::*callback)(), float priority=0.0f)
 
template<class U , class T >
unsigned long AddObserver (unsigned long event, U observer, void(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f)
 
template<class U , class T >
unsigned long AddObserver (unsigned long event, U observer, bool(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f)
 
int InvokeEvent (unsigned long event, void *callData)
 
int InvokeEvent (const char *event, void *callData)
 
int InvokeEvent (unsigned long event)
 
int InvokeEvent (const char *event)
 
- Public Member Functions inherited from vtkObjectBase
const char * GetClassName () const
 
virtual void Delete ()
 
virtual void FastDelete ()
 
void Print (ostream &os)
 
virtual void Register (vtkObjectBase *o)
 
void SetReferenceCount (int)
 
void PrintRevisions (ostream &)
 
virtual void PrintHeader (ostream &os, vtkIndent indent)
 
virtual void PrintTrailer (ostream &os, vtkIndent indent)
 
int GetReferenceCount ()
 

Static Public Member Functions

static vtkIterativeClosestPointTransformNew ()
 
static int IsTypeOf (const char *type)
 
static vtkIterativeClosestPointTransformSafeDownCast (vtkObjectBase *o)
 
- Static Public Member Functions inherited from vtkLinearTransform
static int IsTypeOf (const char *type)
 
static vtkLinearTransformSafeDownCast (vtkObjectBase *o)
 
- Static Public Member Functions inherited from vtkHomogeneousTransform
static int IsTypeOf (const char *type)
 
static vtkHomogeneousTransformSafeDownCast (vtkObjectBase *o)
 
- Static Public Member Functions inherited from vtkAbstractTransform
static int IsTypeOf (const char *type)
 
static vtkAbstractTransformSafeDownCast (vtkObjectBase *o)
 
- Static Public Member Functions inherited from vtkObject
static int IsTypeOf (const char *type)
 
static vtkObjectSafeDownCast (vtkObjectBase *o)
 
static vtkObjectNew ()
 
static void BreakOnError ()
 
static void SetGlobalWarningDisplay (int val)
 
static void GlobalWarningDisplayOn ()
 
static void GlobalWarningDisplayOff ()
 
static int GetGlobalWarningDisplay ()
 
- Static Public Member Functions inherited from vtkObjectBase
static int IsTypeOf (const char *name)
 
static vtkObjectBaseNew ()
 

Protected Member Functions

virtual vtkObjectBaseNewInstanceInternal () const
 
void ReleaseLocator (void)
 
void CreateDefaultLocator (void)
 
unsigned long int GetMTime ()
 
 vtkIterativeClosestPointTransform ()
 
 ~vtkIterativeClosestPointTransform ()
 
void InternalUpdate ()
 
void InternalDeepCopy (vtkAbstractTransform *transform)
 
void ReleaseSource (void)
 
void ReleaseTarget (void)
 
- Protected Member Functions inherited from vtkLinearTransform
 vtkLinearTransform ()
 
 ~vtkLinearTransform ()
 
- Protected Member Functions inherited from vtkHomogeneousTransform
 vtkHomogeneousTransform ()
 
 ~vtkHomogeneousTransform ()
 
void InternalDeepCopy (vtkAbstractTransform *transform)
 
- Protected Member Functions inherited from vtkAbstractTransform
 vtkAbstractTransform ()
 
 ~vtkAbstractTransform ()
 
- Protected Member Functions inherited from vtkObject
 vtkObject ()
 
virtual ~vtkObject ()
 
virtual void RegisterInternal (vtkObjectBase *, int check)
 
virtual void UnRegisterInternal (vtkObjectBase *, int check)
 
void InternalGrabFocus (vtkCommand *mouseEvents, vtkCommand *keypressEvents=NULL)
 
void InternalReleaseFocus ()
 
- Protected Member Functions inherited from vtkObjectBase
 vtkObjectBase ()
 
virtual ~vtkObjectBase ()
 
virtual void CollectRevisions (ostream &)
 
virtual void ReportReferences (vtkGarbageCollector *)
 
 vtkObjectBase (const vtkObjectBase &)
 
void operator= (const vtkObjectBase &)
 

Protected Attributes

vtkDataSetSource
 
vtkDataSetTarget
 
vtkCellLocatorLocator
 
int MaximumNumberOfIterations
 
int CheckMeanDistance
 
int MeanDistanceMode
 
double MaximumMeanDistance
 
int MaximumNumberOfLandmarks
 
int StartByMatchingCentroids
 
int NumberOfIterations
 
double MeanDistance
 
vtkLandmarkTransformLandmarkTransform
 
- Protected Attributes inherited from vtkHomogeneousTransform
vtkMatrix4x4Matrix
 
- Protected Attributes inherited from vtkAbstractTransform
float InternalFloatPoint [3]
 
double InternalDoublePoint [3]
 
- Protected Attributes inherited from vtkObject
bool Debug
 
vtkTimeStamp MTime
 
vtkSubjectHelper * SubjectHelper
 
- Protected Attributes inherited from vtkObjectBase
vtkAtomicInt32 ReferenceCount
 
vtkWeakPointerBase ** WeakPointers
 

Detailed Description

Implementation of the ICP algorithm.

Match two surfaces using the iterative closest point (ICP) algorithm. The core of the algorithm is to match each vertex in one surface with the closest surface point on the other, then apply the transformation that modify one surface to best match the other (in a least square sense). This has to be iterated to get proper convergence of the surfaces.

Attention
Use vtkTransformPolyDataFilter to apply the resulting ICP transform to your data. You might also set it to your actor's user transform.
This class makes use of vtkLandmarkTransform internally to compute the best fit. Use the GetLandmarkTransform member to get a pointer to that transform and set its parameters. You might, for example, constrain the number of degrees of freedom of the solution (i.e. rigid body, similarity, etc.) by checking the vtkLandmarkTransform documentation for its SetMode member.
See also
vtkLandmarkTransform
Tests:
vtkIterativeClosestPointTransform (Tests)

Definition at line 54 of file vtkIterativeClosestPointTransform.h.

Member Typedef Documentation

Definition at line 58 of file vtkIterativeClosestPointTransform.h.

Constructor & Destructor Documentation

vtkIterativeClosestPointTransform::vtkIterativeClosestPointTransform ( )
protected
vtkIterativeClosestPointTransform::~vtkIterativeClosestPointTransform ( )
protected

Member Function Documentation

static vtkIterativeClosestPointTransform* vtkIterativeClosestPointTransform::New ( )
static
static int vtkIterativeClosestPointTransform::IsTypeOf ( const char *  type)
static
virtual int vtkIterativeClosestPointTransform::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 vtkLinearTransform.

static vtkIterativeClosestPointTransform* vtkIterativeClosestPointTransform::SafeDownCast ( vtkObjectBase o)
static
virtual vtkObjectBase* vtkIterativeClosestPointTransform::NewInstanceInternal ( ) const
protectedvirtual

Reimplemented from vtkLinearTransform.

vtkIterativeClosestPointTransform* vtkIterativeClosestPointTransform::NewInstance ( ) const
void vtkIterativeClosestPointTransform::PrintSelf ( ostream &  os,
vtkIndent  indent 
)
virtual

Methods invoked by print to print information about the object including superclasses. Typically not called by the user (use Print() instead) but used in the hierarchical print process to combine the output of several classes.

Reimplemented from vtkObject.

void vtkIterativeClosestPointTransform::SetSource ( vtkDataSet source)

Specify the source and target data sets.

void vtkIterativeClosestPointTransform::SetTarget ( vtkDataSet target)

Specify the source and target data sets.

virtual vtkDataSet* vtkIterativeClosestPointTransform::GetSource ( )
virtual

Specify the source and target data sets.

virtual vtkDataSet* vtkIterativeClosestPointTransform::GetTarget ( )
virtual

Specify the source and target data sets.

void vtkIterativeClosestPointTransform::SetLocator ( vtkCellLocator locator)

Set/Get a spatial locator for speeding up the search process. An instance of vtkCellLocator is used by default.

virtual vtkCellLocator* vtkIterativeClosestPointTransform::GetLocator ( )
virtual

Set/Get a spatial locator for speeding up the search process. An instance of vtkCellLocator is used by default.

virtual void vtkIterativeClosestPointTransform::SetMaximumNumberOfIterations ( int  )
virtual

Set/Get the maximum number of iterations. Default is 50.

virtual int vtkIterativeClosestPointTransform::GetMaximumNumberOfIterations ( )
virtual

Set/Get the maximum number of iterations. Default is 50.

virtual int vtkIterativeClosestPointTransform::GetNumberOfIterations ( )
virtual

Get the number of iterations since the last update

virtual void vtkIterativeClosestPointTransform::SetCheckMeanDistance ( int  )
virtual

Force the algorithm to check the mean distance between two iterations. Default is Off.

virtual int vtkIterativeClosestPointTransform::GetCheckMeanDistance ( )
virtual

Force the algorithm to check the mean distance between two iterations. Default is Off.

virtual void vtkIterativeClosestPointTransform::CheckMeanDistanceOn ( )
virtual

Force the algorithm to check the mean distance between two iterations. Default is Off.

virtual void vtkIterativeClosestPointTransform::CheckMeanDistanceOff ( )
virtual

Force the algorithm to check the mean distance between two iterations. Default is Off.

virtual void vtkIterativeClosestPointTransform::SetMeanDistanceMode ( int  )
virtual

Specify the mean distance mode. This mode expresses how the mean distance is computed. The RMS mode is the square root of the average of the sum of squares of the closest point distances. The Absolute Value mode is the mean of the sum of absolute values of the closest point distances. The default is VTK_ICP_MODE_RMS

virtual int vtkIterativeClosestPointTransform::GetMeanDistanceMode ( )
virtual

Specify the mean distance mode. This mode expresses how the mean distance is computed. The RMS mode is the square root of the average of the sum of squares of the closest point distances. The Absolute Value mode is the mean of the sum of absolute values of the closest point distances. The default is VTK_ICP_MODE_RMS

void vtkIterativeClosestPointTransform::SetMeanDistanceModeToRMS ( )
inline

Specify the mean distance mode. This mode expresses how the mean distance is computed. The RMS mode is the square root of the average of the sum of squares of the closest point distances. The Absolute Value mode is the mean of the sum of absolute values of the closest point distances. The default is VTK_ICP_MODE_RMS

Definition at line 104 of file vtkIterativeClosestPointTransform.h.

void vtkIterativeClosestPointTransform::SetMeanDistanceModeToAbsoluteValue ( )
inline

Specify the mean distance mode. This mode expresses how the mean distance is computed. The RMS mode is the square root of the average of the sum of squares of the closest point distances. The Absolute Value mode is the mean of the sum of absolute values of the closest point distances. The default is VTK_ICP_MODE_RMS

Definition at line 106 of file vtkIterativeClosestPointTransform.h.

const char* vtkIterativeClosestPointTransform::GetMeanDistanceModeAsString ( )

Specify the mean distance mode. This mode expresses how the mean distance is computed. The RMS mode is the square root of the average of the sum of squares of the closest point distances. The Absolute Value mode is the mean of the sum of absolute values of the closest point distances. The default is VTK_ICP_MODE_RMS

virtual void vtkIterativeClosestPointTransform::SetMaximumMeanDistance ( double  )
virtual

Set/Get the maximum mean distance between two iteration. If the mean distance is lower than this, the convergence stops. The default is 0.01.

virtual double vtkIterativeClosestPointTransform::GetMaximumMeanDistance ( )
virtual

Set/Get the maximum mean distance between two iteration. If the mean distance is lower than this, the convergence stops. The default is 0.01.

virtual double vtkIterativeClosestPointTransform::GetMeanDistance ( )
virtual

Get the mean distance between the last two iterations.

virtual void vtkIterativeClosestPointTransform::SetMaximumNumberOfLandmarks ( int  )
virtual

Set/Get the maximum number of landmarks sampled in your dataset. If your dataset is dense, then you will typically not need all the points to compute the ICP transform. The default is 200.

virtual int vtkIterativeClosestPointTransform::GetMaximumNumberOfLandmarks ( )
virtual

Set/Get the maximum number of landmarks sampled in your dataset. If your dataset is dense, then you will typically not need all the points to compute the ICP transform. The default is 200.

virtual void vtkIterativeClosestPointTransform::SetStartByMatchingCentroids ( int  )
virtual

Starts the process by translating source centroid to target centroid. The default is Off.

virtual int vtkIterativeClosestPointTransform::GetStartByMatchingCentroids ( )
virtual

Starts the process by translating source centroid to target centroid. The default is Off.

virtual void vtkIterativeClosestPointTransform::StartByMatchingCentroidsOn ( )
virtual

Starts the process by translating source centroid to target centroid. The default is Off.

virtual void vtkIterativeClosestPointTransform::StartByMatchingCentroidsOff ( )
virtual

Starts the process by translating source centroid to target centroid. The default is Off.

virtual vtkLandmarkTransform* vtkIterativeClosestPointTransform::GetLandmarkTransform ( )
virtual

Get the internal landmark transform. Use it to constrain the number of degrees of freedom of the solution (i.e. rigid body, similarity, etc.).

void vtkIterativeClosestPointTransform::Inverse ( )
virtual

Invert the transformation. This is done by switching the source and target.

Implements vtkAbstractTransform.

vtkAbstractTransform* vtkIterativeClosestPointTransform::MakeTransform ( )
virtual

Make another transform of the same type.

Implements vtkAbstractTransform.

void vtkIterativeClosestPointTransform::ReleaseSource ( void  )
protected

Release source and target

void vtkIterativeClosestPointTransform::ReleaseTarget ( void  )
protected

Release source and target

void vtkIterativeClosestPointTransform::ReleaseLocator ( void  )
protected

Release locator

void vtkIterativeClosestPointTransform::CreateDefaultLocator ( void  )
protected

Create default locator. Used to create one when none is specified.

unsigned long int vtkIterativeClosestPointTransform::GetMTime ( )
protectedvirtual

Get the MTime of this object also considering the locator.

Reimplemented from vtkObject.

void vtkIterativeClosestPointTransform::InternalUpdate ( )
protectedvirtual

Perform any subclass-specific Update.

Reimplemented from vtkAbstractTransform.

void vtkIterativeClosestPointTransform::InternalDeepCopy ( vtkAbstractTransform transform)
protectedvirtual

This method does no type checking, use DeepCopy instead.

Reimplemented from vtkAbstractTransform.

Member Data Documentation

vtkDataSet* vtkIterativeClosestPointTransform::Source
protected

Definition at line 179 of file vtkIterativeClosestPointTransform.h.

vtkDataSet* vtkIterativeClosestPointTransform::Target
protected

Definition at line 180 of file vtkIterativeClosestPointTransform.h.

vtkCellLocator* vtkIterativeClosestPointTransform::Locator
protected

Definition at line 181 of file vtkIterativeClosestPointTransform.h.

int vtkIterativeClosestPointTransform::MaximumNumberOfIterations
protected

Definition at line 182 of file vtkIterativeClosestPointTransform.h.

int vtkIterativeClosestPointTransform::CheckMeanDistance
protected

Definition at line 183 of file vtkIterativeClosestPointTransform.h.

int vtkIterativeClosestPointTransform::MeanDistanceMode
protected

Definition at line 184 of file vtkIterativeClosestPointTransform.h.

double vtkIterativeClosestPointTransform::MaximumMeanDistance
protected

Definition at line 185 of file vtkIterativeClosestPointTransform.h.

int vtkIterativeClosestPointTransform::MaximumNumberOfLandmarks
protected

Definition at line 186 of file vtkIterativeClosestPointTransform.h.

int vtkIterativeClosestPointTransform::StartByMatchingCentroids
protected

Definition at line 187 of file vtkIterativeClosestPointTransform.h.

int vtkIterativeClosestPointTransform::NumberOfIterations
protected

Definition at line 189 of file vtkIterativeClosestPointTransform.h.

double vtkIterativeClosestPointTransform::MeanDistance
protected

Definition at line 190 of file vtkIterativeClosestPointTransform.h.

vtkLandmarkTransform* vtkIterativeClosestPointTransform::LandmarkTransform
protected

Definition at line 191 of file vtkIterativeClosestPointTransform.h.


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