VTK  9.3.0
vtkTupleInterpolator.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2// SPDX-License-Identifier: BSD-3-Clause
44#ifndef vtkTupleInterpolator_h
45#define vtkTupleInterpolator_h
46
47#include "vtkObject.h"
48#include "vtkRenderingCoreModule.h" // For export macro
49
50VTK_ABI_NAMESPACE_BEGIN
51class vtkSpline;
53
54class VTKRENDERINGCORE_EXPORT vtkTupleInterpolator : public vtkObject
55{
56public:
58 void PrintSelf(ostream& os, vtkIndent indent) override;
59
64
66
70 void SetNumberOfComponents(int numComp);
71 vtkGetMacro(NumberOfComponents, int);
73
79
81
87 double GetMinimumT();
88 double GetMaximumT();
90
94 void Initialize();
95
103 void FillFromData(int nb, double* t, double** data, bool isSOADataArray = false);
104
111 void AddTuple(double t, double tuple[]);
112
117 void RemoveTuple(double t);
118
125 void InterpolateTuple(double t, double tuple[]);
126
130 enum
131 {
132 INTERPOLATION_TYPE_LINEAR = 0,
133 INTERPOLATION_TYPE_SPLINE
134 };
135
137
147 void SetInterpolationType(int type);
148 vtkGetMacro(InterpolationType, int);
149 void SetInterpolationTypeToLinear() { this->SetInterpolationType(INTERPOLATION_TYPE_LINEAR); }
150 void SetInterpolationTypeToSpline() { this->SetInterpolationType(INTERPOLATION_TYPE_SPLINE); }
152
154
163 vtkGetObjectMacro(InterpolatingSpline, vtkSpline);
165
166protected:
169
170 // The number of components being interpolated
172
173 // Specify the type of interpolation to use
175
176 // This is the default 1D spline to use
178
179 // Internal variables for interpolation functions
183
184private:
186 void operator=(const vtkTupleInterpolator&) = delete;
187};
188
189VTK_ABI_NAMESPACE_END
190#endif
a simple class to control print indentation
Definition vtkIndent.h:38
abstract base class for most VTK objects
Definition vtkObject.h:58
Defines a 1D piecewise function.
spline abstract class for interpolating splines
Definition vtkSpline.h:52
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.
void FillFromData(int nb, double *t, double **data, bool isSOADataArray=false)
Add all the tuples to the list of tuples in one time, and then sort them only once.
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.