VTK  9.2.6
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=========================================================================*/
34
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
45class VTKCOMMONTRANSFORMS_EXPORT vtkLandmarkTransform : public vtkLinearTransform
46{
47public:
49
51 void PrintSelf(ostream& os, vtkIndent indent) override;
52
54
61 vtkGetObjectMacro(SourceLandmarks, vtkPoints);
62 vtkGetObjectMacro(TargetLandmarks, vtkPoints);
64
66
75 vtkSetMacro(Mode, int);
80
82
85 vtkGetMacro(Mode, int);
86 const char* GetModeAsString();
88
93 void Inverse() override;
94
99
104
105protected:
108
109 // Update the matrix from the quaternion.
110 void InternalUpdate() override;
111
115 void InternalDeepCopy(vtkAbstractTransform* transform) override;
116
119
120 int Mode;
121
122private:
124 void operator=(const vtkLandmarkTransform&) = delete;
125};
126
128{
129 switch (this->Mode)
130 {
132 return "RigidBody";
134 return "Similarity";
136 return "Affine";
137 default:
138 return "Unrecognized";
139 }
140}
141
142#endif
a simple class to control print indentation
Definition vtkIndent.h:40
vtkAbstractTransform * MakeTransform() override
Make another transform of the same type.
void SetModeToAffine()
Set the number of degrees of freedom to constrain the solution to.
void InternalDeepCopy(vtkAbstractTransform *transform) override
This method does no type checking, use DeepCopy instead.
void InternalUpdate() override
Perform any subclass-specific Update.
void SetTargetLandmarks(vtkPoints *target)
Specify the source and target landmark sets.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
const char * GetModeAsString()
Get the current transformation mode.
void SetSourceLandmarks(vtkPoints *source)
Specify the source and target landmark sets.
void Inverse() override
Invert the transformation.
virtual void SetMode(int)
Set the number of degrees of freedom to constrain the solution to.
~vtkLandmarkTransform() override
void SetModeToRigidBody()
Set the number of degrees of freedom to constrain the solution to.
static vtkLandmarkTransform * New()
void SetModeToSimilarity()
Set the number of degrees of freedom to constrain the solution to.
vtkMTimeType GetMTime() override
Get the MTime.
vtkLinearTransform()=default
represent and manipulate 3D points
Definition vtkPoints.h:40
boost::graph_traits< vtkGraph * >::vertex_descriptor source(boost::graph_traits< vtkGraph * >::edge_descriptor e, vtkGraph *)
boost::graph_traits< vtkGraph * >::vertex_descriptor target(boost::graph_traits< vtkGraph * >::edge_descriptor e, vtkGraph *)
#define VTK_LANDMARK_AFFINE
#define VTK_LANDMARK_SIMILARITY
#define VTK_LANDMARK_RIGIDBODY
vtkTypeUInt32 vtkMTimeType
Definition vtkType.h:287