Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members | Related Pages

vtkIterativeClosestPointTransform.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkIterativeClosestPointTransform.h,v $
00005   Language:  C++
00006 
00007   Copyright (c) 1993-2002 Ken Martin, Will Schroeder, Bill Lorensen 
00008   All rights reserved.
00009   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
00010 
00011      This software is distributed WITHOUT ANY WARRANTY; without even 
00012      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
00013      PURPOSE.  See the above copyright notice for more information.
00014 
00015 =========================================================================*/
00016 
00045 #ifndef __vtkIterativeClosestPointTransform_h
00046 #define __vtkIterativeClosestPointTransform_h
00047 
00048 #include "vtkLinearTransform.h"
00049 
00050 #define VTK_ICP_MODE_RMS 0
00051 #define VTK_ICP_MODE_AV 1
00052 
00053 class vtkCellLocator;
00054 class vtkLandmarkTransform;
00055 class vtkDataSet;
00056 
00057 class VTK_HYBRID_EXPORT vtkIterativeClosestPointTransform : public vtkLinearTransform
00058 {
00059 public:
00060   static vtkIterativeClosestPointTransform *New();
00061   vtkTypeRevisionMacro(vtkIterativeClosestPointTransform,vtkLinearTransform);
00062   void PrintSelf(ostream& os, vtkIndent indent);
00063 
00065 
00066   void SetSource(vtkDataSet *source);
00067   void SetTarget(vtkDataSet *target);
00068   vtkGetObjectMacro(Source, vtkDataSet);
00069   vtkGetObjectMacro(Target, vtkDataSet);
00071 
00073 
00075   void SetLocator(vtkCellLocator *locator);
00076   vtkGetObjectMacro(Locator,vtkCellLocator);
00078 
00080 
00081   vtkSetMacro(MaximumNumberOfIterations, int);
00082   vtkGetMacro(MaximumNumberOfIterations, int);
00084 
00086 
00087   vtkGetMacro(NumberOfIterations, int);
00089 
00091 
00092   vtkSetMacro(CheckMeanDistance, int);
00093   vtkGetMacro(CheckMeanDistance, int);
00094   vtkBooleanMacro(CheckMeanDistance, int);
00096 
00098 
00103   vtkSetClampMacro(MeanDistanceMode,int,
00104                    VTK_ICP_MODE_RMS,VTK_ICP_MODE_AV);
00105   vtkGetMacro(MeanDistanceMode,int);
00106   void SetMeanDistanceModeToRMS()
00107     {this->SetMeanDistanceMode(VTK_ICP_MODE_RMS);}
00108   void SetMeanDistanceModeToAbsoluteValue()
00109     {this->SetMeanDistanceMode(VTK_ICP_MODE_AV);}
00110   const char *GetMeanDistanceModeAsString();
00112 
00114 
00116   vtkSetMacro(MaximumMeanDistance, float);
00117   vtkGetMacro(MaximumMeanDistance, float);
00119   
00121 
00122   vtkGetMacro(MeanDistance, float);
00124   
00126 
00129   vtkSetMacro(MaximumNumberOfLandmarks, int);
00130   vtkGetMacro(MaximumNumberOfLandmarks, int);
00132 
00134 
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   float MaximumMeanDistance;
00186   int MaximumNumberOfLandmarks;
00187   int StartByMatchingCentroids;
00188 
00189   int NumberOfIterations;
00190   float MeanDistance;
00191   vtkLandmarkTransform *LandmarkTransform;
00192 private:
00193   vtkIterativeClosestPointTransform(const vtkIterativeClosestPointTransform&);  // Not implemented.
00194   void operator=(const vtkIterativeClosestPointTransform&);  // Not implemented.
00195 };
00196 
00197 #endif