VTK  9.4.20241222
vtkTemporalInterpolator.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
46#ifndef vtkTemporalInterpolator_h
47#define vtkTemporalInterpolator_h
48
49#include "vtkFiltersHybridModule.h" // For export macro
51
52VTK_ABI_NAMESPACE_BEGIN
53class vtkDataSet;
54class VTKFILTERSHYBRID_EXPORT vtkTemporalInterpolator : public vtkMultiTimeStepAlgorithm
55{
56public:
59 void PrintSelf(ostream& os, vtkIndent indent) override;
60
62
71 vtkSetMacro(DiscreteTimeStepInterval, double);
72 vtkGetMacro(DiscreteTimeStepInterval, double);
74
76
85 vtkSetMacro(ResampleFactor, int);
86 vtkGetMacro(ResampleFactor, int);
88
90
94 vtkSetMacro(CacheData, bool);
95 vtkGetMacro(CacheData, bool);
97
98protected:
101
104
105 int FillInputPortInformation(int port, vtkInformation* info) override;
106 int FillOutputPortInformation(int vtkNotUsed(port), vtkInformation* info) override;
107
111 int Execute(vtkInformation* request, const std::vector<vtkSmartPointer<vtkDataObject>>& inputs,
112 vtkInformationVector* outputVector) override;
113
119
125 virtual vtkDataSet* InterpolateDataSet(vtkDataSet* in1, vtkDataSet* in2, double ratio);
126
131 virtual vtkDataArray* InterpolateDataArray(double ratio, vtkDataArray** arrays, vtkIdType N);
132
135 {
136 MATCHED = 0,
137 MISMATCHED_TUPLES = 1,
138 MISMATCHED_COMPS = 2
139 };
140
145 virtual ArrayMatch VerifyArrays(vtkDataArray** arrays, int N);
146
147 // internally used : Ratio is {0,1} between two time steps
148 // DeltaT is time between current 2 steps.
149 // These are only valid when 2 time steps are interpolated
150 // Higher order schemes will require changes to the API
151 double Ratio;
152 double DeltaT;
153 double Tfrac;
154
155private:
157 void operator=(const vtkTemporalInterpolator&) = delete;
158};
159
160VTK_ABI_NAMESPACE_END
161#endif
abstract superclass for arrays of numeric data
general representation of visualization data
abstract class to specify dataset behavior
Definition vtkDataSet.h:165
a simple class to control print indentation
Definition vtkIndent.h:108
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
Superclass for algorithms that would like to make multiple time requests.
Hold a reference to a vtkObjectBase instance.
interpolate datasets between time steps to produce a new dataset
~vtkTemporalInterpolator() override
vtkDataObject * InterpolateDataObject(vtkDataObject *in1, vtkDataObject *in2, double ratio)
General interpolation routine for any type on input data.
int RequestUpdateExtent(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
int Execute(vtkInformation *request, const std::vector< vtkSmartPointer< vtkDataObject > > &inputs, vtkInformationVector *outputVector) override
virtual vtkDataSet * InterpolateDataSet(vtkDataSet *in1, vtkDataSet *in2, double ratio)
Root level interpolation for a concrete dataset object.
virtual ArrayMatch VerifyArrays(vtkDataArray **arrays, int N)
Called just before interpolation of each dataset to ensure each data array has the same number of tup...
int RequestDataObject(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
int FillOutputPortInformation(int vtkNotUsed(port), vtkInformation *info) override
virtual vtkDataArray * InterpolateDataArray(double ratio, vtkDataArray **arrays, vtkIdType N)
Interpolate a single vtkDataArray.
int FillInputPortInformation(int port, vtkInformation *info) override
Fill the input port information objects for this algorithm.
static vtkTemporalInterpolator * New()
ArrayMatch
Return values for VerifyArrays().
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
int RequestInformation(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
int vtkIdType
Definition vtkType.h:315