VTK  9.1.0
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
48#ifndef vtkIterativeClosestPointTransform_h
49#define vtkIterativeClosestPointTransform_h
50
51#include "vtkCommonDataModelModule.h" // For export macro
52#include "vtkLinearTransform.h"
53
54#define VTK_ICP_MODE_RMS 0
55#define VTK_ICP_MODE_AV 1
56
57class vtkCellLocator;
59class vtkDataSet;
60
61class VTKCOMMONDATAMODEL_EXPORT vtkIterativeClosestPointTransform : public vtkLinearTransform
62{
63public:
66 void PrintSelf(ostream& os, vtkIndent indent) override;
67
69
74 vtkGetObjectMacro(Source, vtkDataSet);
75 vtkGetObjectMacro(Target, vtkDataSet);
77
79
83 void SetLocator(vtkCellLocator* locator);
84 vtkGetObjectMacro(Locator, vtkCellLocator);
86
88
91 vtkSetMacro(MaximumNumberOfIterations, int);
92 vtkGetMacro(MaximumNumberOfIterations, int);
94
96
99 vtkGetMacro(NumberOfIterations, int);
101
103
107 vtkSetMacro(CheckMeanDistance, vtkTypeBool);
108 vtkGetMacro(CheckMeanDistance, vtkTypeBool);
109 vtkBooleanMacro(CheckMeanDistance, vtkTypeBool);
111
113
120 vtkSetClampMacro(MeanDistanceMode, int, VTK_ICP_MODE_RMS, VTK_ICP_MODE_AV);
121 vtkGetMacro(MeanDistanceMode, int);
122 void SetMeanDistanceModeToRMS() { this->SetMeanDistanceMode(VTK_ICP_MODE_RMS); }
123 void SetMeanDistanceModeToAbsoluteValue() { this->SetMeanDistanceMode(VTK_ICP_MODE_AV); }
126
128
133 vtkSetMacro(MaximumMeanDistance, double);
134 vtkGetMacro(MaximumMeanDistance, double);
136
138
141 vtkGetMacro(MeanDistance, double);
143
145
150 vtkSetMacro(MaximumNumberOfLandmarks, int);
151 vtkGetMacro(MaximumNumberOfLandmarks, int);
153
155
159 vtkSetMacro(StartByMatchingCentroids, vtkTypeBool);
160 vtkGetMacro(StartByMatchingCentroids, vtkTypeBool);
161 vtkBooleanMacro(StartByMatchingCentroids, vtkTypeBool);
163
165
169 vtkGetObjectMacro(LandmarkTransform, vtkLandmarkTransform);
171
176 void Inverse() override;
177
182
183protected:
185
188 void ReleaseSource(void);
189 void ReleaseTarget(void);
191
195 void ReleaseLocator(void);
196
201
206
209
210 void InternalUpdate() override;
211
215 void InternalDeepCopy(vtkAbstractTransform* transform) override;
216
226
230
231private:
233 void operator=(const vtkIterativeClosestPointTransform&) = delete;
234};
235
236#endif
superclass for all geometric transformations
octree-based spatial search object to quickly locate cells
abstract class to specify dataset behavior
Definition: vtkDataSet.h:66
a simple class to control print indentation
Definition: vtkIndent.h:43
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