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 =========================================================================*/
35 #ifndef vtkLandmarkTransform_h
36 #define vtkLandmarkTransform_h
37 
38 #include "vtkCommonTransformsModule.h" // For export macro
39 #include "vtkLinearTransform.h"
40 
41 #define VTK_LANDMARK_RIGIDBODY 6
42 #define VTK_LANDMARK_SIMILARITY 7
43 #define VTK_LANDMARK_AFFINE 12
44 
45 class VTKCOMMONTRANSFORMS_EXPORT vtkLandmarkTransform : public vtkLinearTransform
46 {
47 public:
48  static vtkLandmarkTransform *New();
49 
51  void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
52 
54 
59  void SetSourceLandmarks(vtkPoints *points);
60  void SetTargetLandmarks(vtkPoints *points);
61  vtkGetObjectMacro(SourceLandmarks, vtkPoints);
62  vtkGetObjectMacro(TargetLandmarks, vtkPoints);
64 
66 
75  vtkSetMacro(Mode,int);
76  void SetModeToRigidBody() { this->SetMode(VTK_LANDMARK_RIGIDBODY); };
77  void SetModeToSimilarity() { this->SetMode(VTK_LANDMARK_SIMILARITY); };
78  void SetModeToAffine() { this->SetMode(VTK_LANDMARK_AFFINE); };
80 
82 
85  vtkGetMacro(Mode,int);
86  const char *GetModeAsString();
88 
93  void Inverse() VTK_OVERRIDE;
94 
98  vtkMTimeType GetMTime() VTK_OVERRIDE;
99 
103  vtkAbstractTransform *MakeTransform() VTK_OVERRIDE;
104 
105 protected:
107  ~vtkLandmarkTransform() VTK_OVERRIDE;
108 
109  // Update the matrix from the quaternion.
110  void InternalUpdate() VTK_OVERRIDE;
111 
115  void InternalDeepCopy(vtkAbstractTransform *transform) VTK_OVERRIDE;
116 
117  vtkPoints* SourceLandmarks;
118  vtkPoints* TargetLandmarks;
119 
120  int Mode;
121 private:
122  vtkLandmarkTransform(const vtkLandmarkTransform&) VTK_DELETE_FUNCTION;
123  void operator=(const vtkLandmarkTransform&) VTK_DELETE_FUNCTION;
124 };
125 
126 inline const char *vtkLandmarkTransform::GetModeAsString()
127 {
128  switch (this->Mode)
129  {
131  return "RigidBody";
133  return "Similarity";
134  case VTK_LANDMARK_AFFINE:
135  return "Affine";
136  default:
137  return "Unrecognized";
138  }
139 }
140 
141 #endif
vtkPoints
represent and manipulate 3D points
Definition: vtkPoints.h:39
vtkLinearTransform.h
vtkAbstractTransform
superclass for all geometric transformations
Definition: vtkAbstractTransform.h:50
vtkLandmarkTransform::SetModeToSimilarity
void SetModeToSimilarity()
Definition: vtkLandmarkTransform.h:77
vtkAbstractTransform::Inverse
virtual void Inverse()=0
Invert the transformation.
vtkObject::New
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on.
vtkLinearTransform::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkLinearTransform
abstract superclass for linear transformations
Definition: vtkLinearTransform.h:34
vtkMTimeType
vtkTypeUInt64 vtkMTimeType
Definition: vtkType.h:248
vtkX3D::points
Definition: vtkX3D.h:446
VTK_LANDMARK_AFFINE
#define VTK_LANDMARK_AFFINE
Definition: vtkLandmarkTransform.h:43
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:39
VTK_LANDMARK_RIGIDBODY
#define VTK_LANDMARK_RIGIDBODY
Definition: vtkLandmarkTransform.h:41
VTK_LANDMARK_SIMILARITY
#define VTK_LANDMARK_SIMILARITY
Definition: vtkLandmarkTransform.h:42
vtkSetMacro
vtkSetMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
vtkLandmarkTransform::SetModeToRigidBody
void SetModeToRigidBody()
Definition: vtkLandmarkTransform.h:76
vtkLandmarkTransform::SetModeToAffine
void SetModeToAffine()
Definition: vtkLandmarkTransform.h:78
vtkLandmarkTransform
a linear transform specified by two corresponding point sets
Definition: vtkLandmarkTransform.h:45