VTK
vtkTemporalSnapToTimeStep.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkTemporalSnapToTimeStep.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 vtkTemporalSnapToTimeStep_h
36 #define vtkTemporalSnapToTimeStep_h
37 
38 #include "vtkFiltersHybridModule.h" // For export macro
40 
41 #include <vector> // used because I am a bad boy. So there.
42 
43 class VTKFILTERSHYBRID_EXPORT vtkTemporalSnapToTimeStep : public vtkPassInputTypeAlgorithm
44 {
45 public:
48  void PrintSelf(ostream& os, vtkIndent indent) override;
49 
50  enum {
51  VTK_SNAP_NEAREST=0,
53  VTK_SNAP_NEXTABOVE_OR_EQUAL
54  };
55 
56  vtkSetMacro(SnapMode,int);
57  vtkGetMacro(SnapMode,int);
58  void SetSnapModeToNearest() { this->SetSnapMode(VTK_SNAP_NEAREST); }
59  void SetSnapModeToNextBelowOrEqual() { this->SetSnapMode(VTK_SNAP_NEXTBELOW_OR_EQUAL); }
60  void SetSnapModeToNextAboveOrEqual() { this->SetSnapMode(VTK_SNAP_NEXTABOVE_OR_EQUAL); }
61 
62 protected:
64  ~vtkTemporalSnapToTimeStep() override;
65 
69  int ProcessRequest(vtkInformation* request,
70  vtkInformationVector** inputVector,
71  vtkInformationVector* outputVector) override;
72 
74  vtkInformationVector** inputVector,
75  vtkInformationVector* outputVector) override;
76 
78  vtkInformationVector** inputVector,
79  vtkInformationVector* outputVector) override;
80 
81  int RequestData(vtkInformation* request,
82  vtkInformationVector** inputVector,
83  vtkInformationVector* outputVector) override;
84 
85  std::vector<double> InputTimeValues;
87  int SnapMode;
88 
89 private:
91  void operator=(const vtkTemporalSnapToTimeStep&) = delete;
92 };
93 
94 #endif
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.
modify the time range/steps of temporal data
virtual int RequestUpdateExtent(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
This is called within ProcessRequest when each filter in the pipeline decides what portion of its inp...
a simple class to control print indentation
Definition: vtkIndent.h:39
int ProcessRequest(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector) override
see vtkAlgorithm for details
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
std::vector< double > InputTimeValues
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()