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 
39 #ifndef vtkIterativeClosestPointTransform_h
40 #define vtkIterativeClosestPointTransform_h
41 
42 #include "vtkCommonDataModelModule.h" // For export macro
43 #include "vtkLinearTransform.h"
44 
45 #define VTK_ICP_MODE_RMS 0
46 #define VTK_ICP_MODE_AV 1
47 
48 class vtkCellLocator;
50 class vtkDataSet;
51 
52 class VTKCOMMONDATAMODEL_EXPORT vtkIterativeClosestPointTransform : public vtkLinearTransform
53 {
54 public:
57  void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
58 
60 
63  void SetSource(vtkDataSet *source);
64  void SetTarget(vtkDataSet *target);
65  vtkGetObjectMacro(Source, vtkDataSet);
66  vtkGetObjectMacro(Target, vtkDataSet);
68 
70 
74  void SetLocator(vtkCellLocator *locator);
75  vtkGetObjectMacro(Locator,vtkCellLocator);
77 
79 
82  vtkSetMacro(MaximumNumberOfIterations, int);
83  vtkGetMacro(MaximumNumberOfIterations, int);
85 
87 
90  vtkGetMacro(NumberOfIterations, int);
92 
94 
98  vtkSetMacro(CheckMeanDistance, int);
99  vtkGetMacro(CheckMeanDistance, int);
100  vtkBooleanMacro(CheckMeanDistance, int);
102 
104 
111  vtkSetClampMacro(MeanDistanceMode,int,
113  vtkGetMacro(MeanDistanceMode,int);
115  {this->SetMeanDistanceMode(VTK_ICP_MODE_RMS);}
117  {this->SetMeanDistanceMode(VTK_ICP_MODE_AV);}
118  const char *GetMeanDistanceModeAsString();
120 
122 
127  vtkSetMacro(MaximumMeanDistance, double);
128  vtkGetMacro(MaximumMeanDistance, double);
130 
132 
135  vtkGetMacro(MeanDistance, double);
137 
139 
144  vtkSetMacro(MaximumNumberOfLandmarks, int);
145  vtkGetMacro(MaximumNumberOfLandmarks, int);
147 
149 
153  vtkSetMacro(StartByMatchingCentroids, int);
154  vtkGetMacro(StartByMatchingCentroids, int);
155  vtkBooleanMacro(StartByMatchingCentroids, int);
157 
159 
163  vtkGetObjectMacro(LandmarkTransform,vtkLandmarkTransform);
165 
170  void Inverse() VTK_OVERRIDE;
171 
175  vtkAbstractTransform *MakeTransform() VTK_OVERRIDE;
176 
177 protected:
178 
180 
183  void ReleaseSource(void);
184  void ReleaseTarget(void);
186 
190  void ReleaseLocator(void);
191 
195  void CreateDefaultLocator(void);
196 
200  vtkMTimeType GetMTime() VTK_OVERRIDE;
201 
203  ~vtkIterativeClosestPointTransform() VTK_OVERRIDE;
204 
205  void InternalUpdate() VTK_OVERRIDE;
206 
210  void InternalDeepCopy(vtkAbstractTransform *transform) VTK_OVERRIDE;
211 
212  vtkDataSet* Source;
213  vtkDataSet* Target;
214  vtkCellLocator *Locator;
215  int MaximumNumberOfIterations;
216  int CheckMeanDistance;
217  int MeanDistanceMode;
218  double MaximumMeanDistance;
219  int MaximumNumberOfLandmarks;
220  int StartByMatchingCentroids;
221 
222  int NumberOfIterations;
223  double MeanDistance;
224  vtkLandmarkTransform *LandmarkTransform;
225 private:
227  void operator=(const vtkIterativeClosestPointTransform&) VTK_DELETE_FUNCTION;
228 };
229 
230 #endif
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
boost::graph_traits< vtkGraph * >::vertex_descriptor target(boost::graph_traits< vtkGraph * >::edge_descriptor e, vtkGraph *)
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:300
abstract class to specify dataset behavior
Definition: vtkDataSet.h:56
#define VTK_ICP_MODE_RMS
octree-based spatial search object to quickly locate cells
a simple class to control print indentation
Definition: vtkIndent.h:33
a linear transform specified by two corresponding point sets
superclass for all geometric transformations
virtual void Inverse()=0
Invert the transformation.
vtkSetMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
boost::graph_traits< vtkGraph * >::vertex_descriptor source(boost::graph_traits< vtkGraph * >::edge_descriptor e, vtkGraph *)
void SetMeanDistanceModeToAbsoluteValue()
Specify the mean distance mode.
Implementation of the ICP algorithm.
vtkBooleanMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...
void SetMeanDistanceModeToRMS()
Specify the mean distance mode.
abstract superclass for linear transformations