VTK
vtkImageInterpolator.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkImageInterpolator.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 =========================================================================*/
31 #ifndef vtkImageInterpolator_h
32 #define vtkImageInterpolator_h
33 
34 #include "vtkImagingCoreModule.h" // For export macro
36 
37 class VTKIMAGINGCORE_EXPORT vtkImageInterpolator :
39 {
40 public:
41  static vtkImageInterpolator *New();
43  void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
44 
46 
50  virtual void SetInterpolationMode(int mode);
52  this->SetInterpolationMode(VTK_NEAREST_INTERPOLATION); }
54  this->SetInterpolationMode(VTK_LINEAR_INTERPOLATION); }
56  this->SetInterpolationMode(VTK_CUBIC_INTERPOLATION); }
57  int GetInterpolationMode() { return this->InterpolationMode; }
58  virtual const char *GetInterpolationModeAsString();
60 
67  virtual void ComputeSupportSize(const double matrix[16], int support[3]) VTK_OVERRIDE;
68 
73  virtual bool IsSeparable() VTK_OVERRIDE;
74 
76 
85  virtual void PrecomputeWeightsForExtent(
86  const double matrix[16], const int extent[6], int newExtent[6],
87  vtkInterpolationWeights *&weights) VTK_OVERRIDE;
88  virtual void PrecomputeWeightsForExtent(
89  const float matrix[16], const int extent[6], int newExtent[6],
90  vtkInterpolationWeights *&weights) VTK_OVERRIDE;
92 
96  virtual void FreePrecomputedWeights(vtkInterpolationWeights *&weights) VTK_OVERRIDE;
97 
98 protected:
100  ~vtkImageInterpolator();
101 
105  virtual void InternalUpdate() VTK_OVERRIDE;
106 
110  virtual void InternalDeepCopy(vtkAbstractImageInterpolator *obj) VTK_OVERRIDE;
111 
113 
116  virtual void GetInterpolationFunc(
117  void (**doublefunc)(
118  vtkInterpolationInfo *, const double [3], double *)) VTK_OVERRIDE;
119  virtual void GetInterpolationFunc(
120  void (**floatfunc)(
121  vtkInterpolationInfo *, const float [3], float *)) VTK_OVERRIDE;
123 
125 
128  virtual void GetRowInterpolationFunc(
129  void (**doublefunc)(
130  vtkInterpolationWeights *, int, int, int, double *, int)) VTK_OVERRIDE;
131  virtual void GetRowInterpolationFunc(
132  void (**floatfunc)(
133  vtkInterpolationWeights *, int, int, int, float *, int)) VTK_OVERRIDE;
135 
136  int InterpolationMode;
137 
138 private:
139  vtkImageInterpolator(const vtkImageInterpolator&) VTK_DELETE_FUNCTION;
140  void operator=(const vtkImageInterpolator&) VTK_DELETE_FUNCTION;
141 };
142 
143 #endif
interpolate data values from images
#define VTK_LINEAR_INTERPOLATION
#define VTK_CUBIC_INTERPOLATION
void SetInterpolationModeToNearest()
The interpolation mode for point scalars (default: linear).
a simple class to control print indentation
Definition: vtkIndent.h:39
int GetInterpolationMode()
The interpolation mode for point scalars (default: linear).
void SetInterpolationModeToLinear()
The interpolation mode for point scalars (default: linear).
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.
interpolate data values from images
void SetInterpolationModeToCubic()
The interpolation mode for point scalars (default: linear).
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...
#define VTK_NEAREST_INTERPOLATION
virtual void ComputeSupportSize(const double matrix[16], int support[3])=0
Get the support size for use in computing update extents.