VTK
vtkLandmarkTransform.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkLandmarkTransform.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
31 #ifndef __vtkLandmarkTransform_h
32 #define __vtkLandmarkTransform_h
33 
34 #include "vtkLinearTransform.h"
35 
36 #define VTK_LANDMARK_RIGIDBODY 6
37 #define VTK_LANDMARK_SIMILARITY 7
38 #define VTK_LANDMARK_AFFINE 12
39 
41 {
42 public:
43  static vtkLandmarkTransform *New();
44 
46  void PrintSelf(ostream& os, vtkIndent indent);
47 
49 
53  void SetSourceLandmarks(vtkPoints *points);
54  void SetTargetLandmarks(vtkPoints *points);
55  vtkGetObjectMacro(SourceLandmarks, vtkPoints);
56  vtkGetObjectMacro(TargetLandmarks, vtkPoints);
58 
60 
66  vtkSetMacro(Mode,int);
67  void SetModeToRigidBody() { this->SetMode(VTK_LANDMARK_RIGIDBODY); };
68  void SetModeToSimilarity() { this->SetMode(VTK_LANDMARK_SIMILARITY); };
69  void SetModeToAffine() { this->SetMode(VTK_LANDMARK_AFFINE); };
71 
73 
74  vtkGetMacro(Mode,int);
75  const char *GetModeAsString();
77 
80  void Inverse();
81 
83  unsigned long GetMTime();
84 
87 
88 protected:
91 
92  // Update the matrix from the quaternion.
93  void InternalUpdate();
94 
96  void InternalDeepCopy(vtkAbstractTransform *transform);
97 
100 
101  int Mode;
102 private:
103  vtkLandmarkTransform(const vtkLandmarkTransform&); // Not implemented.
104  void operator=(const vtkLandmarkTransform&); // Not implemented.
105 };
106 
107 //BTX
109 {
110  switch (this->Mode)
111  {
113  return "RigidBody";
115  return "Similarity";
116  case VTK_LANDMARK_AFFINE:
117  return "Affine";
118  default:
119  return "Unrecognized";
120  }
121 }
122 //ETX
123 #endif