VTK  9.1.0
vtkWarpTransform.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Visualization Toolkit
4 Module: vtkWarpTransform.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=========================================================================*/
25#ifndef vtkWarpTransform_h
26#define vtkWarpTransform_h
27
29#include "vtkCommonTransformsModule.h" // For export macro
30
31class VTKCOMMONTRANSFORMS_EXPORT vtkWarpTransform : public vtkAbstractTransform
32{
33public:
35 void PrintSelf(ostream& os, vtkIndent indent) override;
36
43 void Inverse() override;
44
46
51 vtkGetMacro(InverseFlag, int);
53
55
59 vtkSetMacro(InverseTolerance, double);
60 vtkGetMacro(InverseTolerance, double);
62
64
71 vtkSetMacro(InverseIterations, int);
72 vtkGetMacro(InverseIterations, int);
74
76
80 void InternalTransformPoint(const float in[3], float out[3]) override;
81 void InternalTransformPoint(const double in[3], double out[3]) override;
83
85
91 const float in[3], float out[3], float derivative[3][3]) override;
93 const double in[3], double out[3], double derivative[3][3]) override;
95
97
103 void TemplateTransformPoint(const float in[3], float out[3])
104 {
105 this->ForwardTransformPoint(in, out);
106 }
107 void TemplateTransformPoint(const double in[3], double out[3])
108 {
109 this->ForwardTransformPoint(in, out);
110 }
111 void TemplateTransformPoint(const float in[3], float out[3], float derivative[3][3])
112 {
113 this->ForwardTransformDerivative(in, out, derivative);
114 }
115 void TemplateTransformPoint(const double in[3], double out[3], double derivative[3][3])
116 {
117 this->ForwardTransformDerivative(in, out, derivative);
118 }
119 void TemplateTransformInverse(const float in[3], float out[3])
120 {
121 this->InverseTransformPoint(in, out);
122 }
123 void TemplateTransformInverse(const double in[3], double out[3])
124 {
125 this->InverseTransformPoint(in, out);
126 }
127 void TemplateTransformInverse(const float in[3], float out[3], float derivative[3][3])
128 {
129 this->InverseTransformDerivative(in, out, derivative);
130 }
131 void TemplateTransformInverse(const double in[3], double out[3], double derivative[3][3])
132 {
133 this->InverseTransformDerivative(in, out, derivative);
134 }
136
137protected:
140
142
146 virtual void ForwardTransformPoint(const float in[3], float out[3]) = 0;
147 virtual void ForwardTransformPoint(const double in[3], double out[3]) = 0;
149
151
155 const float in[3], float out[3], float derivative[3][3]) = 0;
157 const double in[3], double out[3], double derivative[3][3]) = 0;
159
161
166 virtual void InverseTransformPoint(const float in[3], float out[3]);
167 virtual void InverseTransformPoint(const double in[3], double out[3]);
169
171
176 virtual void InverseTransformDerivative(const float in[3], float out[3], float derivative[3][3]);
178 const double in[3], double out[3], double derivative[3][3]);
180
184
185private:
186 vtkWarpTransform(const vtkWarpTransform&) = delete;
187 void operator=(const vtkWarpTransform&) = delete;
188};
189
190#endif
superclass for all geometric transformations
a simple class to control print indentation
Definition: vtkIndent.h:113
superclass for nonlinear geometric transformations
void InternalTransformDerivative(const float in[3], float out[3], float derivative[3][3]) override
This will calculate the transformation, as well as its derivative without calling Update.
void TemplateTransformPoint(const double in[3], double out[3])
Do not use these methods.
virtual void ForwardTransformPoint(const double in[3], double out[3])=0
If the InverseFlag is set to 0, then a call to InternalTransformPoint results in a call to ForwardTra...
void InternalTransformDerivative(const double in[3], double out[3], double derivative[3][3]) override
This will calculate the transformation, as well as its derivative without calling Update.
virtual void InverseTransformPoint(const double in[3], double out[3])
If the InverseFlag is set to 1, then a call to InternalTransformPoint results in a call to InverseTra...
void TemplateTransformPoint(const float in[3], float out[3])
Do not use these methods.
virtual void InverseTransformDerivative(const double in[3], double out[3], double derivative[3][3])
Calculate the inverse transform as well as the derivative of the forward transform (that's correct: t...
void TemplateTransformPoint(const float in[3], float out[3], float derivative[3][3])
Do not use these methods.
virtual void InverseTransformDerivative(const float in[3], float out[3], float derivative[3][3])
Calculate the inverse transform as well as the derivative of the forward transform (that's correct: t...
virtual void InverseTransformPoint(const float in[3], float out[3])
If the InverseFlag is set to 1, then a call to InternalTransformPoint results in a call to InverseTra...
void InternalTransformPoint(const double in[3], double out[3]) override
This will calculate the transformation without calling Update.
void InternalTransformPoint(const float in[3], float out[3]) override
This will calculate the transformation without calling Update.
~vtkWarpTransform() override
void TemplateTransformInverse(const float in[3], float out[3], float derivative[3][3])
Do not use these methods.
virtual void ForwardTransformDerivative(const double in[3], double out[3], double derivative[3][3])=0
Calculate the forward transform as well as the derivative.
void TemplateTransformPoint(const double in[3], double out[3], double derivative[3][3])
Do not use these methods.
void TemplateTransformInverse(const float in[3], float out[3])
Do not use these methods.
void TemplateTransformInverse(const double in[3], double out[3], double derivative[3][3])
Do not use these methods.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
virtual void ForwardTransformPoint(const float in[3], float out[3])=0
If the InverseFlag is set to 0, then a call to InternalTransformPoint results in a call to ForwardTra...
virtual void ForwardTransformDerivative(const float in[3], float out[3], float derivative[3][3])=0
Calculate the forward transform as well as the derivative.
void Inverse() override
Invert the transformation.
void TemplateTransformInverse(const double in[3], double out[3])
Do not use these methods.