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
51class vtkImageData;
53
54class VTKIMAGINGCORE_EXPORT vtkImageBSplineInterpolator :
56{
57public:
60 void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
61
63
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
100 const double matrix[16], const int extent[6], int newExtent[6],
101 vtkInterpolationWeights *&weights);
103 const float matrix[16], const int extent[6], int newExtent[6],
104 vtkInterpolationWeights *&weights);
106
111
112protected:
115
119 virtual void InternalUpdate();
120
125
127
131 void (**doublefunc)(
132 vtkInterpolationInfo *, const double [3], double *));
134 void (**floatfunc)(
135 vtkInterpolationInfo *, const float [3], float *));
137
139
143 void (**doublefunc)(
144 vtkInterpolationWeights *, int, int, int, double *, int));
146 void (**floatfunc)(
147 vtkInterpolationWeights *, int, int, int, float *, int));
149
154
158 virtual void FreeKernelLookupTable();
159
162
163private:
165 void operator=(const vtkImageBSplineInterpolator&) VTK_DELETE_FUNCTION;
166};
167
168#endif
interpolate data values from images
perform b-spline interpolation on images
virtual void BuildKernelLookupTable()
Build the lookup tables used for the interpolation.
virtual void ComputeSupportSize(const double matrix[16], int support[3])
Get the support size for use in computing update extents.
virtual void PrecomputeWeightsForExtent(const float matrix[16], const int extent[6], int newExtent[6], vtkInterpolationWeights *&weights)
virtual void FreeKernelLookupTable()
Free the kernel lookup tables.
virtual void GetRowInterpolationFunc(void(**floatfunc)(vtkInterpolationWeights *, int, int, int, float *, int))
virtual void InternalUpdate()
Update the interpolator.
void SetSplineDegree(int degree)
Set the degree of the spline polynomial.
virtual void PrecomputeWeightsForExtent(const double matrix[16], const int extent[6], int newExtent[6], vtkInterpolationWeights *&weights)
If the data is going to be sampled on a regular grid, then the interpolation weights can be precomput...
virtual bool IsSeparable()
Returns true if the interpolator supports weight precomputation.
static vtkImageBSplineInterpolator * New()
virtual void InternalDeepCopy(vtkAbstractImageInterpolator *obj)
Copy the interpolator.
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.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
virtual void GetInterpolationFunc(void(**floatfunc)(vtkInterpolationInfo *, const float[3], float *))
virtual void FreePrecomputedWeights(vtkInterpolationWeights *&weights)
Free the precomputed weights.
topologically and geometrically regular array of data
Definition: vtkImageData.h:46
a simple class to control print indentation
Definition: vtkIndent.h:40
@ extent
Definition: vtkX3D.h:345
boost::graph_traits< vtkGraph * >::degree_size_type degree(boost::graph_traits< vtkGraph * >::vertex_descriptor u, vtkGraph *g)
#define VTK_IMAGE_BSPLINE_DEGREE_MAX