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 =========================================================================*/
27 #ifndef vtkImageInterpolator_h
28 #define vtkImageInterpolator_h
29 
30 #include "vtkImagingCoreModule.h" // For export macro
32 
35 {
36 public:
39  virtual void PrintSelf(ostream& os, vtkIndent indent);
40 
42 
45  virtual void SetInterpolationMode(int mode);
47  this->SetInterpolationMode(VTK_NEAREST_INTERPOLATION); }
49  this->SetInterpolationMode(VTK_LINEAR_INTERPOLATION); }
51  this->SetInterpolationMode(VTK_CUBIC_INTERPOLATION); }
52  int GetInterpolationMode() { return this->InterpolationMode; }
53  virtual const char *GetInterpolationModeAsString();
55 
61  virtual void ComputeSupportSize(const double matrix[16], int support[3]);
62 
65  virtual bool IsSeparable();
66 
68 
76  const double matrix[16], const int extent[6], int newExtent[6],
79  const float matrix[16], const int extent[6], int newExtent[6],
82 
85 
86 protected:
89 
91  virtual void InternalUpdate();
92 
95 
97 
98  virtual void GetInterpolationFunc(
99  void (**doublefunc)(
100  vtkInterpolationInfo *, const double [3], double *));
101  virtual void GetInterpolationFunc(
102  void (**floatfunc)(
103  vtkInterpolationInfo *, const float [3], float *));
105 
107 
109  void (**doublefunc)(
110  vtkInterpolationWeights *, int, int, int, double *, int));
112  void (**floatfunc)(
113  vtkInterpolationWeights *, int, int, int, float *, int));
115 
117 
118 private:
119  vtkImageInterpolator(const vtkImageInterpolator&); // Not implemented.
120  void operator=(const vtkImageInterpolator&); // Not implemented.
121 };
122 
123 #endif
vtkImageInterpolator::~vtkImageInterpolator
~vtkImageInterpolator()
vtkgl::weights
const GLbyte * weights
Definition: vtkgl.h:12766
vtkgl::obj
GLsizei GLsizei GLuint * obj
Definition: vtkgl.h:11994
vtkImageInterpolator::PrintSelf
virtual void PrintSelf(ostream &os, vtkIndent indent)
vtkInterpolationInfo
Definition: vtkImageInterpolatorInternals.h:26
vtkTypeMacro
#define vtkTypeMacro(thisClass, superclass)
Definition: vtkSetGet.h:642
VTK_CUBIC_INTERPOLATION
#define VTK_CUBIC_INTERPOLATION
Definition: vtkSystemIncludes.h:105
VTK_NEAREST_INTERPOLATION
#define VTK_NEAREST_INTERPOLATION
Definition: vtkSystemIncludes.h:103
vtkImageInterpolator::SetInterpolationModeToCubic
void SetInterpolationModeToCubic()
Definition: vtkImageInterpolator.h:50
vtkImageInterpolator::New
static vtkImageInterpolator * New()
vtkImageInterpolator
interpolate data values from images
Definition: vtkImageInterpolator.h:35
vtkImageInterpolator::GetRowInterpolationFunc
virtual void GetRowInterpolationFunc(void(**floatfunc)(vtkInterpolationWeights *, int, int, int, float *, int))
vtkImageInterpolator::SetInterpolationMode
virtual void SetInterpolationMode(int mode)
vtkImageInterpolator::IsSeparable
virtual bool IsSeparable()
vtkImageInterpolator::GetInterpolationMode
int GetInterpolationMode()
Definition: vtkImageInterpolator.h:52
vtkImageInterpolator::ComputeSupportSize
virtual void ComputeSupportSize(const double matrix[16], int support[3])
vtkImageInterpolator::vtkImageInterpolator
vtkImageInterpolator()
vtkImageInterpolator::InterpolationMode
int InterpolationMode
Definition: vtkImageInterpolator.h:116
vtkAbstractImageInterpolator.h
vtkImageInterpolator::PrecomputeWeightsForExtent
virtual void PrecomputeWeightsForExtent(const float matrix[16], const int extent[6], int newExtent[6], vtkInterpolationWeights *&weights)
vtkImageInterpolator::PrecomputeWeightsForExtent
virtual void PrecomputeWeightsForExtent(const double matrix[16], const int extent[6], int newExtent[6], vtkInterpolationWeights *&weights)
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:39
vtkImageInterpolator::InternalDeepCopy
virtual void InternalDeepCopy(vtkAbstractImageInterpolator *obj)
VTK_LINEAR_INTERPOLATION
#define VTK_LINEAR_INTERPOLATION
Definition: vtkSystemIncludes.h:104
vtkImageInterpolator::GetInterpolationFunc
virtual void GetInterpolationFunc(void(**floatfunc)(vtkInterpolationInfo *, const float[3], float *))
vtkInterpolationWeights
Definition: vtkImageInterpolatorInternals.h:39
vtkgl::matrix
GLuint GLenum matrix
Definition: vtkgl.h:16451
vtkImageInterpolator::GetInterpolationFunc
virtual void GetInterpolationFunc(void(**doublefunc)(vtkInterpolationInfo *, const double[3], double *))
vtkImagingCoreModule.h
vtkImageInterpolator::InternalUpdate
virtual void InternalUpdate()
vtkX3D::extent
@ extent
Definition: vtkX3D.h:345
VTKIMAGINGCORE_EXPORT
#define VTKIMAGINGCORE_EXPORT
Definition: vtkImagingCoreModule.h:15
vtkAbstractImageInterpolator
interpolate data values from images
Definition: vtkAbstractImageInterpolator.h:46
vtkImageInterpolator::GetRowInterpolationFunc
virtual void GetRowInterpolationFunc(void(**doublefunc)(vtkInterpolationWeights *, int, int, int, double *, int))
vtkgl::mode
GLenum mode
Definition: vtkgl.h:12325
vtkImageInterpolator::SetInterpolationModeToNearest
void SetInterpolationModeToNearest()
Definition: vtkImageInterpolator.h:46
vtkImageInterpolator::SetInterpolationModeToLinear
void SetInterpolationModeToLinear()
Definition: vtkImageInterpolator.h:48
vtkImageInterpolator::GetInterpolationModeAsString
virtual const char * GetInterpolationModeAsString()
vtkImageInterpolator::FreePrecomputedWeights
virtual void FreePrecomputedWeights(vtkInterpolationWeights *&weights)