VTK  9.0.1
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) 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, vtkTypeBool);
99  vtkGetMacro(CheckMeanDistance, vtkTypeBool);
100  vtkBooleanMacro(CheckMeanDistance, vtkTypeBool);
102 
104 
111  vtkSetClampMacro(MeanDistanceMode, int, VTK_ICP_MODE_RMS, VTK_ICP_MODE_AV);
112  vtkGetMacro(MeanDistanceMode, int);
113  void SetMeanDistanceModeToRMS() { this->SetMeanDistanceMode(VTK_ICP_MODE_RMS); }
114  void SetMeanDistanceModeToAbsoluteValue() { this->SetMeanDistanceMode(VTK_ICP_MODE_AV); }
115  const char* GetMeanDistanceModeAsString();
117 
119 
124  vtkSetMacro(MaximumMeanDistance, double);
125  vtkGetMacro(MaximumMeanDistance, double);
127 
129 
132  vtkGetMacro(MeanDistance, double);
134 
136 
141  vtkSetMacro(MaximumNumberOfLandmarks, int);
142  vtkGetMacro(MaximumNumberOfLandmarks, int);
144 
146 
150  vtkSetMacro(StartByMatchingCentroids, vtkTypeBool);
151  vtkGetMacro(StartByMatchingCentroids, vtkTypeBool);
152  vtkBooleanMacro(StartByMatchingCentroids, vtkTypeBool);
154 
156 
160  vtkGetObjectMacro(LandmarkTransform, vtkLandmarkTransform);
162 
167  void Inverse() override;
168 
173 
174 protected:
176 
179  void ReleaseSource(void);
180  void ReleaseTarget(void);
182 
186  void ReleaseLocator(void);
187 
191  void CreateDefaultLocator(void);
192 
196  vtkMTimeType GetMTime() override;
197 
200 
201  void InternalUpdate() override;
202 
206  void InternalDeepCopy(vtkAbstractTransform* transform) override;
207 
217 
219  double MeanDistance;
221 
222 private:
224  void operator=(const vtkIterativeClosestPointTransform&) = delete;
225 };
226 
227 #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 *)
vtkMTimeType GetMTime() override
Override GetMTime necessary because of inverse transforms.
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:293
abstract class to specify dataset behavior
Definition: vtkDataSet.h:56
virtual void InternalUpdate()
Perform any subclass-specific Update.
virtual vtkAbstractTransform * MakeTransform()=0
Make another transform of the same type.
boost::graph_traits< vtkGraph * >::vertex_descriptor source(boost::graph_traits< vtkGraph *>::edge_descriptor e, vtkGraph *)
int vtkTypeBool
Definition: vtkABI.h:69
#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.
void InternalDeepCopy(vtkAbstractTransform *transform) override
Perform any subclass-specific DeepCopy.
void SetMeanDistanceModeToAbsoluteValue()
Specify the mean distance mode.
Implementation of the ICP algorithm.
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