VTK  9.5.20250718
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
52// Excluded from JavaScript wrapping because it defines vtkPolyDataAlgorithm as
53// vtkTemporalAlgorithm<vtkPolyDataAlgorithm> which confuses other filters in VTK::FiltersCore
56{
57public:
59
63#ifndef __VTK_WRAP__
64#undef vtkPassInputTypeAlgorithm
65#endif
67 void PrintSelf(ostream& os, vtkIndent indent) override;
69
70#if defined(__VTK_WRAP__) || defined(__WRAP_GCCXML)
72#endif
73
75
79 vtkSetMacro(MaskPoints, int);
80 vtkGetMacro(MaskPoints, int);
82
84
92 vtkSetMacro(MaxTrackLength, unsigned int);
93 vtkGetMacro(MaxTrackLength, unsigned int);
95
97
105 vtkSetStringMacro(IdChannelArray);
106 vtkGetStringMacro(IdChannelArray);
108
110
118 vtkSetVector3Macro(MaxStepDistance, double);
119 vtkGetVector3Macro(MaxStepDistance, double);
121
123
129 vtkSetMacro(KeepDeadTrails, bool);
130 vtkGetMacro(KeepDeadTrails, bool);
132
137 void Flush();
138
145
152
153protected:
156
157 //
158 // Make sure the pipeline knows what type we expect as input
159 //
160 int FillInputPortInformation(int port, vtkInformation* info) override;
161 int FillOutputPortInformation(int port, vtkInformation* info) override;
162
163 int Initialize(vtkInformation* request, vtkInformationVector** inputVector,
164 vtkInformationVector* outputVector) override;
165 int Execute(vtkInformation* request, vtkInformationVector** inputVector,
166 vtkInformationVector* outputVector) override;
167 int Finalize(vtkInformation* request, vtkInformationVector** inputVector,
168 vtkInformationVector* outputVector) override;
170
172
173 // void Initialize(vtkDataSet* input, vtkDataSet* selection,
174 // vtkPolyData* pathLines, vtkPolyData* particles);
175
176 // internal data variables
177 int NumberOfTimeSteps = 0;
178 int MaskPoints = 200;
179 unsigned int MaxTrackLength = 10;
180 unsigned int LastTrackLength = 10;
181 char* IdChannelArray = nullptr;
182 double MaxStepDistance[3] = { 1, 1, 1 };
184 bool KeepDeadTrails = false;
185 bool BackwardTime = false;
186 //
187
194
195 //
196private:
197 void AccumulateTrails(vtkDataSet* input, vtkDataSet* selection);
198 void PostExecute(vtkDataSet* input, vtkPolyData* pathLines, vtkPolyData* particles);
199 void InitializeExecute(vtkDataSet* input, vtkPolyData* pathLines);
200
202 void operator=(const vtkTemporalPathLineFilter&) = delete;
203};
204
205VTK_ABI_NAMESPACE_END
206#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:332
#define VTK_WRAPEXCLUDE_JAVASCRIPT