VTK: Filters/General/vtkTemporalPathLineFilter.h Source File

| VTK 9.3.1

vtkTemporalPathLineFilter.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
27 #ifndef vtkTemporalPathLineFilter_h
28 #define vtkTemporalPathLineFilter_h
29
30 #include "vtkFiltersGeneralModule.h" // For export macro
31 #include "vtkPolyDataAlgorithm.h"
32
33 VTK_ABI_NAMESPACE_BEGIN
34 class vtkPoints;
35 class vtkCellArray;
36 class vtkMergePoints;
37 class vtkFloatArray;
38
39 VTK_ABI_NAMESPACE_END
40 #include "vtkSmartPointer.h" // for memory safety
41 #include <set> // Because we want to use it
42 VTK_ABI_NAMESPACE_BEGIN
43 class ParticleTrail;
44 class vtkTemporalPathLineFilterInternals;
45 typedef vtkSmartPointer<ParticleTrail> TrailPointer;
46
47 class VTKFILTERSGENERAL_EXPORT vtkTemporalPathLineFilter : public vtkPolyDataAlgorithm
48 {
49 public:
51
54 static vtkTemporalPathLineFilter* New();
55 vtkTypeMacro(vtkTemporalPathLineFilter, vtkPolyDataAlgorithm);
56 void PrintSelf(ostream& os, vtkIndent indent) override;
58
60
64 vtkSetMacro(MaskPoints, int);
65 vtkGetMacro(MaskPoints, int);
67
69
77 vtkSetMacro(MaxTrackLength, unsigned int);
78 vtkGetMacro(MaxTrackLength, unsigned int);
80
82
90 vtkSetStringMacro(IdChannelArray);
91 vtkGetStringMacro(IdChannelArray);
93
95
103 vtkSetVector3Macro(MaxStepDistance, double);
104 vtkGetVector3Macro(MaxStepDistance, double);
106
108
114 vtkSetMacro(KeepDeadTrails, bool);
115 vtkGetMacro(KeepDeadTrails, bool);
117
119
128 virtual void SetBackwardTime(bool backward);
129 vtkGetMacro(BackwardTime, bool);
131
136 void Flush();
137
143 void SetSelectionConnection(vtkAlgorithmOutput* algOutput);
144
150 void SetSelectionData(vtkDataSet* input);
151
152 protected:
153 vtkTemporalPathLineFilter();
154 ~vtkTemporalPathLineFilter() override;
155
156 //
157 // Make sure the pipeline knows what type we expect as input
158 //
159 int FillInputPortInformation(int port, vtkInformation* info) override;
160 int FillOutputPortInformation(int port, vtkInformation* info) override;
161
163
166 int RequestInformation(vtkInformation*, vtkInformationVector**, vtkInformationVector*) override;
167 //
168 int RequestData(vtkInformation* request, vtkInformationVector** inputVector,
169 vtkInformationVector* outputVector) override;
171
172 TrailPointer GetTrail(vtkIdType i);
173 void IncrementTrail(TrailPointer trail, vtkDataSet* input, vtkIdType i);
174
175 // internal data variables
176 int NumberOfTimeSteps = 0;
177 int MaskPoints = 200;
178 unsigned int MaxTrackLength = 10;
179 unsigned int LastTrackLength = 10;
180 int FirstTime = 1;
181 char* IdChannelArray = nullptr;
182 double MaxStepDistance[3] = { 1, 1, 1 };
183 double LatestTime;
184 bool KeepDeadTrails = false;
185 bool UsingSelection = false;
186 bool BackwardTime = false;
187 //
188
189 vtkSmartPointer<vtkCellArray> PolyLines;
190 vtkSmartPointer<vtkCellArray> Vertices;
191 vtkSmartPointer<vtkPoints> LineCoordinates;
192 vtkSmartPointer<vtkPoints> VertexCoordinates;
193 vtkSmartPointer<vtkFloatArray> TrailId;
194 vtkSmartPointer<vtkTemporalPathLineFilterInternals> Internals;
195 std::set<vtkIdType> SelectionIds;
196
197 //
198 private:
199 vtkTemporalPathLineFilter(const vtkTemporalPathLineFilter&) = delete;
200 void operator=(const vtkTemporalPathLineFilter&) = delete;
201 };
202
203 VTK_ABI_NAMESPACE_END
204 #endif
vtkAlgorithmOutput
Proxy object to connect input/output ports.
Definition: vtkAlgorithmOutput.h:41
vtkCellArray
object to represent cell connectivity
Definition: vtkCellArray.h:185
vtkDataSet
abstract class to specify dataset behavior
Definition: vtkDataSet.h:62
vtkFloatArray
dynamic, self-adjusting array of float
Definition: vtkFloatArray.h:40
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
vtkMergePoints
merge exactly coincident points
Definition: vtkMergePoints.h:35
vtkPoints
represent and manipulate 3D points
Definition: vtkPoints.h:38
vtkPolyDataAlgorithm
Superclass for algorithms that produce only polydata as output.
Definition: vtkPolyDataAlgorithm.h:43
vtkSmartPointer
Hold a reference to a vtkObjectBase instance.
Definition: vtkSmartPointer.h:41
vtkTemporalPathLineFilter
Generate a Polydata Pointset from any Dataset.
Definition: vtkTemporalPathLineFilter.h:48
vtkTemporalPathLineFilter::SetSelectionConnection
void SetSelectionConnection(vtkAlgorithmOutput *algOutput)
Set a second input which is a selection.
vtkTemporalPathLineFilter::RequestData
int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector) override
The necessary parts of the standard pipeline update mechanism.
vtkTemporalPathLineFilter::Internals
vtkSmartPointer< vtkTemporalPathLineFilterInternals > Internals
Definition: vtkTemporalPathLineFilter.h:194
vtkTemporalPathLineFilter::IncrementTrail
void IncrementTrail(TrailPointer trail, vtkDataSet *input, vtkIdType i)
vtkTemporalPathLineFilter::GetTrail
TrailPointer GetTrail(vtkIdType i)
vtkTemporalPathLineFilter::SelectionIds
std::set< vtkIdType > SelectionIds
Definition: vtkTemporalPathLineFilter.h:195
vtkTemporalPathLineFilter::TrailId
vtkSmartPointer< vtkFloatArray > TrailId
Definition: vtkTemporalPathLineFilter.h:193
vtkTemporalPathLineFilter::LatestTime
double LatestTime
Definition: vtkTemporalPathLineFilter.h:183
vtkTemporalPathLineFilter::LineCoordinates
vtkSmartPointer< vtkPoints > LineCoordinates
Definition: vtkTemporalPathLineFilter.h:191
vtkTemporalPathLineFilter::FillInputPortInformation
int FillInputPortInformation(int port, vtkInformation *info) override
Fill the input port information objects for this algorithm.
vtkTemporalPathLineFilter::Vertices
vtkSmartPointer< vtkCellArray > Vertices
Definition: vtkTemporalPathLineFilter.h:190
vtkTemporalPathLineFilter::~vtkTemporalPathLineFilter
~vtkTemporalPathLineFilter() override
vtkTemporalPathLineFilter::Flush
void Flush()
Flush will wipe any existing data so that traces can be restarted from whatever time step is next sup...
vtkTemporalPathLineFilter::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Standard Type-Macro.
vtkTemporalPathLineFilter::PolyLines
vtkSmartPointer< vtkCellArray > PolyLines
Definition: vtkTemporalPathLineFilter.h:189
vtkTemporalPathLineFilter::SetSelectionData
void SetSelectionData(vtkDataSet *input)
Set a second input which is a selection.
vtkTemporalPathLineFilter::vtkTemporalPathLineFilter
vtkTemporalPathLineFilter()
vtkTemporalPathLineFilter::New
static vtkTemporalPathLineFilter * New()
Standard Type-Macro.
vtkTemporalPathLineFilter::SetBackwardTime
virtual void SetBackwardTime(bool backward)
Set / Get if the filter is configured to work in backward time going mode.
vtkTemporalPathLineFilter::VertexCoordinates
vtkSmartPointer< vtkPoints > VertexCoordinates
Definition: vtkTemporalPathLineFilter.h:192
vtkTemporalPathLineFilter::FillOutputPortInformation
int FillOutputPortInformation(int port, vtkInformation *info) override
Fill the output port information objects for this algorithm.
vtkTemporalPathLineFilter::RequestInformation
int RequestInformation(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
The necessary parts of the standard pipeline update mechanism.
vtkX3D::info
@ info
Definition: vtkX3D.h:376
vtkX3D::port
@ port
Definition: vtkX3D.h:447
vtkPolyDataAlgorithm.h
vtkSmartPointer.h
TrailPointer
vtkSmartPointer< ParticleTrail > TrailPointer
Definition: vtkTemporalPathLineFilter.h:44
vtkIdType
int vtkIdType
Definition: vtkType.h:315