VTK  9.2.5
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
51class vtkCellLocator;
53class vtkDataSet;
54
55class VTKCOMMONDATAMODEL_EXPORT vtkIterativeClosestPointTransform : public vtkLinearTransform
56{
57public:
60 void PrintSelf(ostream& os, vtkIndent indent) 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, vtkTypeBool);
102 vtkGetMacro(CheckMeanDistance, vtkTypeBool);
103 vtkBooleanMacro(CheckMeanDistance, vtkTypeBool);
105
107
114 vtkSetClampMacro(MeanDistanceMode, int, VTK_ICP_MODE_RMS, VTK_ICP_MODE_AV);
115 vtkGetMacro(MeanDistanceMode, int);
116 void SetMeanDistanceModeToRMS() { this->SetMeanDistanceMode(VTK_ICP_MODE_RMS); }
117 void SetMeanDistanceModeToAbsoluteValue() { this->SetMeanDistanceMode(VTK_ICP_MODE_AV); }
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, vtkTypeBool);
154 vtkGetMacro(StartByMatchingCentroids, vtkTypeBool);
155 vtkBooleanMacro(StartByMatchingCentroids, vtkTypeBool);
157
159
163 vtkGetObjectMacro(LandmarkTransform, vtkLandmarkTransform);
165
170 void Inverse() override;
171
176
177protected:
179
182 void ReleaseSource(void);
183 void ReleaseTarget(void);
185
189 void ReleaseLocator(void);
190
195
200
203
204 void InternalUpdate() override;
205
209 void InternalDeepCopy(vtkAbstractTransform* transform) override;
210
220
224
225private:
227 void operator=(const vtkIterativeClosestPointTransform&) = delete;
228};
229
230#endif
superclass for all geometric transformations
octree-based spatial search object to quickly locate cells
abstract class to specify dataset behavior
Definition: vtkDataSet.h:63
a simple class to control print indentation
Definition: vtkIndent.h:40
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.
void ReleaseTarget(void)
Release source and target.
vtkAbstractTransform * MakeTransform() override
Make another transform of the same type.
void CreateDefaultLocator(void)
Create default locator.
void SetMeanDistanceModeToRMS()
Specify the mean distance mode.
void SetLocator(vtkCellLocator *locator)
Set/Get a spatial locator for speeding up the search process.
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)
Specify the source and target data sets.
void Inverse() override
Invert the transformation.
static vtkIterativeClosestPointTransform * New()
void SetMeanDistanceModeToAbsoluteValue()
Specify the mean distance mode.
const char * GetMeanDistanceModeAsString()
Specify the mean distance mode.
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:287