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) 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() override;
62 
66  int ProcessRequest(vtkInformation* request,
67  vtkInformationVector** inputVector,
68  vtkInformationVector* outputVector) override;
69 
71  vtkInformationVector** inputVector,
72  vtkInformationVector* outputVector) override;
73 
75  vtkInformationVector** inputVector,
76  vtkInformationVector* outputVector) override;
77 
78  int RequestData(vtkInformation* request,
79  vtkInformationVector** inputVector,
80  vtkInformationVector* outputVector) override;
81 
82  std::vector<double> InputTimeValues;
84  int SnapMode;
85 
86 private:
88  void operator=(const vtkTemporalSnapToTimeStep&) = delete;
89 };
90 
91 #endif
vtkTemporalSnapToTimeStep::SnapMode
int SnapMode
Definition: vtkTemporalSnapToTimeStep.h:84
vtkTemporalSnapToTimeStep::SetSnapModeToNextAboveOrEqual
void SetSnapModeToNextAboveOrEqual()
Definition: vtkTemporalSnapToTimeStep.h:57
vtkPassInputTypeAlgorithm.h
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:35
vtkTemporalSnapToTimeStep::InputTimeValues
std::vector< double > InputTimeValues
Definition: vtkTemporalSnapToTimeStep.h:82
vtkPassInputTypeAlgorithm::ProcessRequest
int ProcessRequest(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector) override
see vtkAlgorithm for details
vtkTemporalSnapToTimeStep::SetSnapModeToNextBelowOrEqual
void SetSnapModeToNextBelowOrEqual()
Definition: vtkTemporalSnapToTimeStep.h:56
vtkPassInputTypeAlgorithm::RequestData
virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
This is called within ProcessRequest when a request asks the algorithm to do its work.
Definition: vtkPassInputTypeAlgorithm.h:175
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:33
vtkTemporalSnapToTimeStep::VTK_SNAP_NEXTBELOW_OR_EQUAL
Definition: vtkTemporalSnapToTimeStep.h:49
vtkTemporalSnapToTimeStep::SetSnapModeToNearest
void SetSnapModeToNearest()
Definition: vtkTemporalSnapToTimeStep.h:55
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:80
vtkPassInputTypeAlgorithm::New
static vtkPassInputTypeAlgorithm * New()
vtkPassInputTypeAlgorithm::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkPassInputTypeAlgorithm::RequestUpdateExtent
virtual int RequestUpdateExtent(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
This is called within ProcessRequest when each filter in the pipeline decides what portion of its inp...
Definition: vtkPassInputTypeAlgorithm.h:147
vtkPassInputTypeAlgorithm::RequestInformation
virtual int RequestInformation(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
This is called within ProcessRequest when a request asks for Information.
Definition: vtkPassInputTypeAlgorithm.h:126
vtkTemporalSnapToTimeStep::HasDiscrete
int HasDiscrete
Definition: vtkTemporalSnapToTimeStep.h:83
vtkPassInputTypeAlgorithm
Superclass for algorithms that produce output of the same type as input.
Definition: vtkPassInputTypeAlgorithm.h:51
vtkTemporalSnapToTimeStep
modify the time range/steps of temporal data
Definition: vtkTemporalSnapToTimeStep.h:40