VTK  9.3.20240327
vtkIterativeClosestPointTransform.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-License-Identifier: BSD-3-Clause
3 
59 #ifndef vtkIterativeClosestPointTransform_h
60 #define vtkIterativeClosestPointTransform_h
61 
62 #include "vtkCommonDataModelModule.h" // For export macro
63 #include "vtkLinearTransform.h"
64 
65 #define VTK_ICP_MODE_RMS 0
66 #define VTK_ICP_MODE_AV 1
67 
68 VTK_ABI_NAMESPACE_BEGIN
69 class vtkCellLocator;
71 class vtkDataSet;
72 
73 class VTKCOMMONDATAMODEL_EXPORT vtkIterativeClosestPointTransform : public vtkLinearTransform
74 {
75 public:
78  void PrintSelf(ostream& os, vtkIndent indent) override;
79 
81 
86  vtkGetObjectMacro(Source, vtkDataSet);
87  vtkGetObjectMacro(Target, vtkDataSet);
89 
91 
95  void SetLocator(vtkCellLocator* locator);
96  vtkGetObjectMacro(Locator, vtkCellLocator);
98 
100 
103  vtkSetMacro(MaximumNumberOfIterations, int);
104  vtkGetMacro(MaximumNumberOfIterations, int);
106 
108 
111  vtkGetMacro(NumberOfIterations, int);
113 
115 
119  vtkSetMacro(CheckMeanDistance, vtkTypeBool);
120  vtkGetMacro(CheckMeanDistance, vtkTypeBool);
121  vtkBooleanMacro(CheckMeanDistance, vtkTypeBool);
123 
125 
132  vtkSetClampMacro(MeanDistanceMode, int, VTK_ICP_MODE_RMS, VTK_ICP_MODE_AV);
133  vtkGetMacro(MeanDistanceMode, int);
134  void SetMeanDistanceModeToRMS() { this->SetMeanDistanceMode(VTK_ICP_MODE_RMS); }
135  void SetMeanDistanceModeToAbsoluteValue() { this->SetMeanDistanceMode(VTK_ICP_MODE_AV); }
138 
140 
145  vtkSetMacro(MaximumMeanDistance, double);
146  vtkGetMacro(MaximumMeanDistance, double);
148 
150 
153  vtkGetMacro(MeanDistance, double);
155 
157 
162  vtkSetMacro(MaximumNumberOfLandmarks, int);
163  vtkGetMacro(MaximumNumberOfLandmarks, int);
165 
167 
171  vtkSetMacro(StartByMatchingCentroids, vtkTypeBool);
172  vtkGetMacro(StartByMatchingCentroids, vtkTypeBool);
173  vtkBooleanMacro(StartByMatchingCentroids, vtkTypeBool);
175 
177 
181  vtkGetObjectMacro(LandmarkTransform, vtkLandmarkTransform);
183 
188  void Inverse() override;
189 
194 
195 protected:
197 
203 
208 
213 
217  vtkMTimeType GetMTime() override;
218 
221 
222  void InternalUpdate() override;
223 
227  void InternalDeepCopy(vtkAbstractTransform* transform) override;
228 
238 
240  double MeanDistance;
242 
243 private:
245  void operator=(const vtkIterativeClosestPointTransform&) = delete;
246 };
247 
248 VTK_ABI_NAMESPACE_END
249 #endif
superclass for all geometric transformations
octree-based spatial search object to quickly locate cells
abstract class to specify dataset behavior
Definition: vtkDataSet.h:165
a simple class to control print indentation
Definition: vtkIndent.h:108
Implementation of the ICP algorithm.
void ReleaseLocator()
Release locator.
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 SetMeanDistanceModeToRMS()
Specify the mean distance mode.
void SetLocator(vtkCellLocator *locator)
Set/Get a spatial locator for speeding up the search process.
static vtkIterativeClosestPointTransform * New()
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 CreateDefaultLocator()
Create default locator.
void SetTarget(vtkDataSet *target)
Specify the source and target data sets.
void Inverse() override
Invert the transformation.
void SetMeanDistanceModeToAbsoluteValue()
Specify the mean distance mode.
const char * GetMeanDistanceModeAsString()
Specify the mean distance mode.
void ReleaseSource()
Release source and target.
void ReleaseTarget()
Release source and target.
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:64
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:270