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;
46 
47 class VTKFILTERSGENERAL_EXPORT vtkTemporalPathLineFilter : public vtkPolyDataAlgorithm
48 {
49 public:
51 
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:
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;
161 
163 
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 
195  std::set<vtkIdType> SelectionIds;
196 
197  //
198 private:
200  void operator=(const vtkTemporalPathLineFilter&) = delete;
201 };
202 
203 VTK_ABI_NAMESPACE_END
204 #endif
vtkSmartPointer< vtkFloatArray > TrailId
vtkSmartPointer< vtkCellArray > Vertices
vtkSmartPointer< vtkPoints > VertexCoordinates
Generate a Polydata Pointset from any Dataset.
vtkSmartPointer< ParticleTrail > TrailPointer
Store vtkAlgorithm input/output information.
abstract class to specify dataset behavior
Definition: vtkDataSet.h:52
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called by the superclass.
dynamic, self-adjusting array of float
Definition: vtkFloatArray.h:30
Hold a reference to a vtkObjectBase instance.
Definition: vtkMeta.h:23
int vtkIdType
Definition: vtkType.h:315
Proxy object to connect input/output ports.
static vtkPolyDataAlgorithm * New()
Superclass for algorithms that produce only polydata as output.
a simple class to control print indentation
Definition: vtkIndent.h:28
merge exactly coincident points
virtual int RequestInformation(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
vtkSmartPointer< vtkPoints > LineCoordinates
vtkSmartPointer< vtkTemporalPathLineFilterInternals > Internals
object to represent cell connectivity
Definition: vtkCellArray.h:175
int FillOutputPortInformation(int port, vtkInformation *info) override
Fill the output port information objects for this algorithm.
int FillInputPortInformation(int port, vtkInformation *info) override
Fill the input port information objects for this algorithm.
Store zero or more vtkInformation instances.
vtkSmartPointer< vtkCellArray > PolyLines
represent and manipulate 3D points
Definition: vtkPoints.h:28
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.