VTK
vtkImageBSplineInterpolator.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkImageBSplineInterpolator.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 =========================================================================*/
43 #ifndef vtkImageBSplineInterpolator_h
44 #define vtkImageBSplineInterpolator_h
45 
46 #include "vtkImagingCoreModule.h" // For export macro
48 
49 #define VTK_IMAGE_BSPLINE_DEGREE_MAX 9
50 
51 class vtkImageData;
53 
54 class VTKIMAGINGCORE_EXPORT vtkImageBSplineInterpolator :
56 {
57 public:
60  void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
61 
63 
68  void SetSplineDegree(int degree);
69  int GetSplineDegree() { return this->SplineDegree; };
70  int GetSplineDegreeMinValue() { return 0; }
73 
80  virtual void ComputeSupportSize(const double matrix[16], int support[3]);
81 
86  virtual bool IsSeparable();
87 
89 
99  virtual void PrecomputeWeightsForExtent(
100  const double matrix[16], const int extent[6], int newExtent[6],
101  vtkInterpolationWeights *&weights);
102  virtual void PrecomputeWeightsForExtent(
103  const float matrix[16], const int extent[6], int newExtent[6],
104  vtkInterpolationWeights *&weights);
106 
110  virtual void FreePrecomputedWeights(vtkInterpolationWeights *&weights);
111 
112 protected:
115 
119  virtual void InternalUpdate();
120 
125 
127 
130  virtual void GetInterpolationFunc(
131  void (**doublefunc)(
132  vtkInterpolationInfo *, const double [3], double *));
133  virtual void GetInterpolationFunc(
134  void (**floatfunc)(
135  vtkInterpolationInfo *, const float [3], float *));
137 
139 
142  virtual void GetRowInterpolationFunc(
143  void (**doublefunc)(
144  vtkInterpolationWeights *, int, int, int, double *, int));
145  virtual void GetRowInterpolationFunc(
146  void (**floatfunc)(
147  vtkInterpolationWeights *, int, int, int, float *, int));
149 
153  virtual void BuildKernelLookupTable();
154 
158  virtual void FreeKernelLookupTable();
159 
162 
163 private:
164  vtkImageBSplineInterpolator(const vtkImageBSplineInterpolator&) VTK_DELETE_FUNCTION;
165  void operator=(const vtkImageBSplineInterpolator&) VTK_DELETE_FUNCTION;
166 };
167 
168 #endif
interpolate data values from images
int GetSplineDegree()
Set the degree of the spline polynomial.
virtual void InternalDeepCopy(vtkAbstractImageInterpolator *obj)=0
Subclass-specific copy.
virtual void InternalUpdate()=0
Subclass-specific updates.
int GetSplineDegreeMaxValue()
Set the degree of the spline polynomial.
#define VTK_IMAGE_BSPLINE_DEGREE_MAX
a simple class to control print indentation
Definition: vtkIndent.h:39
virtual void PrecomputeWeightsForExtent(const double matrix[16], const int extent[6], int checkExtent[6], vtkInterpolationWeights *&weights)
If the data is going to be sampled on a regular grid, then the interpolation weights can be precomput...
topologically and geometrically regular array of data
Definition: vtkImageData.h:45
virtual void GetRowInterpolationFunc(void(**doublefunc)(vtkInterpolationWeights *, int, int, int, double *, int))
Get the row interpolation functions.
virtual void GetInterpolationFunc(void(**doublefunc)(vtkInterpolationInfo *, const double[3], double *))
Get the interpolation functions.
virtual bool IsSeparable()=0
True if the interpolation is separable, which means that the weights can be precomputed in order to a...
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
virtual void FreePrecomputedWeights(vtkInterpolationWeights *&weights)
Free the weights that were provided by PrecomputeWeightsForExtent.
perform b-spline interpolation on images
int GetSplineDegreeMinValue()
Set the degree of the spline polynomial.
boost::graph_traits< vtkGraph * >::degree_size_type degree(boost::graph_traits< vtkGraph * >::vertex_descriptor u, vtkGraph *g)
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...
virtual void ComputeSupportSize(const double matrix[16], int support[3])=0
Get the support size for use in computing update extents.