VTK  9.0.1
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 
28 #include "vtkAbstractTransform.h"
29 #include "vtkCommonTransformsModule.h" // For export macro
30 
31 class VTKCOMMONTRANSFORMS_EXPORT vtkWarpTransform : public vtkAbstractTransform
32 {
33 public:
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 
137 protected:
139  ~vtkWarpTransform() override;
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 
185 private:
186  vtkWarpTransform(const vtkWarpTransform&) = delete;
187  void operator=(const vtkWarpTransform&) = delete;
188 };
189 
190 #endif
vtkWarpTransform::ForwardTransformPoint
virtual void ForwardTransformPoint(const double in[3], double out[3])=0
vtkAbstractTransform
superclass for all geometric transformations
Definition: vtkAbstractTransform.h:51
vtkWarpTransform::TemplateTransformPoint
void TemplateTransformPoint(const double in[3], double out[3])
Definition: vtkWarpTransform.h:107
vtkWarpTransform::TemplateTransformPoint
void TemplateTransformPoint(const float in[3], float out[3])
Do not use these methods.
Definition: vtkWarpTransform.h:103
vtkAbstractTransform.h
vtkWarpTransform::TemplateTransformPoint
void TemplateTransformPoint(const double in[3], double out[3], double derivative[3][3])
Definition: vtkWarpTransform.h:115
vtkWarpTransform::InverseTransformDerivative
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...
vtkWarpTransform::InverseTransformDerivative
virtual void InverseTransformDerivative(const double in[3], double out[3], double derivative[3][3])
vtkWarpTransform::InternalTransformDerivative
void InternalTransformDerivative(const double in[3], double out[3], double derivative[3][3]) override
vtkWarpTransform::ForwardTransformPoint
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...
vtkWarpTransform::Inverse
void Inverse() override
Invert the transformation.
vtkWarpTransform::ForwardTransformDerivative
virtual void ForwardTransformDerivative(const float in[3], float out[3], float derivative[3][3])=0
Calculate the forward transform as well as the derivative.
vtkWarpTransform::InternalTransformDerivative
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.
vtkWarpTransform::TemplateTransformInverse
void TemplateTransformInverse(const float in[3], float out[3])
Definition: vtkWarpTransform.h:119
vtkWarpTransform::InternalTransformPoint
void InternalTransformPoint(const double in[3], double out[3]) override
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:34
vtkWarpTransform::InverseIterations
int InverseIterations
Definition: vtkWarpTransform.h:182
vtkWarpTransform::InverseTolerance
double InverseTolerance
Definition: vtkWarpTransform.h:183
vtkWarpTransform::TemplateTransformInverse
void TemplateTransformInverse(const float in[3], float out[3], float derivative[3][3])
Definition: vtkWarpTransform.h:127
vtkWarpTransform::InverseFlag
int InverseFlag
Definition: vtkWarpTransform.h:181
vtkWarpTransform::TemplateTransformInverse
void TemplateTransformInverse(const double in[3], double out[3])
Definition: vtkWarpTransform.h:123
vtkWarpTransform::~vtkWarpTransform
~vtkWarpTransform() override
vtkWarpTransform::TemplateTransformPoint
void TemplateTransformPoint(const float in[3], float out[3], float derivative[3][3])
Definition: vtkWarpTransform.h:111
vtkWarpTransform::TemplateTransformInverse
void TemplateTransformInverse(const double in[3], double out[3], double derivative[3][3])
Definition: vtkWarpTransform.h:131
vtkWarpTransform::ForwardTransformDerivative
virtual void ForwardTransformDerivative(const double in[3], double out[3], double derivative[3][3])=0
vtkWarpTransform::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkWarpTransform::InternalTransformPoint
void InternalTransformPoint(const float in[3], float out[3]) override
This will calculate the transformation without calling Update.
vtkWarpTransform::InverseTransformPoint
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...
vtkWarpTransform::vtkWarpTransform
vtkWarpTransform()
vtkWarpTransform
superclass for nonlinear geometric transformations
Definition: vtkWarpTransform.h:32
vtkWarpTransform::InverseTransformPoint
virtual void InverseTransformPoint(const double in[3], double out[3])