VTK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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 =========================================================================*/
34 #ifndef __vtkTemporalSnapToTimeStep_h
35 #define __vtkTemporalSnapToTimeStep_h
36 
37 #include "vtkFiltersHybridModule.h" // For export macro
38 #include "vtkAlgorithm.h"
39 
40 //BTX
41 #include <vector> // used because I am a bad boy. So there.
42 //ETX
43 
44 class VTKFILTERSHYBRID_EXPORT vtkTemporalSnapToTimeStep : public vtkAlgorithm
45 {
46 public:
49  void PrintSelf(ostream& os, vtkIndent indent);
50 
51 //BTX
52  enum {
53  VTK_SNAP_NEAREST=0,
55  VTK_SNAP_NEXTABOVE_OR_EQUAL
56  };
57 //ETX
58  vtkSetMacro(SnapMode,int);
59  vtkGetMacro(SnapMode,int);
60  void SetSnapModeToNearest() { this->SetSnapMode(VTK_SNAP_NEAREST); }
61  void SetSnapModeToNextBelowOrEqual() { this->SetSnapMode(VTK_SNAP_NEXTBELOW_OR_EQUAL); }
62  void SetSnapModeToNextAboveOrEqual() { this->SetSnapMode(VTK_SNAP_NEXTABOVE_OR_EQUAL); }
63 
64 protected:
67 
69 
70  virtual int ProcessRequest(vtkInformation* request,
71  vtkInformationVector** inputVector,
72  vtkInformationVector* outputVector);
74 
75  virtual int FillInputPortInformation(int port, vtkInformation* info);
76  virtual int FillOutputPortInformation(int vtkNotUsed(port), vtkInformation* info);
77 
78  virtual int RequestUpdateExtent (vtkInformation *,
79  vtkInformationVector **,
80  vtkInformationVector *);
81  virtual int RequestInformation (vtkInformation *,
82  vtkInformationVector **,
83  vtkInformationVector *);
84 
85  virtual int RequestData(vtkInformation *,
86  vtkInformationVector **,
87  vtkInformationVector *);
88 
89 //BTX
90  std::vector<double> InputTimeValues;
92  int SnapMode;
93 //ETX
94 
95 private:
96  vtkTemporalSnapToTimeStep(const vtkTemporalSnapToTimeStep&); // Not implemented.
97  void operator=(const vtkTemporalSnapToTimeStep&); // Not implemented.
98 };
99 
100 
101 
102 #endif
103 
104 
105 
modify the time range/steps of temporal data
virtual int ProcessRequest(vtkInformation *request, vtkInformationVector **inInfo, vtkInformationVector *outInfo)
Superclass for all sources, filters, and sinks in VTK.
Definition: vtkAlgorithm.h:60
virtual int FillOutputPortInformation(int port, vtkInformation *info)
virtual int FillInputPortInformation(int port, vtkInformation *info)
std::vector< double > InputTimeValues
static vtkAlgorithm * New()
void PrintSelf(ostream &os, vtkIndent indent)