Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

Hybrid/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-2001 Ken Martin, Will Schroeder, Bill Lorensen 
00008 All rights reserved.
00009 
00010 Redistribution and use in source and binary forms, with or without
00011 modification, are permitted provided that the following conditions are met:
00012 
00013  * Redistributions of source code must retain the above copyright notice,
00014    this list of conditions and the following disclaimer.
00015 
00016  * Redistributions in binary form must reproduce the above copyright notice,
00017    this list of conditions and the following disclaimer in the documentation
00018    and/or other materials provided with the distribution.
00019 
00020  * Neither name of Ken Martin, Will Schroeder, or Bill Lorensen nor the names
00021    of any contributors may be used to endorse or promote products derived
00022    from this software without specific prior written permission.
00023 
00024  * Modified source versions must be plainly marked as such, and must not be
00025    misrepresented as being the original software.
00026 
00027 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
00028 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00029 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00030 ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
00031 ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
00032 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
00033 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00034 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
00035 OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
00036 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
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&);  // Not implemented.
00220   void operator=(const vtkIterativeClosestPointTransform&);  // Not implemented.
00221 };
00222 
00223 #endif

Generated on Thu Mar 28 14:19:23 2002 for VTK by doxygen1.2.11.1 written by Dimitri van Heesch, © 1997-2001