VTK  9.2.6
vtkGenerateTimeSteps.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Visualization Toolkit
4 Module: vtkGenerateTimeSteps.h
5
6 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7 All rights reserved.
8 See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9
10 This software is distributed WITHOUT ANY WARRANTY; without even
11 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12 PURPOSE. See the above copyright notice for more information.
13
14=========================================================================*/
27#ifndef vtkGenerateTimeSteps_h
28#define vtkGenerateTimeSteps_h
29
30#include "vtkFiltersHybridModule.h" // for export macro
32
33#include <vector> // for time steps
34
35class VTKFILTERSHYBRID_EXPORT vtkGenerateTimeSteps : public vtkPassInputTypeAlgorithm
36{
37public:
39 void PrintSelf(ostream& os, vtkIndent indent) override;
40
42
46 int GetNumberOfTimeSteps() const { return static_cast<int>(this->TimeStepValues.size()); }
47
51 void AddTimeStepValue(double timeStepValue);
52
54
58 void SetTimeStepValues(int count, const double* timeStepValues);
59 void GetTimeStepValues(double* timeStepValues) const;
61
65 void GenerateTimeStepValues(double begin, double end, double step);
66
68
72 {
73 this->TimeStepValues.clear();
74 this->Modified();
75 }
77
78protected:
80 ~vtkGenerateTimeSteps() override = default;
81
85
86 std::vector<double> TimeStepValues;
87
88private:
90 void operator=(const vtkGenerateTimeSteps&) = delete;
91};
92
93#endif // vtkGenerateTimeSteps_h
Generate timesteps on any input.
void GetTimeStepValues(double *timeStepValues) const
Get/Set an array of time step values.
int GetNumberOfTimeSteps() const
Get the number of time steps that will be extracted.
~vtkGenerateTimeSteps() override=default
std::vector< double > TimeStepValues
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called within ProcessRequest when a request asks the algorithm to do its work.
vtkGenerateTimeSteps()=default
int RequestUpdateExtent(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called within ProcessRequest when each filter in the pipeline decides what portion of its inp...
static vtkGenerateTimeSteps * New()
int RequestInformation(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called within ProcessRequest when a request asks for Information.
void SetTimeStepValues(int count, const double *timeStepValues)
Get/Set an array of time step values.
void GenerateTimeStepValues(double begin, double end, double step)
Generate a range of values in [begin, end) with a step size of 'step'.
void AddTimeStepValue(double timeStepValue)
Add a time step value.
void ClearTimeStepValues()
Clear the time step values.
a simple class to control print indentation
Definition vtkIndent.h:40
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
virtual void Modified()
Update the modification time for this object.
Superclass for algorithms that produce output of the same type as input.