VTK  9.1.0
vtkTupleInterpolator.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkTupleInterpolator.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 =========================================================================*/
73 #ifndef vtkTupleInterpolator_h
74 #define vtkTupleInterpolator_h
75 
76 #include "vtkObject.h"
77 #include "vtkRenderingCoreModule.h" // For export macro
78 
79 class vtkSpline;
81 
82 class VTKRENDERINGCORE_EXPORT vtkTupleInterpolator : public vtkObject
83 {
84 public:
86  void PrintSelf(ostream& os, vtkIndent indent) override;
87 
92 
94 
98  void SetNumberOfComponents(int numComp);
99  vtkGetMacro(NumberOfComponents, int);
101 
107 
109 
115  double GetMinimumT();
116  double GetMaximumT();
118 
122  void Initialize();
123 
130  void AddTuple(double t, double tuple[]);
131 
136  void RemoveTuple(double t);
137 
144  void InterpolateTuple(double t, double tuple[]);
145 
149  enum
150  {
151  INTERPOLATION_TYPE_LINEAR = 0,
152  INTERPOLATION_TYPE_SPLINE
153  };
154 
156 
167  vtkGetMacro(InterpolationType, int);
168  void SetInterpolationTypeToLinear() { this->SetInterpolationType(INTERPOLATION_TYPE_LINEAR); }
169  void SetInterpolationTypeToSpline() { this->SetInterpolationType(INTERPOLATION_TYPE_SPLINE); }
171 
173 
182  vtkGetObjectMacro(InterpolatingSpline, vtkSpline);
184 
185 protected:
188 
189  // The number of components being interpolated
191 
192  // Specify the type of interpolation to use
194 
195  // This is the default 1D spline to use
197 
198  // Internal variables for interpolation functions
202 
203 private:
205  void operator=(const vtkTupleInterpolator&) = delete;
206 };
207 
208 #endif
vtkTupleInterpolator::NumberOfComponents
int NumberOfComponents
Definition: vtkTupleInterpolator.h:190
vtkTupleInterpolator::Linear
vtkPiecewiseFunction ** Linear
Definition: vtkTupleInterpolator.h:200
vtkTupleInterpolator::Initialize
void Initialize()
Reset the class so that it contains no (t,tuple) information.
vtkX3D::type
@ type
Definition: vtkX3D.h:522
vtkTupleInterpolator::SetInterpolatingSpline
void SetInterpolatingSpline(vtkSpline *)
If the InterpolationType is set to spline, then this method applies.
vtkObject
abstract base class for most VTK objects
Definition: vtkObject.h:82
vtkTupleInterpolator::New
static vtkTupleInterpolator * New()
Instantiate the class.
vtkTupleInterpolator::GetMaximumT
double GetMaximumT()
Obtain some information about the interpolation range.
vtkTupleInterpolator::SetInterpolationTypeToSpline
void SetInterpolationTypeToSpline()
Specify which type of function to use for interpolation.
Definition: vtkTupleInterpolator.h:169
vtkTupleInterpolator::GetNumberOfTuples
int GetNumberOfTuples()
Return the number of tuples in the list of tuples to be interpolated.
vtkTupleInterpolator::SetNumberOfComponents
void SetNumberOfComponents(int numComp)
Specify the number of tuple components to interpolate.
vtkTupleInterpolator::GetMinimumT
double GetMinimumT()
Obtain some information about the interpolation range.
vtkTupleInterpolator::SetInterpolationType
void SetInterpolationType(int type)
Specify which type of function to use for interpolation.
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:113
vtkTupleInterpolator::RemoveTuple
void RemoveTuple(double t)
Delete the tuple at a particular parameter t.
vtkSpline
spline abstract class for interpolating splines
Definition: vtkSpline.h:82
vtkTupleInterpolator::InitializeInterpolation
void InitializeInterpolation()
vtkTupleInterpolator::InterpolateTuple
void InterpolateTuple(double t, double tuple[])
Interpolate the list of tuples and determine a new tuple (i.e., fill in the tuple provided).
vtkObject.h
vtkPiecewiseFunction
Defines a 1D piecewise function.
Definition: vtkPiecewiseFunction.h:145
vtkTupleInterpolator::Spline
vtkSpline ** Spline
Definition: vtkTupleInterpolator.h:201
vtkTupleInterpolator::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkTupleInterpolator::SetInterpolationTypeToLinear
void SetInterpolationTypeToLinear()
Specify which type of function to use for interpolation.
Definition: vtkTupleInterpolator.h:168
vtkTupleInterpolator::InterpolationType
int InterpolationType
Definition: vtkTupleInterpolator.h:193
vtkTupleInterpolator
interpolate a tuple of arbitrary size
Definition: vtkTupleInterpolator.h:83
vtkTupleInterpolator::AddTuple
void AddTuple(double t, double tuple[])
Add another tuple to the list of tuples to be interpolated.
vtkTupleInterpolator::~vtkTupleInterpolator
~vtkTupleInterpolator() override
vtkTupleInterpolator::InterpolatingSpline
vtkSpline * InterpolatingSpline
Definition: vtkTupleInterpolator.h:196
vtkTupleInterpolator::vtkTupleInterpolator
vtkTupleInterpolator()