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 "vtkCommonTransformsModule.h" // For export macro
35 #include "vtkLinearTransform.h"
36 
37 #define VTK_LANDMARK_RIGIDBODY 6
38 #define VTK_LANDMARK_SIMILARITY 7
39 #define VTK_LANDMARK_AFFINE 12
40 
42 {
43 public:
44  static vtkLandmarkTransform *New();
45 
47  void PrintSelf(ostream& os, vtkIndent indent);
48 
50 
54  void SetSourceLandmarks(vtkPoints *points);
55  void SetTargetLandmarks(vtkPoints *points);
56  vtkGetObjectMacro(SourceLandmarks, vtkPoints);
57  vtkGetObjectMacro(TargetLandmarks, vtkPoints);
59 
61 
67  vtkSetMacro(Mode,int);
68  void SetModeToRigidBody() { this->SetMode(VTK_LANDMARK_RIGIDBODY); };
69  void SetModeToSimilarity() { this->SetMode(VTK_LANDMARK_SIMILARITY); };
70  void SetModeToAffine() { this->SetMode(VTK_LANDMARK_AFFINE); };
72 
74 
75  vtkGetMacro(Mode,int);
76  const char *GetModeAsString();
78 
81  void Inverse();
82 
84  unsigned long GetMTime();
85 
88 
89 protected:
92 
93  // Update the matrix from the quaternion.
94  void InternalUpdate();
95 
97  void InternalDeepCopy(vtkAbstractTransform *transform);
98 
101 
102  int Mode;
103 private:
104  vtkLandmarkTransform(const vtkLandmarkTransform&); // Not implemented.
105  void operator=(const vtkLandmarkTransform&); // Not implemented.
106 };
107 
108 //BTX
110 {
111  switch (this->Mode)
112  {
114  return "RigidBody";
116  return "Similarity";
117  case VTK_LANDMARK_AFFINE:
118  return "Affine";
119  default:
120  return "Unrecognized";
121  }
122 }
123 //ETX
124 #endif
#define VTK_LANDMARK_SIMILARITY
unsigned long GetMTime()
const char * GetModeAsString()
#define VTK_LANDMARK_AFFINE
virtual vtkAbstractTransform * MakeTransform()=0
#define VTKCOMMONTRANSFORMS_EXPORT
a simple class to control print indentation
Definition: vtkIndent.h:38
void InternalDeepCopy(vtkAbstractTransform *transform)
a linear transform specified by two corresponding point sets
superclass for all geometric transformations
virtual void Inverse()=0
#define VTK_LANDMARK_RIGIDBODY
static vtkObject * New()
void PrintSelf(ostream &os, vtkIndent indent)
represent and manipulate 3D points
Definition: vtkPoints.h:38
abstract superclass for linear transformations