Main Page | Directories | Class Hierarchy | Alphabetical List | Class List | 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 
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 
00051 #ifndef __vtkIterativeClosestPointTransform_h
00052 #define __vtkIterativeClosestPointTransform_h
00053 
00054 #include "vtkLinearTransform.h"
00055 
00056 #define VTK_ICP_MODE_RMS 0
00057 #define VTK_ICP_MODE_AV 1
00058 
00059 class vtkCellLocator;
00060 class vtkLandmarkTransform;
00061 class vtkDataSet;
00062 
00063 class VTK_HYBRID_EXPORT vtkIterativeClosestPointTransform : public vtkLinearTransform
00064 {
00065 public:
00066   static vtkIterativeClosestPointTransform *New();
00067   vtkTypeRevisionMacro(vtkIterativeClosestPointTransform,vtkLinearTransform);
00068   void PrintSelf(ostream& os, vtkIndent indent);
00069 
00071 
00072   void SetSource(vtkDataSet *source);
00073   void SetTarget(vtkDataSet *target);
00074   vtkGetObjectMacro(Source, vtkDataSet);
00075   vtkGetObjectMacro(Target, vtkDataSet);
00077 
00079 
00081   void SetLocator(vtkCellLocator *locator);
00082   vtkGetObjectMacro(Locator,vtkCellLocator);
00084 
00086 
00087   vtkSetMacro(MaximumNumberOfIterations, int);
00088   vtkGetMacro(MaximumNumberOfIterations, int);
00090 
00092 
00093   vtkGetMacro(NumberOfIterations, int);
00095 
00097 
00098   vtkSetMacro(CheckMeanDistance, int);
00099   vtkGetMacro(CheckMeanDistance, int);
00100   vtkBooleanMacro(CheckMeanDistance, int);
00102 
00104 
00109   vtkSetClampMacro(MeanDistanceMode,int,
00110                    VTK_ICP_MODE_RMS,VTK_ICP_MODE_AV);
00111   vtkGetMacro(MeanDistanceMode,int);
00112   void SetMeanDistanceModeToRMS()
00113     {this->SetMeanDistanceMode(VTK_ICP_MODE_RMS);}
00114   void SetMeanDistanceModeToAbsoluteValue()
00115     {this->SetMeanDistanceMode(VTK_ICP_MODE_AV);}
00116   const char *GetMeanDistanceModeAsString();
00118 
00120 
00122   vtkSetMacro(MaximumMeanDistance, double);
00123   vtkGetMacro(MaximumMeanDistance, double);
00125   
00127 
00128   vtkGetMacro(MeanDistance, double);
00130   
00132 
00135   vtkSetMacro(MaximumNumberOfLandmarks, int);
00136   vtkGetMacro(MaximumNumberOfLandmarks, int);
00138 
00140 
00141   vtkSetMacro(StartByMatchingCentroids, int);
00142   vtkGetMacro(StartByMatchingCentroids, int);
00143   vtkBooleanMacro(StartByMatchingCentroids, int);
00145 
00147 
00150   vtkGetObjectMacro(LandmarkTransform,vtkLandmarkTransform);
00152   
00155   void Inverse();
00156 
00158   vtkAbstractTransform *MakeTransform();
00159 
00160 protected:
00161 
00163 
00164   void ReleaseSource(void);
00165   void ReleaseTarget(void);
00167 
00169   void ReleaseLocator(void);
00170 
00172   void CreateDefaultLocator(void);
00173 
00175   unsigned long int GetMTime();
00176 
00177   vtkIterativeClosestPointTransform();
00178   ~vtkIterativeClosestPointTransform();
00179 
00180   void InternalUpdate();
00181 
00183   void InternalDeepCopy(vtkAbstractTransform *transform);
00184 
00185   vtkDataSet* Source;
00186   vtkDataSet* Target;
00187   vtkCellLocator *Locator;
00188   int MaximumNumberOfIterations;
00189   int CheckMeanDistance;
00190   int MeanDistanceMode;
00191   double MaximumMeanDistance;
00192   int MaximumNumberOfLandmarks;
00193   int StartByMatchingCentroids;
00194 
00195   int NumberOfIterations;
00196   double MeanDistance;
00197   vtkLandmarkTransform *LandmarkTransform;
00198 private:
00199   vtkIterativeClosestPointTransform(const vtkIterativeClosestPointTransform&);  // Not implemented.
00200   void operator=(const vtkIterativeClosestPointTransform&);  // Not implemented.
00201 };
00202 
00203 #endif