VTK  9.3.1
vtkHyperStreamline.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
39 #ifndef vtkHyperStreamline_h
40 #define vtkHyperStreamline_h
41 
42 #include "vtkFiltersGeneralModule.h" // For export macro
43 #include "vtkPolyDataAlgorithm.h"
44 
45 #define VTK_INTEGRATE_FORWARD 0
46 #define VTK_INTEGRATE_BACKWARD 1
47 #define VTK_INTEGRATE_BOTH_DIRECTIONS 2
48 
49 #define VTK_INTEGRATE_MAJOR_EIGENVECTOR 0
50 #define VTK_INTEGRATE_MEDIUM_EIGENVECTOR 1
51 #define VTK_INTEGRATE_MINOR_EIGENVECTOR 2
52 
53 VTK_ABI_NAMESPACE_BEGIN
54 class vtkHyperArray;
55 
56 class VTKFILTERSGENERAL_EXPORT vtkHyperStreamline : public vtkPolyDataAlgorithm
57 {
58 public:
60  void PrintSelf(ostream& os, vtkIndent indent) override;
61 
68  static vtkHyperStreamline* New();
69 
74  void SetStartLocation(vtkIdType cellId, int subId, double pcoords[3]);
75 
80  void SetStartLocation(vtkIdType cellId, int subId, double r, double s, double t);
81 
86  vtkIdType GetStartLocation(int& subId, double pcoords[3]);
87 
93  void SetStartPosition(double x[3]);
94 
100  void SetStartPosition(double x, double y, double z);
101 
105  double* GetStartPosition() VTK_SIZEHINT(3);
106 
108 
112  vtkSetClampMacro(MaximumPropagationDistance, double, 0.0, VTK_DOUBLE_MAX);
113  vtkGetMacro(MaximumPropagationDistance, double);
115 
117 
127  vtkSetClampMacro(
129  vtkGetMacro(IntegrationEigenvector, int);
130  void SetIntegrationEigenvectorToMajor()
131  {
132  this->SetIntegrationEigenvector(VTK_INTEGRATE_MAJOR_EIGENVECTOR);
133  }
135  {
136  this->SetIntegrationEigenvector(VTK_INTEGRATE_MEDIUM_EIGENVECTOR);
137  }
139  {
140  this->SetIntegrationEigenvector(VTK_INTEGRATE_MINOR_EIGENVECTOR);
141  }
143 
149  void IntegrateMajorEigenvector() { this->SetIntegrationEigenvectorToMajor(); }
150 
157  void IntegrateMediumEigenvector() { this->SetIntegrationEigenvectorToMedium(); }
158 
164  void IntegrateMinorEigenvector() { this->SetIntegrationEigenvectorToMinor(); }
165 
167 
171  vtkSetClampMacro(IntegrationStepLength, double, 0.001, 0.5);
172  vtkGetMacro(IntegrationStepLength, double);
174 
176 
181  vtkSetClampMacro(StepLength, double, 0.000001, 1.0);
182  vtkGetMacro(StepLength, double);
184 
186 
189  vtkSetClampMacro(IntegrationDirection, int, VTK_INTEGRATE_FORWARD, VTK_INTEGRATE_BOTH_DIRECTIONS);
190  vtkGetMacro(IntegrationDirection, int);
191  void SetIntegrationDirectionToForward() { this->SetIntegrationDirection(VTK_INTEGRATE_FORWARD); }
193  {
194  this->SetIntegrationDirection(VTK_INTEGRATE_BACKWARD);
195  }
197  {
198  this->SetIntegrationDirection(VTK_INTEGRATE_BOTH_DIRECTIONS);
199  }
201 
203 
207  vtkSetClampMacro(TerminalEigenvalue, double, 0.0, VTK_DOUBLE_MAX);
208  vtkGetMacro(TerminalEigenvalue, double);
210 
212 
216  vtkSetClampMacro(NumberOfSides, int, 3, VTK_INT_MAX);
217  vtkGetMacro(NumberOfSides, int);
219 
221 
227  vtkSetClampMacro(Radius, double, 0.0001, VTK_DOUBLE_MAX);
228  vtkGetMacro(Radius, double);
230 
232 
236  vtkSetMacro(LogScaling, vtkTypeBool);
237  vtkGetMacro(LogScaling, vtkTypeBool);
238  vtkBooleanMacro(LogScaling, vtkTypeBool);
240 
241 protected:
243  ~vtkHyperStreamline() override;
244 
245  // Integrate data
247  int BuildTube(vtkDataSet* input, vtkPolyData* output);
248 
249  int FillInputPortInformation(int port, vtkInformation* info) override;
250 
251  // Flag indicates where streamlines start from (either position or location)
253 
254  // Starting from cell location
257  double StartPCoords[3];
258 
259  // starting from global x-y-z position
260  double StartPosition[3];
261 
262  // array of hyperstreamlines
263  vtkHyperArray* Streamers;
265 
266  // length of hyperstreamline in absolute distance
268 
269  // integration direction
271 
272  // the length (fraction of cell size) of integration steps
274 
275  // the length of the tube segments composing the hyperstreamline
276  double StepLength;
277 
278  // terminal propagation speed
280 
281  // number of sides of tube
283 
284  // maximum radius of tube
285  double Radius;
286 
287  // boolean controls whether scaling is clamped
289 
290  // which eigenvector to use as integration vector field
292 
293 private:
294  vtkHyperStreamline(const vtkHyperStreamline&) = delete;
295  void operator=(const vtkHyperStreamline&) = delete;
296 };
297 
298 VTK_ABI_NAMESPACE_END
299 #endif
#define VTK_DOUBLE_MAX
Definition: vtkType.h:154
void IntegrateMinorEigenvector()
Use the minor eigenvector field as the vector field through which to integrate.
Store vtkAlgorithm input/output information.
void SetIntegrationEigenvectorToMinor()
Set / get the eigenvector field through which to ingrate.
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.
#define VTK_INT_MAX
Definition: vtkType.h:144
void SetIntegrationDirectionToForward()
Specify the direction in which to integrate the hyperstreamline.
void SetIntegrationDirectionToBackward()
Specify the direction in which to integrate the hyperstreamline.
int vtkIdType
Definition: vtkType.h:315
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:79
#define VTK_INTEGRATE_MAJOR_EIGENVECTOR
#define VTK_INTEGRATE_MEDIUM_EIGENVECTOR
static vtkPolyDataAlgorithm * New()
int vtkTypeBool
Definition: vtkABI.h:64
Superclass for algorithms that produce only polydata as output.
#define VTK_INTEGRATE_MINOR_EIGENVECTOR
a simple class to control print indentation
Definition: vtkIndent.h:28
#define VTK_INTEGRATE_FORWARD
void SetIntegrationEigenvectorToMedium()
Set / get the eigenvector field through which to ingrate.
#define VTK_SIZEHINT(...)
#define VTK_INTEGRATE_BACKWARD
int FillInputPortInformation(int port, vtkInformation *info) override
Fill the input port information objects for this algorithm.
Store zero or more vtkInformation instances.
vtkHyperArray * Streamers
void SetIntegrationDirectionToIntegrateBothDirections()
Specify the direction in which to integrate the hyperstreamline.
void IntegrateMediumEigenvector()
Use the medium eigenvector field as the vector field through which to integrate.
void IntegrateMajorEigenvector()
Use the major eigenvector field as the vector field through which to integrate.
#define VTK_INTEGRATE_BOTH_DIRECTIONS
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
generate hyperstreamline in arbitrary dataset