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 =========================================================================*/
32 #ifndef vtkTemporalSnapToTimeStep_h
33 #define vtkTemporalSnapToTimeStep_h
34 
35 #include "vtkFiltersHybridModule.h" // For export macro
37 
38 #include <vector> // used because I am a bad boy. So there.
39 
40 class VTKFILTERSHYBRID_EXPORT vtkTemporalSnapToTimeStep : public vtkPassInputTypeAlgorithm
41 {
42 public:
45  void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
46 
47  enum {
48  VTK_SNAP_NEAREST=0,
50  VTK_SNAP_NEXTABOVE_OR_EQUAL
51  };
52 
53  vtkSetMacro(SnapMode,int);
54  vtkGetMacro(SnapMode,int);
55  void SetSnapModeToNearest() { this->SetSnapMode(VTK_SNAP_NEAREST); }
56  void SetSnapModeToNextBelowOrEqual() { this->SetSnapMode(VTK_SNAP_NEXTBELOW_OR_EQUAL); }
57  void SetSnapModeToNextAboveOrEqual() { this->SetSnapMode(VTK_SNAP_NEXTABOVE_OR_EQUAL); }
58 
59 protected:
61  ~vtkTemporalSnapToTimeStep() VTK_OVERRIDE;
62 
66  int ProcessRequest(vtkInformation* request,
67  vtkInformationVector** inputVector,
68  vtkInformationVector* outputVector) VTK_OVERRIDE;
69 
70  int RequestUpdateExtent(vtkInformation* request,
71  vtkInformationVector** inputVector,
72  vtkInformationVector* outputVector) VTK_OVERRIDE;
73 
74  int RequestInformation(vtkInformation* request,
75  vtkInformationVector** inputVector,
76  vtkInformationVector* outputVector) VTK_OVERRIDE;
77 
78  int RequestData(vtkInformation* request,
79  vtkInformationVector** inputVector,
80  vtkInformationVector* outputVector) VTK_OVERRIDE;
81 
82  std::vector<double> InputTimeValues;
83  int HasDiscrete;
84  int SnapMode;
85 
86 private:
87  vtkTemporalSnapToTimeStep(const vtkTemporalSnapToTimeStep&) VTK_DELETE_FUNCTION;
88  void operator=(const vtkTemporalSnapToTimeStep&) VTK_DELETE_FUNCTION;
89 };
90 
91 #endif
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
a simple class to control print indentation
Definition: vtkIndent.h:33
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.
Store zero or more vtkInformation instances.
static vtkPassInputTypeAlgorithm * New()