/usr/include/vtk-7.1/vtkWarpTransform.h is in libvtk7-dev 7.1.1+dfsg1-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 | /*=========================================================================
Program: Visualization Toolkit
Module: vtkWarpTransform.h
Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
All rights reserved.
See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notice for more information.
=========================================================================*/
/**
* @class vtkWarpTransform
* @brief superclass for nonlinear geometric transformations
*
* vtkWarpTransform provides a generic interface for nonlinear
* warp transformations.
* @sa
* vtkThinPlateSplineTransform vtkGridTransform vtkGeneralTransform
*/
#ifndef vtkWarpTransform_h
#define vtkWarpTransform_h
#include "vtkCommonTransformsModule.h" // For export macro
#include "vtkAbstractTransform.h"
class VTKCOMMONTRANSFORMS_EXPORT vtkWarpTransform : public vtkAbstractTransform
{
public:
vtkTypeMacro(vtkWarpTransform,vtkAbstractTransform);
void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
/**
* Invert the transformation. Warp transformations are usually
* inverted using an iterative technique such as Newton's method.
* The inverse transform is usually around five or six times as
* computationally expensive as the forward transform.
*/
void Inverse() VTK_OVERRIDE;
//@{
/**
* Get the inverse flag of the transformation. This flag is
* set to zero when the transformation is first created, and
* is flipped each time Inverse() is called.
*/
vtkGetMacro(InverseFlag,int);
//@}
//@{
/**
* Set the tolerance for inverse transformation.
* The default is 0.001.
*/
vtkSetMacro(InverseTolerance,double);
vtkGetMacro(InverseTolerance,double);
//@}
//@{
/**
* Set the maximum number of iterations for the inverse
* transformation. The default is 500, but usually only
* 2 to 5 iterations are used. The inversion method
* is fairly robust, and it should converge for nearly all smooth
* transformations that do not fold back on themselves.
*/
vtkSetMacro(InverseIterations,int);
vtkGetMacro(InverseIterations,int);
//@}
//@{
/**
* This will calculate the transformation without calling Update.
* Meant for use only within other VTK classes.
*/
void InternalTransformPoint(const float in[3], float out[3]) VTK_OVERRIDE;
void InternalTransformPoint(const double in[3], double out[3]) VTK_OVERRIDE;
//@}
//@{
/**
* This will calculate the transformation, as well as its derivative
* without calling Update. Meant for use only within other VTK
* classes.
*/
void InternalTransformDerivative(const float in[3], float out[3],
float derivative[3][3]) VTK_OVERRIDE;
void InternalTransformDerivative(const double in[3], double out[3],
double derivative[3][3]) VTK_OVERRIDE;
//@}
//@{
/**
* Do not use these methods. They exists only as a work-around for
* internal templated functions (I really didn't want to make the
* Forward/Inverse methods public, is there a decent work around
* for this sort of thing?)
*/
void TemplateTransformPoint(const float in[3], float out[3]) {
this->ForwardTransformPoint(in,out); };
void TemplateTransformPoint(const double in[3], double out[3]) {
this->ForwardTransformPoint(in,out); };
void TemplateTransformPoint(const float in[3], float out[3],
float derivative[3][3]) {
this->ForwardTransformDerivative(in,out,derivative); };
void TemplateTransformPoint(const double in[3], double out[3],
double derivative[3][3]) {
this->ForwardTransformDerivative(in,out,derivative); };
void TemplateTransformInverse(const float in[3], float out[3]) {
this->InverseTransformPoint(in,out); };
void TemplateTransformInverse(const double in[3], double out[3]) {
this->InverseTransformPoint(in,out); };
void TemplateTransformInverse(const float in[3], float out[3],
float derivative[3][3]) {
this->InverseTransformDerivative(in,out,derivative); };
void TemplateTransformInverse(const double in[3], double out[3],
double derivative[3][3]) {
this->InverseTransformDerivative(in,out,derivative); };
//@}
protected:
vtkWarpTransform();
~vtkWarpTransform() VTK_OVERRIDE;
//@{
/**
* If the InverseFlag is set to 0, then a call to InternalTransformPoint
* results in a call to ForwardTransformPoint.
*/
virtual void ForwardTransformPoint(const float in[3], float out[3]) = 0;
virtual void ForwardTransformPoint(const double in[3], double out[3]) = 0;
//@}
//@{
/**
* Calculate the forward transform as well as the derivative.
*/
virtual void ForwardTransformDerivative(const float in[3], float out[3],
float derivative[3][3]) = 0;
virtual void ForwardTransformDerivative(const double in[3], double out[3],
double derivative[3][3]) = 0;
//@}
//@{
/**
* If the InverseFlag is set to 1, then a call to InternalTransformPoint
* results in a call to InverseTransformPoint. The inverse transformation
* is calculated from using Newton's method.
*/
virtual void InverseTransformPoint(const float in[3], float out[3]);
virtual void InverseTransformPoint(const double in[3], double out[3]);
//@}
//@{
/**
* Calculate the inverse transform as well as the derivative of the
* forward transform (that's correct: the derivative of the
* forward transform, not of the inverse transform)
*/
virtual void InverseTransformDerivative(const float in[3], float out[3],
float derivative[3][3]);
virtual void InverseTransformDerivative(const double in[3], double out[3],
double derivative[3][3]);
//@}
int InverseFlag;
int InverseIterations;
double InverseTolerance;
private:
vtkWarpTransform(const vtkWarpTransform&) VTK_DELETE_FUNCTION;
void operator=(const vtkWarpTransform&) VTK_DELETE_FUNCTION;
};
#endif
|