VTK  9.5.20251127
vtkLandmarkTransform.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2// SPDX-License-Identifier: BSD-3-Clause
81
82#ifndef vtkLandmarkTransform_h
83#define vtkLandmarkTransform_h
84
85#include "vtkCommonTransformsModule.h" // For export macro
86#include "vtkLinearTransform.h"
87
88#define VTK_LANDMARK_RIGIDBODY 6
89#define VTK_LANDMARK_SIMILARITY 7
90#define VTK_LANDMARK_AFFINE 12
91
92VTK_ABI_NAMESPACE_BEGIN
93class VTKCOMMONTRANSFORMS_EXPORT vtkLandmarkTransform : public vtkLinearTransform
94{
95public:
97
99 void PrintSelf(ostream& os, vtkIndent indent) override;
100
102
109 vtkGetObjectMacro(SourceLandmarks, vtkPoints);
110 vtkGetObjectMacro(TargetLandmarks, vtkPoints);
112
114
123 vtkSetMacro(Mode, int);
128
130
133 vtkGetMacro(Mode, int);
134 const char* GetModeAsString();
136
141 void Inverse() override;
142
147
152
153protected:
156
157 // Update the matrix from the quaternion.
158 void InternalUpdate() override;
159
163 void InternalDeepCopy(vtkAbstractTransform* transform) override;
164
167
168 int Mode;
169
170private:
172 void operator=(const vtkLandmarkTransform&) = delete;
173};
174
176{
177 switch (this->Mode)
178 {
180 return "RigidBody";
182 return "Similarity";
184 return "Affine";
185 default:
186 return "Unrecognized";
187 }
188}
189
190VTK_ABI_NAMESPACE_END
191#endif
a simple class to control print indentation
Definition vtkIndent.h:108
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:139
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:322