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
79class vtkSpline;
81
82class VTKRENDERINGCORE_EXPORT vtkTupleInterpolator : public vtkObject
83{
84public:
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
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
185protected:
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
203private:
205 void operator=(const vtkTupleInterpolator&) = delete;
206};
207
208#endif
a simple class to control print indentation
Definition: vtkIndent.h:113
abstract base class for most VTK objects
Definition: vtkObject.h:73
Defines a 1D piecewise function.
spline abstract class for interpolating splines
Definition: vtkSpline.h:82
interpolate a tuple of arbitrary size
static vtkTupleInterpolator * New()
Instantiate the class.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void InterpolateTuple(double t, double tuple[])
Interpolate the list of tuples and determine a new tuple (i.e., fill in the tuple provided).
double GetMaximumT()
Obtain some information about the interpolation range.
vtkPiecewiseFunction ** Linear
void SetNumberOfComponents(int numComp)
Specify the number of tuple components to interpolate.
void RemoveTuple(double t)
Delete the tuple at a particular parameter t.
void Initialize()
Reset the class so that it contains no (t,tuple) information.
void AddTuple(double t, double tuple[])
Add another tuple to the list of tuples to be interpolated.
double GetMinimumT()
Obtain some information about the interpolation range.
~vtkTupleInterpolator() override
void SetInterpolationTypeToSpline()
Specify which type of function to use for interpolation.
void InitializeInterpolation()
void SetInterpolatingSpline(vtkSpline *)
If the InterpolationType is set to spline, then this method applies.
void SetInterpolationType(int type)
Specify which type of function to use for interpolation.
void SetInterpolationTypeToLinear()
Specify which type of function to use for interpolation.
int GetNumberOfTuples()
Return the number of tuples in the list of tuples to be interpolated.
@ type
Definition: vtkX3D.h:522