VTK  9.5.2
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
22
23#ifndef vtkLandmarkTransform_h
24#define vtkLandmarkTransform_h
25
26#include "vtkCommonTransformsModule.h" // For export macro
27#include "vtkLinearTransform.h"
28
29#define VTK_LANDMARK_RIGIDBODY 6
30#define VTK_LANDMARK_SIMILARITY 7
31#define VTK_LANDMARK_AFFINE 12
32
33VTK_ABI_NAMESPACE_BEGIN
34class VTKCOMMONTRANSFORMS_EXPORT vtkLandmarkTransform : public vtkLinearTransform
35{
36public:
38
40 void PrintSelf(ostream& os, vtkIndent indent) override;
41
43
50 vtkGetObjectMacro(SourceLandmarks, vtkPoints);
51 vtkGetObjectMacro(TargetLandmarks, vtkPoints);
53
55
64 vtkSetMacro(Mode, int);
69
71
74 vtkGetMacro(Mode, int);
75 const char* GetModeAsString();
77
82 void Inverse() override;
83
88
93
94protected:
97
98 // Update the matrix from the quaternion.
99 void InternalUpdate() override;
100
104 void InternalDeepCopy(vtkAbstractTransform* transform) override;
105
108
109 int Mode;
110
111private:
113 void operator=(const vtkLandmarkTransform&) = delete;
114};
115
117{
118 switch (this->Mode)
119 {
121 return "RigidBody";
123 return "Similarity";
125 return "Affine";
126 default:
127 return "Unrecognized";
128 }
129}
130
131VTK_ABI_NAMESPACE_END
132#endif
a simple class to control print indentation
Definition vtkIndent.h:29
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:30
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