VTK: Filters/Hybrid/vtkTemporalSnapToTimeStep.h Source File

| VTK 9.3.1

vtkTemporalSnapToTimeStep.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-License-Identifier: BSD-3-Clause
23 #ifndef vtkTemporalSnapToTimeStep_h
24 #define vtkTemporalSnapToTimeStep_h
25
26 #include "vtkFiltersHybridModule.h" // For export macro
27 #include "vtkPassInputTypeAlgorithm.h"
28
29 #include <vector> // used because I am a bad boy. So there.
30
31 VTK_ABI_NAMESPACE_BEGIN
32 class VTKFILTERSHYBRID_EXPORT vtkTemporalSnapToTimeStep : public vtkPassInputTypeAlgorithm
33 {
34 public:
35 static vtkTemporalSnapToTimeStep* New();
36 vtkTypeMacro(vtkTemporalSnapToTimeStep, vtkPassInputTypeAlgorithm);
37 void PrintSelf(ostream& os, vtkIndent indent) override;
38
39 enum
40 {
41 VTK_SNAP_NEAREST = 0,
42 VTK_SNAP_NEXTBELOW_OR_EQUAL,
43 VTK_SNAP_NEXTABOVE_OR_EQUAL
44 };
45
46 vtkSetMacro(SnapMode, int);
47 vtkGetMacro(SnapMode, int);
48 void SetSnapModeToNearest() { this->SetSnapMode(VTK_SNAP_NEAREST); }
49 void SetSnapModeToNextBelowOrEqual() { this->SetSnapMode(VTK_SNAP_NEXTBELOW_OR_EQUAL); }
50 void SetSnapModeToNextAboveOrEqual() { this->SetSnapMode(VTK_SNAP_NEXTABOVE_OR_EQUAL); }
51
52 protected:
53 vtkTemporalSnapToTimeStep();
54 ~vtkTemporalSnapToTimeStep() override;
55
59 vtkTypeBool ProcessRequest(vtkInformation* request, vtkInformationVector** inputVector,
60 vtkInformationVector* outputVector) override;
61
62 int RequestUpdateExtent(vtkInformation* request, vtkInformationVector** inputVector,
63 vtkInformationVector* outputVector) override;
64
65 int RequestInformation(vtkInformation* request, vtkInformationVector** inputVector,
66 vtkInformationVector* outputVector) override;
67
68 int RequestData(vtkInformation* request, vtkInformationVector** inputVector,
69 vtkInformationVector* outputVector) override;
70
71 std::vector<double> InputTimeValues;
72 vtkTypeBool HasDiscrete;
73 int SnapMode;
74
75 private:
76 vtkTemporalSnapToTimeStep(const vtkTemporalSnapToTimeStep&) = delete;
77 void operator=(const vtkTemporalSnapToTimeStep&) = delete;
78 };
79
80 VTK_ABI_NAMESPACE_END
81 #endif
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:38
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:40
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:72
vtkPassInputTypeAlgorithm
Superclass for algorithms that produce output of the same type as input.
Definition: vtkPassInputTypeAlgorithm.h:45
vtkTemporalSnapToTimeStep
modify the time range/steps of temporal data
Definition: vtkTemporalSnapToTimeStep.h:33
vtkTemporalSnapToTimeStep::RequestUpdateExtent
int RequestUpdateExtent(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector) override
This is called within ProcessRequest when each filter in the pipeline decides what portion of its inp...
vtkTemporalSnapToTimeStep::ProcessRequest
vtkTypeBool ProcessRequest(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector) override
see vtkAlgorithm for details
vtkTemporalSnapToTimeStep::New
static vtkTemporalSnapToTimeStep * New()
vtkTemporalSnapToTimeStep::VTK_SNAP_NEXTBELOW_OR_EQUAL
@ VTK_SNAP_NEXTBELOW_OR_EQUAL
Definition: vtkTemporalSnapToTimeStep.h:42
vtkTemporalSnapToTimeStep::SetSnapModeToNearest
void SetSnapModeToNearest()
Definition: vtkTemporalSnapToTimeStep.h:48
vtkTemporalSnapToTimeStep::RequestData
int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector) override
This is called within ProcessRequest when a request asks the algorithm to do its work.
vtkTemporalSnapToTimeStep::vtkTemporalSnapToTimeStep
vtkTemporalSnapToTimeStep()
vtkTemporalSnapToTimeStep::SetSnapModeToNextBelowOrEqual
void SetSnapModeToNextBelowOrEqual()
Definition: vtkTemporalSnapToTimeStep.h:49
vtkTemporalSnapToTimeStep::HasDiscrete
vtkTypeBool HasDiscrete
Definition: vtkTemporalSnapToTimeStep.h:72
vtkTemporalSnapToTimeStep::~vtkTemporalSnapToTimeStep
~vtkTemporalSnapToTimeStep() override
vtkTemporalSnapToTimeStep::InputTimeValues
std::vector< double > InputTimeValues
Definition: vtkTemporalSnapToTimeStep.h:71
vtkTemporalSnapToTimeStep::SetSnapModeToNextAboveOrEqual
void SetSnapModeToNextAboveOrEqual()
Definition: vtkTemporalSnapToTimeStep.h:50
vtkTemporalSnapToTimeStep::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkTemporalSnapToTimeStep::RequestInformation
int RequestInformation(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector) override
This is called within ProcessRequest when a request asks for Information.
vtkTemporalSnapToTimeStep::SnapMode
int SnapMode
Definition: vtkTemporalSnapToTimeStep.h:73
vtkTypeBool
int vtkTypeBool
Definition: vtkABI.h:64
vtkPassInputTypeAlgorithm.h