VTK  9.0.20210920
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 =========================================================================*/
91 #ifndef vtkLandmarkTransform_h
92 #define vtkLandmarkTransform_h
93 
94 #include "vtkCommonTransformsModule.h" // For export macro
95 #include "vtkLinearTransform.h"
96 
97 #define VTK_LANDMARK_RIGIDBODY 6
98 #define VTK_LANDMARK_SIMILARITY 7
99 #define VTK_LANDMARK_AFFINE 12
100 
101 class VTKCOMMONTRANSFORMS_EXPORT vtkLandmarkTransform : public vtkLinearTransform
102 {
103 public:
105 
107  void PrintSelf(ostream& os, vtkIndent indent) override;
108 
110 
117  vtkGetObjectMacro(SourceLandmarks, vtkPoints);
118  vtkGetObjectMacro(TargetLandmarks, vtkPoints);
120 
122 
131  vtkSetMacro(Mode, int);
132  void SetModeToRigidBody() { this->SetMode(VTK_LANDMARK_RIGIDBODY); }
133  void SetModeToSimilarity() { this->SetMode(VTK_LANDMARK_SIMILARITY); }
134  void SetModeToAffine() { this->SetMode(VTK_LANDMARK_AFFINE); }
136 
138 
141  vtkGetMacro(Mode, int);
142  const char* GetModeAsString();
144 
149  void Inverse() override;
150 
154  vtkMTimeType GetMTime() override;
155 
160 
161 protected:
164 
165  // Update the matrix from the quaternion.
166  void InternalUpdate() override;
167 
171  void InternalDeepCopy(vtkAbstractTransform* transform) override;
172 
175 
176  int Mode;
177 
178 private:
180  void operator=(const vtkLandmarkTransform&) = delete;
181 };
182 
184 {
185  switch (this->Mode)
186  {
188  return "RigidBody";
190  return "Similarity";
191  case VTK_LANDMARK_AFFINE:
192  return "Affine";
193  default:
194  return "Unrecognized";
195  }
196 }
197 
198 #endif
vtkPoints
represent and manipulate 3D points
Definition: vtkPoints.h:143
vtkLandmarkTransform::vtkLandmarkTransform
vtkLandmarkTransform()
vtkLinearTransform.h
vtkAbstractTransform
superclass for all geometric transformations
Definition: vtkAbstractTransform.h:52
vtkLandmarkTransform::SetModeToSimilarity
void SetModeToSimilarity()
Set the number of degrees of freedom to constrain the solution to.
Definition: vtkLandmarkTransform.h:133
vtkLandmarkTransform::GetMTime
vtkMTimeType GetMTime() override
Get the MTime.
vtkLandmarkTransform::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkLandmarkTransform::GetModeAsString
const char * GetModeAsString()
Get the current transformation mode.
Definition: vtkLandmarkTransform.h:183
vtkLandmarkTransform::New
static vtkLandmarkTransform * New()
vtkLandmarkTransform::~vtkLandmarkTransform
~vtkLandmarkTransform() override
vtkLinearTransform
abstract superclass for linear transformations
Definition: vtkLinearTransform.h:69
vtkLandmarkTransform::InternalDeepCopy
void InternalDeepCopy(vtkAbstractTransform *transform) override
This method does no type checking, use DeepCopy instead.
target
boost::graph_traits< vtkGraph * >::vertex_descriptor target(boost::graph_traits< vtkGraph * >::edge_descriptor e, vtkGraph *)
Definition: vtkBoostGraphAdapter.h:1004
vtkLandmarkTransform::InternalUpdate
void InternalUpdate() override
Perform any subclass-specific Update.
VTK_LANDMARK_AFFINE
#define VTK_LANDMARK_AFFINE
Definition: vtkLandmarkTransform.h:99
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:113
VTK_LANDMARK_RIGIDBODY
#define VTK_LANDMARK_RIGIDBODY
Definition: vtkLandmarkTransform.h:97
VTK_LANDMARK_SIMILARITY
#define VTK_LANDMARK_SIMILARITY
Definition: vtkLandmarkTransform.h:98
vtkLandmarkTransform::Inverse
void Inverse() override
Invert the transformation.
vtkLandmarkTransform::MakeTransform
vtkAbstractTransform * MakeTransform() override
Make another transform of the same type.
vtkLandmarkTransform::SetModeToRigidBody
void SetModeToRigidBody()
Set the number of degrees of freedom to constrain the solution to.
Definition: vtkLandmarkTransform.h:132
vtkLandmarkTransform::Mode
int Mode
Definition: vtkLandmarkTransform.h:176
vtkLandmarkTransform::SetModeToAffine
void SetModeToAffine()
Set the number of degrees of freedom to constrain the solution to.
Definition: vtkLandmarkTransform.h:134
vtkLandmarkTransform::SetTargetLandmarks
void SetTargetLandmarks(vtkPoints *target)
Specify the source and target landmark sets.
source
boost::graph_traits< vtkGraph * >::vertex_descriptor source(boost::graph_traits< vtkGraph * >::edge_descriptor e, vtkGraph *)
Definition: vtkBoostGraphAdapter.h:998
vtkLandmarkTransform::TargetLandmarks
vtkPoints * TargetLandmarks
Definition: vtkLandmarkTransform.h:174
vtkLandmarkTransform::SourceLandmarks
vtkPoints * SourceLandmarks
Definition: vtkLandmarkTransform.h:173
vtkLandmarkTransform::SetSourceLandmarks
void SetSourceLandmarks(vtkPoints *source)
Specify the source and target landmark sets.
vtkLandmarkTransform
a linear transform specified by two corresponding point sets
Definition: vtkLandmarkTransform.h:102
vtkMTimeType
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:287