VTK
vtkIterativeClosestPointTransform.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkIterativeClosestPointTransform.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
15 
42 #ifndef vtkIterativeClosestPointTransform_h
43 #define vtkIterativeClosestPointTransform_h
44 
45 #include "vtkCommonDataModelModule.h" // For export macro
46 #include "vtkLinearTransform.h"
47 
48 #define VTK_ICP_MODE_RMS 0
49 #define VTK_ICP_MODE_AV 1
50 
51 class vtkCellLocator;
53 class vtkDataSet;
54 
55 class VTKCOMMONDATAMODEL_EXPORT vtkIterativeClosestPointTransform : public vtkLinearTransform
56 {
57 public:
60  void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
61 
63 
68  vtkGetObjectMacro(Source, vtkDataSet);
69  vtkGetObjectMacro(Target, vtkDataSet);
71 
73 
77  void SetLocator(vtkCellLocator *locator);
78  vtkGetObjectMacro(Locator,vtkCellLocator);
80 
82 
85  vtkSetMacro(MaximumNumberOfIterations, int);
86  vtkGetMacro(MaximumNumberOfIterations, int);
88 
90 
93  vtkGetMacro(NumberOfIterations, int);
95 
97 
101  vtkSetMacro(CheckMeanDistance, int);
102  vtkGetMacro(CheckMeanDistance, int);
103  vtkBooleanMacro(CheckMeanDistance, int);
105 
107 
114  vtkSetClampMacro(MeanDistanceMode,int,
116  vtkGetMacro(MeanDistanceMode,int);
118  {this->SetMeanDistanceMode(VTK_ICP_MODE_RMS);}
120  {this->SetMeanDistanceMode(VTK_ICP_MODE_AV);}
123 
125 
130  vtkSetMacro(MaximumMeanDistance, double);
131  vtkGetMacro(MaximumMeanDistance, double);
133 
135 
138  vtkGetMacro(MeanDistance, double);
140 
142 
147  vtkSetMacro(MaximumNumberOfLandmarks, int);
148  vtkGetMacro(MaximumNumberOfLandmarks, int);
150 
152 
156  vtkSetMacro(StartByMatchingCentroids, int);
157  vtkGetMacro(StartByMatchingCentroids, int);
158  vtkBooleanMacro(StartByMatchingCentroids, int);
160 
162 
166  vtkGetObjectMacro(LandmarkTransform,vtkLandmarkTransform);
168 
173  void Inverse() VTK_OVERRIDE;
174 
178  vtkAbstractTransform *MakeTransform() VTK_OVERRIDE;
179 
180 protected:
181 
183 
186  void ReleaseSource(void);
187  void ReleaseTarget(void);
189 
193  void ReleaseLocator(void);
194 
198  void CreateDefaultLocator(void);
199 
203  vtkMTimeType GetMTime() VTK_OVERRIDE;
204 
207 
208  void InternalUpdate() VTK_OVERRIDE;
209 
213  void InternalDeepCopy(vtkAbstractTransform *transform) VTK_OVERRIDE;
214 
215  vtkDataSet* Source;
216  vtkDataSet* Target;
217  vtkCellLocator *Locator;
218  int MaximumNumberOfIterations;
219  int CheckMeanDistance;
220  int MeanDistanceMode;
221  double MaximumMeanDistance;
222  int MaximumNumberOfLandmarks;
223  int StartByMatchingCentroids;
224 
225  int NumberOfIterations;
226  double MeanDistance;
227  vtkLandmarkTransform *LandmarkTransform;
228 private:
230  void operator=(const vtkIterativeClosestPointTransform&) VTK_DELETE_FUNCTION;
231 };
232 
233 #endif
vtkLinearTransform.h
vtkCellLocator
octree-based spatial search object to quickly locate cells
Definition: vtkCellLocator.h:53
vtkAbstractTransform
superclass for all geometric transformations
Definition: vtkAbstractTransform.h:51
vtkIterativeClosestPointTransform::SetMeanDistanceModeToAbsoluteValue
void SetMeanDistanceModeToAbsoluteValue()
Definition: vtkIterativeClosestPointTransform.h:119
vtkIterativeClosestPointTransform::SetSource
void SetSource(vtkDataSet *source)
Specify the source and target data sets.
VTK_ICP_MODE_RMS
#define VTK_ICP_MODE_RMS
Definition: vtkIterativeClosestPointTransform.h:48
vtkIterativeClosestPointTransform::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkLinearTransform
abstract superclass for linear transformations
Definition: vtkLinearTransform.h:35
vtkMTimeType
vtkTypeUInt64 vtkMTimeType
Definition: vtkType.h:248
source
boost::graph_traits< vtkGraph * >::vertex_descriptor source(boost::graph_traits< vtkGraph * >::edge_descriptor e, vtkGraph *)
Definition: vtkBoostGraphAdapter.h:822
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:40
VTK_ICP_MODE_AV
#define VTK_ICP_MODE_AV
Definition: vtkIterativeClosestPointTransform.h:49
vtkIterativeClosestPointTransform::Inverse
void Inverse() override
Invert the transformation.
vtkDataSet
abstract class to specify dataset behavior
Definition: vtkDataSet.h:63
vtkBooleanMacro
vtkBooleanMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
vtkSetMacro
vtkSetMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
vtkIterativeClosestPointTransform::SetLocator
void SetLocator(vtkCellLocator *locator)
Set/Get a spatial locator for speeding up the search process.
vtkIterativeClosestPointTransform::SetMeanDistanceModeToRMS
void SetMeanDistanceModeToRMS()
Definition: vtkIterativeClosestPointTransform.h:117
vtkIterativeClosestPointTransform
Implementation of the ICP algorithm.
Definition: vtkIterativeClosestPointTransform.h:56
target
boost::graph_traits< vtkGraph * >::vertex_descriptor target(boost::graph_traits< vtkGraph * >::edge_descriptor e, vtkGraph *)
Definition: vtkBoostGraphAdapter.h:829
vtkIterativeClosestPointTransform::New
static vtkIterativeClosestPointTransform * New()
vtkLandmarkTransform
a linear transform specified by two corresponding point sets
Definition: vtkLandmarkTransform.h:46
vtkIterativeClosestPointTransform::GetMeanDistanceModeAsString
const char * GetMeanDistanceModeAsString()
vtkIterativeClosestPointTransform::SetTarget
void SetTarget(vtkDataSet *target)