VTK
vtkExtractTimeSteps.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkExtractTimeSteps.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 =========================================================================*/
38 #ifndef vtkExtractTimeSteps_h
39 #define vtkExtractTimeSteps_h
40 
41 #include "vtkFiltersExtractionModule.h" // for export macro
43 
44 #include <set> // for time step indices
45 
46 
47 class VTKFILTERSEXTRACTION_EXPORT vtkExtractTimeSteps : public vtkPassInputTypeAlgorithm
48 {
49 public:
51  void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
52 
53  static vtkExtractTimeSteps *New();
54 
59  {
60  return static_cast<int>(this->TimeStepIndices.size());
61  }
62 
66  void AddTimeStepIndex(int timeStepIndex);
67 
69 
73  void SetTimeStepIndices(int count, const int *timeStepIndices);
74  void GetTimeStepIndices(int *timeStepIndices) const;
76 
80  void GenerateTimeStepIndices(int begin, int end, int step);
81 
83 
87  {
88  this->TimeStepIndices.clear();
89  this->Modified();
90  }
92 
94 
98  vtkGetMacro(UseRange, bool);
99  vtkSetMacro(UseRange, bool);
100  vtkBooleanMacro(UseRange, bool);
102 
104 
107  vtkGetVector2Macro(Range, int);
108  vtkSetVector2Macro(Range, int);
110 
112 
116  vtkGetMacro(TimeStepInterval, int);
117  vtkSetClampMacro(TimeStepInterval, int, 1, VTK_INT_MAX);
119 
120 protected:
122  ~vtkExtractTimeSteps()VTK_OVERRIDE {};
123 
125  vtkInformationVector *) VTK_OVERRIDE;
127  vtkInformationVector *) VTK_OVERRIDE;
128 
129  std::set<int> TimeStepIndices;
130  bool UseRange;
131  int Range[2];
133 
134 
135 private:
136  vtkExtractTimeSteps(const vtkExtractTimeSteps&) VTK_DELETE_FUNCTION;
137  void operator=(const vtkExtractTimeSteps&) VTK_DELETE_FUNCTION;
138 };
139 
140 #endif // vtkExtractTimeSteps_h
extract specific time-steps from dataset
virtual int RequestInformation(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
This is called within ProcessRequest when a request asks for Information.
Superclass for algorithms that produce output of the same type as input.
Store vtkAlgorithm input/output information.
#define VTK_INT_MAX
Definition: vtkType.h:157
int GetNumberOfTimeSteps() const
Get the number of time steps that will be extracted.
a simple class to control print indentation
Definition: vtkIndent.h:39
virtual void Modified()
Update the modification time for this object.
vtkSetMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void ClearTimeStepIndices()
Clear the time step indices.
Store zero or more vtkInformation instances.
vtkBooleanMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
std::set< int > TimeStepIndices
virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
This is called within ProcessRequest when a request asks the algorithm to do its work.
static vtkPassInputTypeAlgorithm * New()