VTK  9.3.1
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
35 #ifndef vtkTupleInterpolator_h
36 #define vtkTupleInterpolator_h
37 
38 #include "vtkObject.h"
39 #include "vtkRenderingCoreModule.h" // For export macro
40 
41 VTK_ABI_NAMESPACE_BEGIN
42 class vtkSpline;
44 
45 class VTKRENDERINGCORE_EXPORT vtkTupleInterpolator : public vtkObject
46 {
47 public:
49  void PrintSelf(ostream& os, vtkIndent indent) override;
50 
54  static vtkTupleInterpolator* New();
55 
57 
61  void SetNumberOfComponents(int numComp);
62  vtkGetMacro(NumberOfComponents, int);
64 
69  int GetNumberOfTuples();
70 
72 
78  double GetMinimumT();
79  double GetMaximumT();
81 
85  void Initialize();
86 
94  void FillFromData(int nb, double* t, double** data, bool isSOADataArray = false);
95 
102  void AddTuple(double t, double tuple[]);
103 
108  void RemoveTuple(double t);
109 
116  void InterpolateTuple(double t, double tuple[]);
117 
121  enum
122  {
123  INTERPOLATION_TYPE_LINEAR = 0,
124  INTERPOLATION_TYPE_SPLINE
125  };
126 
128 
138  void SetInterpolationType(int type);
139  vtkGetMacro(InterpolationType, int);
140  void SetInterpolationTypeToLinear() { this->SetInterpolationType(INTERPOLATION_TYPE_LINEAR); }
141  void SetInterpolationTypeToSpline() { this->SetInterpolationType(INTERPOLATION_TYPE_SPLINE); }
143 
145 
153  void SetInterpolatingSpline(vtkSpline*);
154  vtkGetObjectMacro(InterpolatingSpline, vtkSpline);
156 
157 protected:
159  ~vtkTupleInterpolator() override;
160 
161  // The number of components being interpolated
163 
164  // Specify the type of interpolation to use
166 
167  // This is the default 1D spline to use
169 
170  // Internal variables for interpolation functions
171  void InitializeInterpolation();
174 
175 private:
177  void operator=(const vtkTupleInterpolator&) = delete;
178 };
179 
180 VTK_ABI_NAMESPACE_END
181 #endif
abstract base class for most VTK objects
Definition: vtkObject.h:51
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
Defines a 1D piecewise function.
interpolate a tuple of arbitrary size
void SetInterpolationTypeToSpline()
Specify which type of function to use for interpolation.
a simple class to control print indentation
Definition: vtkIndent.h:28
void SetInterpolationTypeToLinear()
Specify which type of function to use for interpolation.
spline abstract class for interpolating splines
Definition: vtkSpline.h:51
vtkPiecewiseFunction ** Linear
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...