VTK
9.2.6
Main Page
Related Pages
Topics
Namespaces
Classes
Files
File List
File Members
Filters
Extraction
vtkExtractTimeSteps.h
Go to the documentation of this file.
1
/*=========================================================================
2
3
Program: Visualization Toolkit
4
Module: vtkExtractTimeSteps.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
=========================================================================*/
37
38
#ifndef vtkExtractTimeSteps_h
39
#define vtkExtractTimeSteps_h
40
41
#include "vtkFiltersExtractionModule.h"
// for export macro
42
#include "
vtkPassInputTypeAlgorithm.h
"
43
44
#include <set>
// for time step indices
45
46
class
VTKFILTERSEXTRACTION_EXPORT
vtkExtractTimeSteps
:
public
vtkPassInputTypeAlgorithm
47
{
48
public
:
49
vtkTypeMacro(
vtkExtractTimeSteps
,
vtkPassInputTypeAlgorithm
);
50
void
PrintSelf
(ostream& os,
vtkIndent
indent)
override
;
51
52
static
vtkExtractTimeSteps
*
New
();
53
57
int
GetNumberOfTimeSteps
()
const
{
return
static_cast<
int
>
(this->
TimeStepIndices
.size()); }
58
62
void
AddTimeStepIndex
(
int
timeStepIndex);
63
65
69
void
SetTimeStepIndices
(
int
count,
const
int
* timeStepIndices);
70
void
GetTimeStepIndices
(
int
* timeStepIndices)
const
;
72
76
void
GenerateTimeStepIndices
(
int
begin,
int
end,
int
step);
77
79
82
void
ClearTimeStepIndices
()
83
{
84
this->
TimeStepIndices
.clear();
85
this->
Modified
();
86
}
87
88
90
94
vtkGetMacro(
UseRange
,
bool
);
95
vtkSetMacro(
UseRange
,
bool
);
96
vtkBooleanMacro(
UseRange
,
bool
);
98
100
103
vtkGetVector2Macro(
Range
,
int
);
104
vtkSetVector2Macro(
Range
,
int
);
106
108
112
vtkGetMacro(
TimeStepInterval
,
int
);
113
vtkSetClampMacro(
TimeStepInterval
,
int
, 1,
VTK_INT_MAX
);
115
116
// What timestep to provide when the requested time is between the timesteps
117
// the filter is set to extract
118
enum
119
{
120
PREVIOUS_TIMESTEP
,
// floor the time to the previous timestep
121
NEXT_TIMESTEP
,
// ceiling the time to the next timestep
122
NEAREST_TIMESTEP
// take the timestep whose absolute difference from the requested time is
123
// smallest
124
} EstimationMode;
126
131
vtkGetMacro(
TimeEstimationMode
,
int
);
132
vtkSetMacro(
TimeEstimationMode
,
int
);
133
void
SetTimeEstimationModeToPrevious
() { this->
SetTimeEstimationMode
(
PREVIOUS_TIMESTEP
); }
134
void
SetTimeEstimationModeToNext
() { this->
SetTimeEstimationMode
(
NEXT_TIMESTEP
); }
135
void
SetTimeEstimationModeToNearest
() { this->
SetTimeEstimationMode
(
NEAREST_TIMESTEP
); }
137
138
protected
:
139
vtkExtractTimeSteps
();
140
~vtkExtractTimeSteps
()
override
=
default
;
141
142
int
RequestData
(
vtkInformation
*,
vtkInformationVector
**,
vtkInformationVector
*)
override
;
143
int
RequestInformation
(
vtkInformation
*,
vtkInformationVector
**,
vtkInformationVector
*)
override
;
144
int
RequestUpdateExtent
(
vtkInformation
*,
vtkInformationVector
**,
vtkInformationVector
*)
override
;
145
146
std::set<int>
TimeStepIndices
;
147
bool
UseRange
;
148
int
Range
[2];
149
int
TimeStepInterval
;
150
int
TimeEstimationMode
;
151
152
private
:
153
vtkExtractTimeSteps
(
const
vtkExtractTimeSteps
&) =
delete
;
154
void
operator=(
const
vtkExtractTimeSteps
&) =
delete
;
155
};
156
157
#endif
// vtkExtractTimeSteps_h
vtkExtractTimeSteps::Range
int Range[2]
Definition
vtkExtractTimeSteps.h:148
vtkExtractTimeSteps::SetTimeEstimationModeToNext
void SetTimeEstimationModeToNext()
Get/Set what to do when the requested time is not one of the timesteps this filter is set to extract.
Definition
vtkExtractTimeSteps.h:134
vtkExtractTimeSteps::GenerateTimeStepIndices
void GenerateTimeStepIndices(int begin, int end, int step)
Generate a range of indices in [begin, end) with a step size of 'step'.
vtkExtractTimeSteps::New
static vtkExtractTimeSteps * New()
vtkExtractTimeSteps::TimeStepInterval
int TimeStepInterval
Definition
vtkExtractTimeSteps.h:149
vtkExtractTimeSteps::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkExtractTimeSteps::~vtkExtractTimeSteps
~vtkExtractTimeSteps() override=default
vtkExtractTimeSteps::ClearTimeStepIndices
void ClearTimeStepIndices()
Clear the time step indices.
Definition
vtkExtractTimeSteps.h:82
vtkExtractTimeSteps::TimeEstimationMode
int TimeEstimationMode
Definition
vtkExtractTimeSteps.h:150
vtkExtractTimeSteps::RequestUpdateExtent
int RequestUpdateExtent(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called within ProcessRequest when each filter in the pipeline decides what portion of its inp...
vtkExtractTimeSteps::GetNumberOfTimeSteps
int GetNumberOfTimeSteps() const
Get the number of time steps that will be extracted.
Definition
vtkExtractTimeSteps.h:57
vtkExtractTimeSteps::TimeStepIndices
std::set< int > TimeStepIndices
Definition
vtkExtractTimeSteps.h:146
vtkExtractTimeSteps::AddTimeStepIndex
void AddTimeStepIndex(int timeStepIndex)
Add a time step index.
vtkExtractTimeSteps::SetTimeEstimationMode
virtual void SetTimeEstimationMode(int)
Get/Set what to do when the requested time is not one of the timesteps this filter is set to extract.
vtkExtractTimeSteps::UseRange
bool UseRange
Definition
vtkExtractTimeSteps.h:147
vtkExtractTimeSteps::SetTimeEstimationModeToPrevious
void SetTimeEstimationModeToPrevious()
Get/Set what to do when the requested time is not one of the timesteps this filter is set to extract.
Definition
vtkExtractTimeSteps.h:133
vtkExtractTimeSteps::NEAREST_TIMESTEP
@ NEAREST_TIMESTEP
Definition
vtkExtractTimeSteps.h:122
vtkExtractTimeSteps::NEXT_TIMESTEP
@ NEXT_TIMESTEP
Definition
vtkExtractTimeSteps.h:121
vtkExtractTimeSteps::PREVIOUS_TIMESTEP
@ PREVIOUS_TIMESTEP
Definition
vtkExtractTimeSteps.h:120
vtkExtractTimeSteps::SetTimeEstimationModeToNearest
void SetTimeEstimationModeToNearest()
Get/Set what to do when the requested time is not one of the timesteps this filter is set to extract.
Definition
vtkExtractTimeSteps.h:135
vtkExtractTimeSteps::RequestInformation
int RequestInformation(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called within ProcessRequest when a request asks for Information.
vtkExtractTimeSteps::RequestData
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called within ProcessRequest when a request asks the algorithm to do its work.
vtkExtractTimeSteps::SetTimeStepIndices
void SetTimeStepIndices(int count, const int *timeStepIndices)
Get/Set an array of time step indices.
vtkExtractTimeSteps::vtkExtractTimeSteps
vtkExtractTimeSteps()
vtkExtractTimeSteps::GetTimeStepIndices
void GetTimeStepIndices(int *timeStepIndices) const
Get/Set an array of time step indices.
vtkIndent
a simple class to control print indentation
Definition
vtkIndent.h:40
vtkInformationVector
Store zero or more vtkInformation instances.
Definition
vtkInformationVector.h:42
vtkInformation
Store vtkAlgorithm input/output information.
Definition
vtkInformation.h:74
vtkObject::Modified
virtual void Modified()
Update the modification time for this object.
vtkPassInputTypeAlgorithm::vtkPassInputTypeAlgorithm
vtkPassInputTypeAlgorithm()
vtkPassInputTypeAlgorithm.h
VTK_INT_MAX
#define VTK_INT_MAX
Definition
vtkType.h:155
Generated on
for VTK by
1.14.0