VTK
vtkBSplineTransform.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Visualization Toolkit
4 Module: vtkBSplineTransform.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=========================================================================*/
38#ifndef vtkBSplineTransform_h
39#define vtkBSplineTransform_h
40
41#include "vtkFiltersHybridModule.h" // For export macro
42#include "vtkWarpTransform.h"
43
45class vtkBSplineTransformConnectionHolder;
46class vtkImageData;
47
48#define VTK_BSPLINE_EDGE 0
49#define VTK_BSPLINE_ZERO 1
50#define VTK_BSPLINE_ZERO_AT_BORDER 2
51
52class VTKFILTERSHYBRID_EXPORT vtkBSplineTransform : public vtkWarpTransform
53{
54public:
57 void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
58
60
70
72
75 vtkSetMacro(DisplacementScale, double);
76 vtkGetMacro(DisplacementScale, double);
78
80
90 vtkSetClampMacro(BorderMode, int,
93 this->SetBorderMode(VTK_BSPLINE_EDGE); }
95 this->SetBorderMode(VTK_BSPLINE_ZERO); }
97 this->SetBorderMode(VTK_BSPLINE_ZERO_AT_BORDER); }
98 vtkGetMacro(BorderMode, int);
99 const char *GetBorderModeAsString();
101
106
111
112protected:
115
120
125
127
130 void ForwardTransformPoint(const float in[3], float out[3]);
131 void ForwardTransformPoint(const double in[3], double out[3]);
133
134 void ForwardTransformDerivative(const float in[3], float out[3],
135 float derivative[3][3]);
136 void ForwardTransformDerivative(const double in[3], double out[3],
137 double derivative[3][3]);
138
139 void InverseTransformPoint(const float in[3], float out[3]);
140 void InverseTransformPoint(const double in[3], double out[3]);
141
142 void InverseTransformDerivative(const float in[3], float out[3],
143 float derivative[3][3]);
144 void InverseTransformDerivative(const double in[3], double out[3],
145 double derivative[3][3]);
146
147 void (*CalculateSpline)(const double point[3], double displacement[3],
148 double derivatives[3][3],
149 void *gridPtr, int inExt[6], vtkIdType inInc[3],
150 int borderMode);
151
154
156 double GridSpacing[3];
157 double GridOrigin[3];
158 int GridExtent[6];
159 vtkIdType GridIncrements[3];
160
161private:
162 vtkBSplineTransform(const vtkBSplineTransform&) VTK_DELETE_FUNCTION;
163 void operator=(const vtkBSplineTransform&) VTK_DELETE_FUNCTION;
164
165 vtkBSplineTransformConnectionHolder* ConnectionHolder;
166};
167
168#endif
superclass for all geometric transformations
Proxy object to connect input/output ports.
a cubic b-spline deformation transformation
void ForwardTransformDerivative(const double in[3], double out[3], double derivative[3][3])
void ForwardTransformPoint(const float in[3], float out[3])
Internal functions for calculating the transformation.
const char * GetBorderModeAsString()
virtual void SetCoefficientData(vtkImageData *)
void InverseTransformPoint(const double in[3], double out[3])
void ForwardTransformDerivative(const float in[3], float out[3], float derivative[3][3])
Calculate the forward transform as well as the derivative.
static vtkBSplineTransform * New()
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 InternalDeepCopy(vtkAbstractTransform *transform)
Copy this transform from another of the same type.
void ForwardTransformPoint(const double in[3], double out[3])
virtual vtkImageData * GetCoefficientData()
vtkAbstractTransform * MakeTransform()
Make another transform of the same type.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
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...
void InternalUpdate()
Update the displacement grid.
vtkMTimeType GetMTime()
Get the MTime.
void InverseTransformDerivative(const double in[3], double out[3], double derivative[3][3])
virtual void SetCoefficientConnection(vtkAlgorithmOutput *)
Set/Get the coefficient grid for the b-spline transform.
topologically and geometrically regular array of data
Definition: vtkImageData.h:46
a simple class to control print indentation
Definition: vtkIndent.h:40
superclass for nonlinear geometric transformations
@ point
Definition: vtkX3D.h:236
#define VTK_BSPLINE_ZERO_AT_BORDER
#define VTK_BSPLINE_EDGE
#define VTK_BSPLINE_ZERO
vtkSetMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
int vtkIdType
Definition: vtkType.h:287
vtkTypeUInt64 vtkMTimeType
Definition: vtkType.h:248