VTK  9.2.6
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
47#include "vtkImagingCoreModule.h" // For export macro
48
49#define VTK_IMAGE_BSPLINE_DEGREE_MAX 9
50
51class vtkImageData;
53
55{
56public:
59 void PrintSelf(ostream& os, vtkIndent indent) override;
60
62
68 int GetSplineDegree() { return this->SplineDegree; }
69 int GetSplineDegreeMinValue() { return 0; }
72
79 void ComputeSupportSize(const double matrix[16], int size[3]) override;
80
85 bool IsSeparable() override;
86
88
98 void PrecomputeWeightsForExtent(const double matrix[16], const int extent[6], int newExtent[6],
99 vtkInterpolationWeights*& weights) override;
100 void PrecomputeWeightsForExtent(const float matrix[16], const int extent[6], int newExtent[6],
101 vtkInterpolationWeights*& weights) override;
103
108
109protected:
112
116 void InternalUpdate() override;
117
122
124
128 void (**doublefunc)(vtkInterpolationInfo*, const double[3], double*)) override;
130 void (**floatfunc)(vtkInterpolationInfo*, const float[3], float*)) override;
132
134
138 void (**doublefunc)(vtkInterpolationWeights*, int, int, int, double*, int)) override;
140 void (**floatfunc)(vtkInterpolationWeights*, int, int, int, float*, int)) override;
142
147
151 virtual void FreeKernelLookupTable();
152
155
156private:
158 void operator=(const vtkImageBSplineInterpolator&) = delete;
159};
160
161#endif
interpolate data values from images
perform b-spline interpolation on images
virtual void BuildKernelLookupTable()
Build the lookup tables used for the interpolation.
void GetRowInterpolationFunc(void(**floatfunc)(vtkInterpolationWeights *, int, int, int, float *, int)) override
Get the row interpolation functions.
void InternalUpdate() override
Update the interpolator.
void PrecomputeWeightsForExtent(const double matrix[16], const int extent[6], int newExtent[6], vtkInterpolationWeights *&weights) override
If the data is going to be sampled on a regular grid, then the interpolation weights can be precomput...
void GetRowInterpolationFunc(void(**doublefunc)(vtkInterpolationWeights *, int, int, int, double *, int)) override
Get the row interpolation functions.
virtual void FreeKernelLookupTable()
Free the kernel lookup tables.
void InternalDeepCopy(vtkAbstractImageInterpolator *obj) override
Copy the interpolator.
int GetSplineDegreeMinValue()
Set the degree of the spline polynomial.
~vtkImageBSplineInterpolator() override
void SetSplineDegree(int degree)
Set the degree of the spline polynomial.
int GetSplineDegreeMaxValue()
Set the degree of the spline polynomial.
void GetInterpolationFunc(void(**floatfunc)(vtkInterpolationInfo *, const float[3], float *)) override
Get the interpolation functions.
static vtkImageBSplineInterpolator * New()
void PrecomputeWeightsForExtent(const float matrix[16], const int extent[6], int newExtent[6], vtkInterpolationWeights *&weights) override
If the data is going to be sampled on a regular grid, then the interpolation weights can be precomput...
void GetInterpolationFunc(void(**doublefunc)(vtkInterpolationInfo *, const double[3], double *)) override
Get the interpolation functions.
void FreePrecomputedWeights(vtkInterpolationWeights *&weights) override
Free the precomputed weights.
bool IsSeparable() override
Returns true if the interpolator supports weight precomputation.
int GetSplineDegree()
Set the degree of the spline polynomial.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void ComputeSupportSize(const double matrix[16], int size[3]) override
Get the support size for use in computing update extents.
topologically and geometrically regular array of data
Definition: vtkImageData.h:54
a simple class to control print indentation
Definition: vtkIndent.h:40
boost::graph_traits< vtkGraph * >::degree_size_type degree(boost::graph_traits< vtkGraph * >::vertex_descriptor u, vtkGraph *g)
#define VTK_IMAGE_BSPLINE_DEGREE_MAX