00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00041
#ifndef __vtkIterativeClosestPointTransform_h
00042
#define __vtkIterativeClosestPointTransform_h
00043
00044
#include "vtkLinearTransform.h"
00045
00046 #define VTK_ICP_MODE_RMS 0
00047 #define VTK_ICP_MODE_AV 1
00048
00049
class vtkCellLocator;
00050
class vtkLandmarkTransform;
00051
class vtkDataSet;
00052
00053 class VTK_HYBRID_EXPORT vtkIterativeClosestPointTransform :
public vtkLinearTransform
00054 {
00055
public:
00056
static vtkIterativeClosestPointTransform *
New();
00057 vtkTypeRevisionMacro(vtkIterativeClosestPointTransform,
vtkLinearTransform);
00058
void PrintSelf(ostream& os,
vtkIndent indent);
00059
00061
00062
void SetSource(
vtkDataSet *source);
00063
void SetTarget(
vtkDataSet *target);
00064 vtkGetObjectMacro(Source,
vtkDataSet);
00065 vtkGetObjectMacro(Target,
vtkDataSet);
00067
00069
00071
void SetLocator(
vtkCellLocator *locator);
00072 vtkGetObjectMacro(Locator,
vtkCellLocator);
00074
00076
00077 vtkSetMacro(MaximumNumberOfIterations,
int);
00078 vtkGetMacro(MaximumNumberOfIterations,
int);
00080
00082
00083 vtkGetMacro(NumberOfIterations,
int);
00085
00087
00088 vtkSetMacro(CheckMeanDistance,
int);
00089 vtkGetMacro(CheckMeanDistance,
int);
00090 vtkBooleanMacro(CheckMeanDistance,
int);
00092
00094
00099 vtkSetClampMacro(MeanDistanceMode,
int,
00100 VTK_ICP_MODE_RMS,VTK_ICP_MODE_AV);
00101 vtkGetMacro(MeanDistanceMode,
int);
00102 void SetMeanDistanceModeToRMS()
00103 {this->SetMeanDistanceMode(
VTK_ICP_MODE_RMS);}
00104 void SetMeanDistanceModeToAbsoluteValue()
00105 {this->SetMeanDistanceMode(
VTK_ICP_MODE_AV);}
00106
const char *GetMeanDistanceModeAsString();
00108
00110
00112 vtkSetMacro(MaximumMeanDistance,
double);
00113 vtkGetMacro(MaximumMeanDistance,
double);
00115
00117
00118 vtkGetMacro(MeanDistance,
double);
00120
00122
00125 vtkSetMacro(MaximumNumberOfLandmarks,
int);
00126 vtkGetMacro(MaximumNumberOfLandmarks,
int);
00128
00130
00131 vtkSetMacro(StartByMatchingCentroids,
int);
00132 vtkGetMacro(StartByMatchingCentroids,
int);
00133 vtkBooleanMacro(StartByMatchingCentroids,
int);
00135
00137
00140 vtkGetObjectMacro(LandmarkTransform,
vtkLandmarkTransform);
00142
00145
void Inverse();
00146
00148
vtkAbstractTransform *
MakeTransform();
00149
00150
protected:
00151
00153
00154
void ReleaseSource(
void);
00155
void ReleaseTarget(
void);
00157
00159
void ReleaseLocator(
void);
00160
00162
void CreateDefaultLocator(
void);
00163
00165
unsigned long int GetMTime();
00166
00167 vtkIterativeClosestPointTransform();
00168 ~vtkIterativeClosestPointTransform();
00169
00170
void InternalUpdate();
00171
00173
void InternalDeepCopy(
vtkAbstractTransform *transform);
00174
00175 vtkDataSet* Source;
00176 vtkDataSet* Target;
00177 vtkCellLocator *Locator;
00178 int MaximumNumberOfIterations;
00179 int CheckMeanDistance;
00180 int MeanDistanceMode;
00181 double MaximumMeanDistance;
00182 int MaximumNumberOfLandmarks;
00183 int StartByMatchingCentroids;
00184
00185 int NumberOfIterations;
00186 double MeanDistance;
00187 vtkLandmarkTransform *LandmarkTransform;
00188
private:
00189 vtkIterativeClosestPointTransform(
const vtkIterativeClosestPointTransform&);
00190
void operator=(
const vtkIterativeClosestPointTransform&);
00191 };
00192
00193
#endif