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 =========================================================================*/
35 #ifndef vtkExtractTimeSteps_h
36 #define vtkExtractTimeSteps_h
37 
38 #include "vtkFiltersExtractionModule.h" // for export macro
40 
41 #include <set> // for time step indices
42 
43 
44 class VTKFILTERSEXTRACTION_EXPORT vtkExtractTimeSteps : public vtkPassInputTypeAlgorithm
45 {
46 public:
48  void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
49 
50  static vtkExtractTimeSteps *New();
51 
56  {
57  return static_cast<int>(this->TimeStepIndices.size());
58  }
59 
63  void AddTimeStepIndex(int timeStepIndex);
64 
66 
70  void SetTimeStepIndices(int count, const int *timeStepIndices);
71  void GetTimeStepIndices(int *timeStepIndices) const;
73 
77  void GenerateTimeStepIndices(int begin, int end, int step);
78 
80 
84  {
85  this->TimeStepIndices.clear();
86  this->Modified();
87  }
89 
91 
95  vtkGetMacro(UseRange, bool);
96  vtkSetMacro(UseRange, bool);
97  vtkBooleanMacro(UseRange, bool);
99 
101 
104  vtkGetVector2Macro(Range, int);
105  vtkSetVector2Macro(Range, int);
107 
109 
113  vtkGetMacro(TimeStepInterval, int);
114  vtkSetClampMacro(TimeStepInterval, int, 1, VTK_INT_MAX);
116 
117 protected:
119  ~vtkExtractTimeSteps()VTK_OVERRIDE {};
120 
122  vtkInformationVector *) VTK_OVERRIDE;
123  int RequestInformation(vtkInformation *, vtkInformationVector **,
124  vtkInformationVector *) VTK_OVERRIDE;
125 
126  std::set<int> TimeStepIndices;
127  bool UseRange;
128  int Range[2];
129  int TimeStepInterval;
130 
131 
132 private:
133  vtkExtractTimeSteps(const vtkExtractTimeSteps&) VTK_DELETE_FUNCTION;
134  void operator=(const vtkExtractTimeSteps&) VTK_DELETE_FUNCTION;
135 };
136 
137 #endif // vtkExtractTimeSteps_h
extract specific time-steps from dataset
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
a simple class to control print indentation
Definition: vtkIndent.h:33
virtual void Modified()
Update the modification time for this object.
vtkSetMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
int GetNumberOfTimeSteps() const
Get the number of time steps that will be extracted.
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.
virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
This is called within ProcessRequest when a request asks the algorithm to do its work.
static vtkPassInputTypeAlgorithm * New()