VTK  9.1.0
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=========================================================================*/
32#ifndef vtkLandmarkTransform_h
33#define vtkLandmarkTransform_h
34
35#include "vtkCommonTransformsModule.h" // For export macro
36#include "vtkLinearTransform.h"
37
38#define VTK_LANDMARK_RIGIDBODY 6
39#define VTK_LANDMARK_SIMILARITY 7
40#define VTK_LANDMARK_AFFINE 12
41
42class VTKCOMMONTRANSFORMS_EXPORT vtkLandmarkTransform : public vtkLinearTransform
43{
44public:
46
48 void PrintSelf(ostream& os, vtkIndent indent) override;
49
51
58 vtkGetObjectMacro(SourceLandmarks, vtkPoints);
59 vtkGetObjectMacro(TargetLandmarks, vtkPoints);
61
63
72 vtkSetMacro(Mode, int);
73 void SetModeToRigidBody() { this->SetMode(VTK_LANDMARK_RIGIDBODY); }
75 void SetModeToAffine() { this->SetMode(VTK_LANDMARK_AFFINE); }
77
79
82 vtkGetMacro(Mode, int);
83 const char* GetModeAsString();
85
90 void Inverse() override;
91
96
101
102protected:
105
106 // Update the matrix from the quaternion.
107 void InternalUpdate() override;
108
112 void InternalDeepCopy(vtkAbstractTransform* transform) override;
113
116
117 int Mode;
118
119private:
121 void operator=(const vtkLandmarkTransform&) = delete;
122};
123
125{
126 switch (this->Mode)
127 {
129 return "RigidBody";
131 return "Similarity";
133 return "Affine";
134 default:
135 return "Unrecognized";
136 }
137}
138
139#endif
superclass for all geometric transformations
a simple class to control print indentation
Definition: vtkIndent.h:34
a linear transform specified by two corresponding point sets
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.
~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.
abstract superclass for linear transformations
represent and manipulate 3D points
Definition: vtkPoints.h:34
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