VTK  9.3.20240418
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 
52 VTK_ABI_NAMESPACE_BEGIN
53 class vtkDataSet;
54 class VTKFILTERSHYBRID_EXPORT vtkTemporalInterpolator : public vtkMultiTimeStepAlgorithm
55 {
56 public:
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 
98 protected:
101 
104 
106  int FillOutputPortInformation(int vtkNotUsed(port), vtkInformation* info) override;
107 
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 
155 private:
157  void operator=(const vtkTemporalInterpolator&) = delete;
158 };
159 
160 VTK_ABI_NAMESPACE_END
161 #endif
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:155
general representation of visualization data
abstract class to specify dataset behavior
Definition: vtkDataSet.h:166
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.
interpolate datasets between time steps to produce a new dataset
virtual vtkDataArray * InterpolateDataArray(double ratio, vtkDataArray **arrays, vtkIdType N)
Interpolate a single vtkDataArray.
~vtkTemporalInterpolator() override
int RequestUpdateExtent(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
vtkDataObject * InterpolateDataObject(vtkDataObject *in1, vtkDataObject *in2, double ratio)
General interpolation routine for any type on input data.
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
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.
@ vector
Definition: vtkX3D.h:237
@ info
Definition: vtkX3D.h:376
@ port
Definition: vtkX3D.h:447
int vtkIdType
Definition: vtkType.h:315