00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00071 #ifndef __vtkIterativeClosestPointTransform_h
00072 #define __vtkIterativeClosestPointTransform_h
00073
00074 #include "vtkLinearTransform.h"
00075
00076 #define VTK_ICP_MODE_RMS 0
00077 #define VTK_ICP_MODE_AV 1
00078
00079 class vtkCellLocator;
00080 class vtkLandmarkTransform;
00081 class vtkDataSet;
00082
00083 class VTK_HYBRID_EXPORT vtkIterativeClosestPointTransform : public vtkLinearTransform
00084 {
00085 public:
00086 static vtkIterativeClosestPointTransform *New();
00087 vtkTypeMacro(vtkIterativeClosestPointTransform,vtkLinearTransform);
00088 void PrintSelf(ostream& os, vtkIndent indent);
00089
00091
00092 void SetSource(vtkDataSet *source);
00093 void SetTarget(vtkDataSet *target);
00094 vtkGetObjectMacro(Source, vtkDataSet);
00095 vtkGetObjectMacro(Target, vtkDataSet);
00097
00099
00101 void SetLocator(vtkCellLocator *locator);
00102 vtkGetObjectMacro(Locator,vtkCellLocator);
00104
00106
00107 vtkSetMacro(MaximumNumberOfIterations, int);
00108 vtkGetMacro(MaximumNumberOfIterations, int);
00110
00112
00113 vtkGetMacro(NumberOfIterations, int);
00115
00117
00118 vtkSetMacro(CheckMeanDistance, int);
00119 vtkGetMacro(CheckMeanDistance, int);
00120 vtkBooleanMacro(CheckMeanDistance, int);
00122
00124
00129 vtkSetClampMacro(MeanDistanceMode,int,
00130 VTK_ICP_MODE_RMS,VTK_ICP_MODE_AV);
00131 vtkGetMacro(MeanDistanceMode,int);
00132 void SetMeanDistanceModeToRMS()
00133 {this->SetMeanDistanceMode(VTK_ICP_MODE_RMS);}
00134 void SetMeanDistanceModeToAbsoluteValue()
00135 {this->SetMeanDistanceMode(VTK_ICP_MODE_AV);}
00136 const char *GetMeanDistanceModeAsString();
00138
00140
00142 vtkSetMacro(MaximumMeanDistance, float);
00143 vtkGetMacro(MaximumMeanDistance, float);
00145
00147
00148 vtkGetMacro(MeanDistance, float);
00150
00152
00155 vtkSetMacro(MaximumNumberOfLandmarks, int);
00156 vtkGetMacro(MaximumNumberOfLandmarks, int);
00158
00160
00161 vtkSetMacro(StartByMatchingCentroids, int);
00162 vtkGetMacro(StartByMatchingCentroids, int);
00163 vtkBooleanMacro(StartByMatchingCentroids, int);
00165
00167
00170 vtkGetObjectMacro(LandmarkTransform,vtkLandmarkTransform);
00172
00175 void Inverse();
00176
00178 vtkAbstractTransform *MakeTransform();
00179
00180 protected:
00181
00183
00184 void ReleaseSource(void);
00185 void ReleaseTarget(void);
00187
00189 void ReleaseLocator(void);
00190
00192 void CreateDefaultLocator(void);
00193
00195 unsigned long int GetMTime();
00196
00197 vtkIterativeClosestPointTransform();
00198 ~vtkIterativeClosestPointTransform();
00199
00200 void InternalUpdate();
00201
00203 void InternalDeepCopy(vtkAbstractTransform *transform);
00204
00205 vtkDataSet* Source;
00206 vtkDataSet* Target;
00207 vtkCellLocator *Locator;
00208 int MaximumNumberOfIterations;
00209 int CheckMeanDistance;
00210 int MeanDistanceMode;
00211 float MaximumMeanDistance;
00212 int MaximumNumberOfLandmarks;
00213 int StartByMatchingCentroids;
00214
00215 int NumberOfIterations;
00216 float MeanDistance;
00217 vtkLandmarkTransform *LandmarkTransform;
00218 private:
00219 vtkIterativeClosestPointTransform(const vtkIterativeClosestPointTransform&);
00220 void operator=(const vtkIterativeClosestPointTransform&);
00221 };
00222
00223 #endif