VTK  9.4.20250210
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
32#include "vtkTemporalAlgorithm.h" // For temporal algorithm
33
34#ifndef __VTK_WRAP__
35#define vtkPolyDataAlgorithm vtkTemporalAlgorithm<vtkPolyDataAlgorithm>
36#endif
37
38VTK_ABI_NAMESPACE_BEGIN
39class vtkPoints;
40class vtkCellArray;
41class vtkMergePoints;
42class vtkFloatArray;
43
44VTK_ABI_NAMESPACE_END
45#include "vtkSmartPointer.h" // for memory safety
46#include <set> // Because we want to use it
47VTK_ABI_NAMESPACE_BEGIN
48class ParticleTrail;
49class vtkTemporalPathLineFilterInternals;
51
52class VTKFILTERSGENERAL_EXPORT vtkTemporalPathLineFilter : public vtkPolyDataAlgorithm
53{
54public:
56
60#ifndef __VTK_WRAP__
61#undef vtkPassInputTypeAlgorithm
62#endif
64 void PrintSelf(ostream& os, vtkIndent indent) override;
66
67#if defined(__VTK_WRAP__) || defined(__WRAP_GCCXML)
69#endif
70
72
76 vtkSetMacro(MaskPoints, int);
77 vtkGetMacro(MaskPoints, int);
79
81
89 vtkSetMacro(MaxTrackLength, unsigned int);
90 vtkGetMacro(MaxTrackLength, unsigned int);
92
94
102 vtkSetStringMacro(IdChannelArray);
103 vtkGetStringMacro(IdChannelArray);
105
107
115 vtkSetVector3Macro(MaxStepDistance, double);
116 vtkGetVector3Macro(MaxStepDistance, double);
118
120
126 vtkSetMacro(KeepDeadTrails, bool);
127 vtkGetMacro(KeepDeadTrails, bool);
129
134 void Flush();
135
142
149
150protected:
153
154 //
155 // Make sure the pipeline knows what type we expect as input
156 //
157 int FillInputPortInformation(int port, vtkInformation* info) override;
158 int FillOutputPortInformation(int port, vtkInformation* info) override;
159
160 int Initialize(vtkInformation* request, vtkInformationVector** inputVector,
161 vtkInformationVector* outputVector) override;
162 int Execute(vtkInformation* request, vtkInformationVector** inputVector,
163 vtkInformationVector* outputVector) override;
164 int Finalize(vtkInformation* request, vtkInformationVector** inputVector,
165 vtkInformationVector* outputVector) override;
167
169
170 // void Initialize(vtkDataSet* input, vtkDataSet* selection,
171 // vtkPolyData* pathLines, vtkPolyData* particles);
172
173 // internal data variables
174 int NumberOfTimeSteps = 0;
175 int MaskPoints = 200;
176 unsigned int MaxTrackLength = 10;
177 unsigned int LastTrackLength = 10;
178 char* IdChannelArray = nullptr;
179 double MaxStepDistance[3] = { 1, 1, 1 };
181 bool KeepDeadTrails = false;
182 bool BackwardTime = false;
183 //
184
191
192 //
193private:
194 void AccumulateTrails(vtkDataSet* input, vtkDataSet* selection);
195 void PostExecute(vtkDataSet* input, vtkPolyData* pathLines, vtkPolyData* particles);
196 void InitializeExecute(vtkDataSet* input, vtkPolyData* pathLines);
197
199 void operator=(const vtkTemporalPathLineFilter&) = delete;
200};
201
202VTK_ABI_NAMESPACE_END
203#endif
Proxy object to connect input/output ports.
object to represent cell connectivity
abstract class to specify dataset behavior
Definition vtkDataSet.h:165
dynamic, self-adjusting array of float
a simple class to control print indentation
Definition vtkIndent.h:108
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
merge exactly coincident points
represent and manipulate 3D points
Definition vtkPoints.h:139
Superclass for algorithms that produce only polydata as output.
concrete dataset represents vertices, lines, polygons, and triangle strips
Hold a reference to a vtkObjectBase instance.
Generate a Polydata Pointset from any Dataset.
void SetSelectionConnection(vtkAlgorithmOutput *algOutput)
Set a second input which is a selection.
vtkSmartPointer< vtkTemporalPathLineFilterInternals > Internals
void IncrementTrail(TrailPointer trail, vtkDataSet *input, vtkIdType i)
TrailPointer GetTrail(vtkIdType i)
vtkSmartPointer< vtkFloatArray > TrailId
vtkSmartPointer< vtkPoints > LineCoordinates
int Initialize(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector) override
int Execute(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector) override
int FillInputPortInformation(int port, vtkInformation *info) override
Fill the input port information objects for this algorithm.
vtkSmartPointer< vtkCellArray > Vertices
~vtkTemporalPathLineFilter() override
void Flush()
Flush will wipe any existing data so that traces can be restarted from whatever time step is next sup...
void PrintSelf(ostream &os, vtkIndent indent) override
Standard Type-Macro.
vtkSmartPointer< vtkCellArray > PolyLines
void SetSelectionData(vtkDataSet *input)
Set a second input which is a selection.
int Finalize(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector) override
vtkSmartPointer< vtkPoints > VertexCoordinates
int FillOutputPortInformation(int port, vtkInformation *info) override
Fill the output port information objects for this algorithm.
static vtkTemporalPathLineFilter * New()
Standard Type-Macro.
#define vtkCreateWrappedTemporalAlgorithmInterface()
vtkSmartPointer< ParticleTrail > TrailPointer
int vtkIdType
Definition vtkType.h:315