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 =========================================================================*/
37 #ifndef vtkImageBSplineInterpolator_h
38 #define vtkImageBSplineInterpolator_h
39 
40 #include "vtkImagingCoreModule.h" // For export macro
42 
43 #define VTK_IMAGE_BSPLINE_DEGREE_MAX 9
44 
45 class vtkImageData;
47 
48 class VTKIMAGINGCORE_EXPORT vtkImageBSplineInterpolator :
50 {
51 public:
54  void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
55 
57 
62  void SetSplineDegree(int degree);
63  int GetSplineDegree() { return this->SplineDegree; };
64  int GetSplineDegreeMinValue() { return 0; }
67 
74  void ComputeSupportSize(const double matrix[16], int support[3]) VTK_OVERRIDE;
75 
80  bool IsSeparable() VTK_OVERRIDE;
81 
83 
94  const double matrix[16], const int extent[6], int newExtent[6],
95  vtkInterpolationWeights *&weights) VTK_OVERRIDE;
97  const float matrix[16], const int extent[6], int newExtent[6],
98  vtkInterpolationWeights *&weights) VTK_OVERRIDE;
100 
104  void FreePrecomputedWeights(vtkInterpolationWeights *&weights) VTK_OVERRIDE;
105 
106 protected:
108  ~vtkImageBSplineInterpolator() VTK_OVERRIDE;
109 
113  void InternalUpdate() VTK_OVERRIDE;
114 
118  void InternalDeepCopy(vtkAbstractImageInterpolator *obj) VTK_OVERRIDE;
119 
121 
125  void (**doublefunc)(
126  vtkInterpolationInfo *, const double [3], double *)) VTK_OVERRIDE;
128  void (**floatfunc)(
129  vtkInterpolationInfo *, const float [3], float *)) VTK_OVERRIDE;
131 
133 
137  void (**doublefunc)(
138  vtkInterpolationWeights *, int, int, int, double *, int)) VTK_OVERRIDE;
140  void (**floatfunc)(
141  vtkInterpolationWeights *, int, int, int, float *, int)) VTK_OVERRIDE;
143 
147  virtual void BuildKernelLookupTable();
148 
152  virtual void FreeKernelLookupTable();
153 
156 
157 private:
158  vtkImageBSplineInterpolator(const vtkImageBSplineInterpolator&) VTK_DELETE_FUNCTION;
159  void operator=(const vtkImageBSplineInterpolator&) VTK_DELETE_FUNCTION;
160 };
161 
162 #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:33
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:39
virtual void GetRowInterpolationFunc(void(**doublefunc)(vtkInterpolationWeights *, int, int, int, double *, int))
Get the row 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.
virtual void GetInterpolationFunc(void(**doublefunc)(vtkInterpolationInfo *, const double [3], double *))
Get the interpolation functions.
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.