VTK  9.0.2
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 
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); }
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 
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
superclass for all geometric transformations
octree-based spatial search object to quickly locate cells
abstract class to specify dataset behavior
Definition: vtkDataSet.h:57
a simple class to control print indentation
Definition: vtkIndent.h:34
Implementation of the ICP algorithm.
void InternalUpdate() override
Perform any subclass-specific Update.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkAbstractTransform * MakeTransform() override
Make another transform of the same type.
void CreateDefaultLocator(void)
Create default locator.
void SetLocator(vtkCellLocator *locator)
Set/Get a spatial locator for speeding up the search process.
static vtkIterativeClosestPointTransform * New()
void ReleaseSource(void)
Release source and target.
void InternalDeepCopy(vtkAbstractTransform *transform) override
This method does no type checking, use DeepCopy instead.
void SetSource(vtkDataSet *source)
Specify the source and target data sets.
void ReleaseLocator(void)
Release locator.
void SetTarget(vtkDataSet *target)
void Inverse() override
Invert the transformation.
const char * GetMeanDistanceModeAsString()
vtkMTimeType GetMTime() override
Get the MTime of this object also considering the locator.
a linear transform specified by two corresponding point sets
abstract superclass for linear transformations
int vtkTypeBool
Definition: vtkABI.h:69
boost::graph_traits< vtkGraph * >::vertex_descriptor source(boost::graph_traits< vtkGraph * >::edge_descriptor e, vtkGraph *)
boost::graph_traits< vtkGraph * >::vertex_descriptor target(boost::graph_traits< vtkGraph * >::edge_descriptor e, vtkGraph *)
#define VTK_ICP_MODE_RMS
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:293