VTK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
vtkBSplineTransform.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: $RCSfile: vtkBSplineTransform.h,v $
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 =========================================================================*/
37 #ifndef __vtkBSplineTransform_h
38 #define __vtkBSplineTransform_h
39 
40 #include "vtkFiltersHybridModule.h" // For export macro
41 #include "vtkWarpTransform.h"
42 
43 class vtkAlgorithmOutput;
44 class vtkBSplineTransformConnectionHolder;
45 class vtkImageData;
46 
47 #define VTK_BSPLINE_EDGE 0
48 #define VTK_BSPLINE_ZERO 1
49 #define VTK_BSPLINE_ZERO_AT_BORDER 2
50 
52 {
53 public:
54  static vtkBSplineTransform *New();
56  virtual void PrintSelf(ostream& os, vtkIndent indent);
57 
59 
63  virtual void SetCoefficientConnection(vtkAlgorithmOutput*);
64  virtual void SetCoefficientData(vtkImageData*);
65  virtual vtkImageData* GetCoefficientData();
67 
69 
70  vtkSetMacro(DisplacementScale,double);
72 
74 
82  vtkSetClampMacro(BorderMode, int,
85  this->SetBorderMode(VTK_BSPLINE_EDGE); }
87  this->SetBorderMode(VTK_BSPLINE_ZERO); }
89  this->SetBorderMode(VTK_BSPLINE_ZERO_AT_BORDER); }
90  vtkGetMacro(BorderMode, int);
91  const char *GetBorderModeAsString();
93 
96 
98  unsigned long GetMTime();
99 
100 protected:
103 
105  void InternalUpdate();
106 
109 
111 
112  void ForwardTransformPoint(const float in[3], float out[3]);
113  void ForwardTransformPoint(const double in[3], double out[3]);
115 
116  void ForwardTransformDerivative(const float in[3], float out[3],
117  float derivative[3][3]);
118  void ForwardTransformDerivative(const double in[3], double out[3],
119  double derivative[3][3]);
120 
121  void InverseTransformPoint(const float in[3], float out[3]);
122  void InverseTransformPoint(const double in[3], double out[3]);
123 
124  void InverseTransformDerivative(const float in[3], float out[3],
125  float derivative[3][3]);
126  void InverseTransformDerivative(const double in[3], double out[3],
127  double derivative[3][3]);
128 
129 //BTX
130  void (*CalculateSpline)(const double point[3], double displacement[3],
131  double derivatives[3][3],
132  void *gridPtr, int inExt[6], vtkIdType inInc[3],
133  int borderMode);
134 //ETX
135 
138 
139  void *GridPointer;
140  double GridSpacing[3];
141  double GridOrigin[3];
142  int GridExtent[6];
143  vtkIdType GridIncrements[3];
144 
145 private:
146  vtkBSplineTransform(const vtkBSplineTransform&); // Not implemented.
147  void operator=(const vtkBSplineTransform&); // Not implemented.
148 
149  vtkBSplineTransformConnectionHolder* ConnectionHolder;
150 };
151 
152 #endif
#define VTK_BSPLINE_ZERO_AT_BORDER
GLuint GLenum GLenum transform
Definition: vtkgl.h:16451
virtual void ForwardTransformPoint(const float in[3], float out[3])=0
a cubic b-spline deformation transformation
virtual void InverseTransformPoint(const float in[3], float out[3])
void PrintSelf(ostream &os, vtkIndent indent)
unsigned long GetMTime()
#define vtkGetMacro(name, type)
Definition: vtkSetGet.h:83
virtual void InverseTransformDerivative(const float in[3], float out[3], float derivative[3][3])
virtual vtkAbstractTransform * MakeTransform()=0
typedef void(APIENTRYP PFNGLBLENDCOLORPROC)(GLclampf red
GLuint in
Definition: vtkgl.h:16905
#define vtkSetClampMacro(name, type, min, max)
Definition: vtkSetGet.h:133
int vtkIdType
Definition: vtkType.h:268
#define vtkTypeMacro(thisClass, superclass)
Definition: vtkSetGet.h:619
Proxy object to connect input/output ports.
virtual void ForwardTransformDerivative(const float in[3], float out[3], float derivative[3][3])=0
virtual void InternalDeepCopy(vtkAbstractTransform *)
a simple class to control print indentation
Definition: vtkIndent.h:38
#define VTKFILTERSHYBRID_EXPORT
topologically and geometrically regular array of data
Definition: vtkImageData.h:44
#define VTK_BSPLINE_EDGE
superclass for all geometric transformations
superclass for nonlinear geometric transformations
static vtkObject * New()
#define VTK_BSPLINE_ZERO
#define vtkSetMacro(name, type)
Definition: vtkSetGet.h:69