VTK
|
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkIterativeClosestPointTransform.h 00005 00006 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen 00007 All rights reserved. 00008 See Copyright.txt or http://www.kitware.com/Copyright.htm for details. 00009 00010 This software is distributed WITHOUT ANY WARRANTY; without even 00011 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00012 PURPOSE. See the above copyright notice for more information. 00013 00014 =========================================================================*/ 00015 00041 #ifndef __vtkIterativeClosestPointTransform_h 00042 #define __vtkIterativeClosestPointTransform_h 00043 00044 #include "vtkCommonDataModelModule.h" // For export macro 00045 #include "vtkLinearTransform.h" 00046 00047 #define VTK_ICP_MODE_RMS 0 00048 #define VTK_ICP_MODE_AV 1 00049 00050 class vtkCellLocator; 00051 class vtkLandmarkTransform; 00052 class vtkDataSet; 00053 00054 class VTKCOMMONDATAMODEL_EXPORT vtkIterativeClosestPointTransform : public vtkLinearTransform 00055 { 00056 public: 00057 static vtkIterativeClosestPointTransform *New(); 00058 vtkTypeMacro(vtkIterativeClosestPointTransform,vtkLinearTransform); 00059 void PrintSelf(ostream& os, vtkIndent indent); 00060 00062 00063 void SetSource(vtkDataSet *source); 00064 void SetTarget(vtkDataSet *target); 00065 vtkGetObjectMacro(Source, vtkDataSet); 00066 vtkGetObjectMacro(Target, vtkDataSet); 00068 00070 00072 void SetLocator(vtkCellLocator *locator); 00073 vtkGetObjectMacro(Locator,vtkCellLocator); 00075 00077 00078 vtkSetMacro(MaximumNumberOfIterations, int); 00079 vtkGetMacro(MaximumNumberOfIterations, int); 00081 00083 00084 vtkGetMacro(NumberOfIterations, int); 00086 00088 00090 vtkSetMacro(CheckMeanDistance, int); 00091 vtkGetMacro(CheckMeanDistance, int); 00092 vtkBooleanMacro(CheckMeanDistance, int); 00094 00096 00101 vtkSetClampMacro(MeanDistanceMode,int, 00102 VTK_ICP_MODE_RMS,VTK_ICP_MODE_AV); 00103 vtkGetMacro(MeanDistanceMode,int); 00104 void SetMeanDistanceModeToRMS() 00105 {this->SetMeanDistanceMode(VTK_ICP_MODE_RMS);} 00106 void SetMeanDistanceModeToAbsoluteValue() 00107 {this->SetMeanDistanceMode(VTK_ICP_MODE_AV);} 00108 const char *GetMeanDistanceModeAsString(); 00110 00112 00115 vtkSetMacro(MaximumMeanDistance, double); 00116 vtkGetMacro(MaximumMeanDistance, double); 00118 00120 00121 vtkGetMacro(MeanDistance, double); 00123 00125 00128 vtkSetMacro(MaximumNumberOfLandmarks, int); 00129 vtkGetMacro(MaximumNumberOfLandmarks, int); 00131 00133 00135 vtkSetMacro(StartByMatchingCentroids, int); 00136 vtkGetMacro(StartByMatchingCentroids, int); 00137 vtkBooleanMacro(StartByMatchingCentroids, int); 00139 00141 00144 vtkGetObjectMacro(LandmarkTransform,vtkLandmarkTransform); 00146 00149 void Inverse(); 00150 00152 vtkAbstractTransform *MakeTransform(); 00153 00154 protected: 00155 00157 00158 void ReleaseSource(void); 00159 void ReleaseTarget(void); 00161 00163 void ReleaseLocator(void); 00164 00166 void CreateDefaultLocator(void); 00167 00169 unsigned long int GetMTime(); 00170 00171 vtkIterativeClosestPointTransform(); 00172 ~vtkIterativeClosestPointTransform(); 00173 00174 void InternalUpdate(); 00175 00177 void InternalDeepCopy(vtkAbstractTransform *transform); 00178 00179 vtkDataSet* Source; 00180 vtkDataSet* Target; 00181 vtkCellLocator *Locator; 00182 int MaximumNumberOfIterations; 00183 int CheckMeanDistance; 00184 int MeanDistanceMode; 00185 double MaximumMeanDistance; 00186 int MaximumNumberOfLandmarks; 00187 int StartByMatchingCentroids; 00188 00189 int NumberOfIterations; 00190 double MeanDistance; 00191 vtkLandmarkTransform *LandmarkTransform; 00192 private: 00193 vtkIterativeClosestPointTransform(const vtkIterativeClosestPointTransform&); // Not implemented. 00194 void operator=(const vtkIterativeClosestPointTransform&); // Not implemented. 00195 }; 00196 00197 #endif