VTK  9.4.20250313
vtkTemporalArrayOperatorFilter.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
18#ifndef vtkTemporalArrayOperatorFilter_h
19#define vtkTemporalArrayOperatorFilter_h
20
21#include "vtkFiltersHybridModule.h" // For export macro
23
24VTK_ABI_NAMESPACE_BEGIN
25class VTKFILTERSHYBRID_EXPORT vtkTemporalArrayOperatorFilter : public vtkMultiTimeStepAlgorithm
26{
27public:
30 void PrintSelf(ostream& os, vtkIndent indent) override;
31
33 {
34 ADD = 0,
35 SUB = 1,
36 MUL = 2,
37 DIV = 3
38 };
39
41
44 vtkSetMacro(Operator, int);
45 vtkGetMacro(Operator, int);
47
49
52 vtkSetMacro(FirstTimeStepIndex, int);
53 vtkGetMacro(FirstTimeStepIndex, int);
55
57
60 vtkSetMacro(SecondTimeStepIndex, int);
61 vtkGetMacro(SecondTimeStepIndex, int);
63
65
70 vtkSetStringMacro(OutputArrayNameSuffix);
71 vtkGetStringMacro(OutputArrayNameSuffix);
73
75
86 vtkSetMacro(RelativeMode, bool);
87 vtkGetMacro(RelativeMode, bool);
88 vtkBooleanMacro(RelativeMode, bool);
90
92
100 vtkSetMacro(TimeStepShift, int);
101 vtkGetMacro(TimeStepShift, int);
103
104protected:
107
110
114 int Execute(vtkInformation* request, const std::vector<vtkSmartPointer<vtkDataObject>>& inputs,
115 vtkInformationVector* outputVector) override;
116
121
122private:
124 void operator=(const vtkTemporalArrayOperatorFilter&) = delete;
125
129 std::string GetOperatorAsString();
130
136 void GetTimeStepsToUse(int timeSteps[2]);
137
138 int Operator = OperatorType::ADD;
139 int FirstTimeStepIndex = 0;
140 int SecondTimeStepIndex = 0;
141 int NumberTimeSteps = 0;
142 char* OutputArrayNameSuffix = nullptr;
143
144 bool RelativeMode = false;
145 int TimeStepShift = -1;
146};
147
148VTK_ABI_NAMESPACE_END
149#endif
abstract superclass for arrays of numeric data
general representation of visualization data
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.
perform simple mathematical operation on a data array at different time
int RequestInformation(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
int RequestUpdateExtent(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
int FillInputPortInformation(int, vtkInformation *) override
Fill the input port information objects for this algorithm.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
static vtkTemporalArrayOperatorFilter * New()
int FillOutputPortInformation(int, vtkInformation *) override
Fill the output port information objects for this algorithm.
virtual vtkDataObject * ProcessDataObject(vtkDataObject *, vtkDataObject *)
int RequestDataObject(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
virtual vtkDataObject * Process(vtkDataObject *, vtkDataObject *)
virtual vtkDataArray * ProcessDataArray(vtkDataArray *, vtkDataArray *)
int Execute(vtkInformation *request, const std::vector< vtkSmartPointer< vtkDataObject > > &inputs, vtkInformationVector *outputVector) override
~vtkTemporalArrayOperatorFilter() override