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

vtkLandmarkTransform.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkLandmarkTransform.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 =========================================================================*/
00031 #ifndef __vtkLandmarkTransform_h
00032 #define __vtkLandmarkTransform_h
00033 
00034 #include "vtkLinearTransform.h"
00035 
00036 #define VTK_LANDMARK_RIGIDBODY 6
00037 #define VTK_LANDMARK_SIMILARITY 7
00038 #define VTK_LANDMARK_AFFINE 12
00039 
00040 class VTK_HYBRID_EXPORT vtkLandmarkTransform : public vtkLinearTransform
00041 {
00042 public:
00043   static vtkLandmarkTransform *New();
00044 
00045   vtkTypeRevisionMacro(vtkLandmarkTransform,vtkLinearTransform);
00046   void PrintSelf(ostream& os, vtkIndent indent);
00047 
00049 
00053   void SetSourceLandmarks(vtkPoints *points);
00054   void SetTargetLandmarks(vtkPoints *points);
00055   vtkGetObjectMacro(SourceLandmarks, vtkPoints);
00056   vtkGetObjectMacro(TargetLandmarks, vtkPoints);
00058 
00060 
00063   vtkSetMacro(Mode,int);
00064   void SetModeToRigidBody() { this->SetMode(VTK_LANDMARK_RIGIDBODY); };
00065   void SetModeToSimilarity() { this->SetMode(VTK_LANDMARK_SIMILARITY); };
00066   void SetModeToAffine() { this->SetMode(VTK_LANDMARK_AFFINE); };
00067   vtkGetMacro(Mode,int);
00068   const char *GetModeAsString();
00070 
00073   void Inverse();
00074 
00076   unsigned long GetMTime();
00077 
00079   vtkAbstractTransform *MakeTransform();
00080 
00081 protected:
00082   vtkLandmarkTransform();
00083   ~vtkLandmarkTransform();
00084 
00085   // Update the matrix from the quaternion.
00086   void InternalUpdate();
00087 
00089   void InternalDeepCopy(vtkAbstractTransform *transform);
00090 
00091   vtkPoints* SourceLandmarks;
00092   vtkPoints* TargetLandmarks;
00093 
00094   int Mode;
00095 private:
00096   vtkLandmarkTransform(const vtkLandmarkTransform&);  // Not implemented.
00097   void operator=(const vtkLandmarkTransform&);  // Not implemented.
00098 };
00099  
00100 //BTX
00101 inline const char *vtkLandmarkTransform::GetModeAsString()
00102 {
00103   switch (this->Mode)
00104     {
00105     case VTK_LANDMARK_RIGIDBODY:
00106       return "RigidBody";
00107     case VTK_LANDMARK_SIMILARITY:
00108       return "Similarity";
00109     case VTK_LANDMARK_AFFINE:
00110       return "Affine";
00111     default:
00112       return "Unrecognized";
00113     }
00114 }
00115 //ETX
00116 #endif

Generated on Mon Jan 21 23:07:27 2008 for VTK by  doxygen 1.4.3-20050530