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 
35 class VTKFILTERSHYBRID_EXPORT vtkGenerateTimeSteps : public vtkPassInputTypeAlgorithm
36 {
37 public:
39  void PrintSelf(ostream& os, vtkIndent indent) override;
40 
41  static vtkGenerateTimeSteps* New();
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 
78 protected:
79  vtkGenerateTimeSteps() = default;
80  ~vtkGenerateTimeSteps() override = default;
81 
85 
86  std::vector<double> TimeStepValues;
87 
88 private:
90  void operator=(const vtkGenerateTimeSteps&) = delete;
91 };
92 
93 #endif // vtkGenerateTimeSteps_h
virtual int RequestInformation(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
This is called within ProcessRequest when a request asks for Information.
std::vector< double > TimeStepValues
Superclass for algorithms that produce output of the same type as input.
Store vtkAlgorithm input/output information.
virtual int RequestUpdateExtent(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
This is called within ProcessRequest when each filter in the pipeline decides what portion of its inp...
int GetNumberOfTimeSteps() const
Get the number of time steps that will be extracted.
a simple class to control print indentation
Definition: vtkIndent.h:39
void ClearTimeStepValues()
Clear the time step values.
virtual void Modified()
Update the modification time for this object.
Generate timesteps on any input.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
Store zero or more vtkInformation instances.
virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
This is called within ProcessRequest when a request asks the algorithm to do its work.
static vtkPassInputTypeAlgorithm * New()