VTK  9.3.0
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
48 #ifndef vtkHyperStreamline_h
49 #define vtkHyperStreamline_h
50 
51 #include "vtkFiltersGeneralModule.h" // For export macro
52 #include "vtkPolyDataAlgorithm.h"
53 
54 #define VTK_INTEGRATE_FORWARD 0
55 #define VTK_INTEGRATE_BACKWARD 1
56 #define VTK_INTEGRATE_BOTH_DIRECTIONS 2
57 
58 #define VTK_INTEGRATE_MAJOR_EIGENVECTOR 0
59 #define VTK_INTEGRATE_MEDIUM_EIGENVECTOR 1
60 #define VTK_INTEGRATE_MINOR_EIGENVECTOR 2
61 
62 VTK_ABI_NAMESPACE_BEGIN
63 class vtkHyperArray;
64 
65 class VTKFILTERSGENERAL_EXPORT vtkHyperStreamline : public vtkPolyDataAlgorithm
66 {
67 public:
69  void PrintSelf(ostream& os, vtkIndent indent) override;
70 
78 
83  void SetStartLocation(vtkIdType cellId, int subId, double pcoords[3]);
84 
89  void SetStartLocation(vtkIdType cellId, int subId, double r, double s, double t);
90 
95  vtkIdType GetStartLocation(int& subId, double pcoords[3]);
96 
102  void SetStartPosition(double x[3]);
103 
109  void SetStartPosition(double x, double y, double z);
110 
115 
117 
121  vtkSetClampMacro(MaximumPropagationDistance, double, 0.0, VTK_DOUBLE_MAX);
122  vtkGetMacro(MaximumPropagationDistance, double);
124 
126 
136  vtkSetClampMacro(
138  vtkGetMacro(IntegrationEigenvector, int);
139  void SetIntegrationEigenvectorToMajor()
140  {
141  this->SetIntegrationEigenvector(VTK_INTEGRATE_MAJOR_EIGENVECTOR);
142  }
144  {
145  this->SetIntegrationEigenvector(VTK_INTEGRATE_MEDIUM_EIGENVECTOR);
146  }
148  {
149  this->SetIntegrationEigenvector(VTK_INTEGRATE_MINOR_EIGENVECTOR);
150  }
152 
158  void IntegrateMajorEigenvector() { this->SetIntegrationEigenvectorToMajor(); }
159 
166  void IntegrateMediumEigenvector() { this->SetIntegrationEigenvectorToMedium(); }
167 
173  void IntegrateMinorEigenvector() { this->SetIntegrationEigenvectorToMinor(); }
174 
176 
180  vtkSetClampMacro(IntegrationStepLength, double, 0.001, 0.5);
181  vtkGetMacro(IntegrationStepLength, double);
183 
185 
190  vtkSetClampMacro(StepLength, double, 0.000001, 1.0);
191  vtkGetMacro(StepLength, double);
193 
195 
198  vtkSetClampMacro(IntegrationDirection, int, VTK_INTEGRATE_FORWARD, VTK_INTEGRATE_BOTH_DIRECTIONS);
199  vtkGetMacro(IntegrationDirection, int);
200  void SetIntegrationDirectionToForward() { this->SetIntegrationDirection(VTK_INTEGRATE_FORWARD); }
202  {
203  this->SetIntegrationDirection(VTK_INTEGRATE_BACKWARD);
204  }
206  {
207  this->SetIntegrationDirection(VTK_INTEGRATE_BOTH_DIRECTIONS);
208  }
210 
212 
216  vtkSetClampMacro(TerminalEigenvalue, double, 0.0, VTK_DOUBLE_MAX);
217  vtkGetMacro(TerminalEigenvalue, double);
219 
221 
225  vtkSetClampMacro(NumberOfSides, int, 3, VTK_INT_MAX);
226  vtkGetMacro(NumberOfSides, int);
228 
230 
236  vtkSetClampMacro(Radius, double, 0.0001, VTK_DOUBLE_MAX);
237  vtkGetMacro(Radius, double);
239 
241 
245  vtkSetMacro(LogScaling, vtkTypeBool);
246  vtkGetMacro(LogScaling, vtkTypeBool);
247  vtkBooleanMacro(LogScaling, vtkTypeBool);
249 
250 protected:
253 
254  // Integrate data
256  int BuildTube(vtkDataSet* input, vtkPolyData* output);
257 
259 
260  // Flag indicates where streamlines start from (either position or location)
262 
263  // Starting from cell location
266  double StartPCoords[3];
267 
268  // starting from global x-y-z position
269  double StartPosition[3];
270 
271  // array of hyperstreamlines
272  vtkHyperArray* Streamers;
274 
275  // length of hyperstreamline in absolute distance
277 
278  // integration direction
280 
281  // the length (fraction of cell size) of integration steps
283 
284  // the length of the tube segments composing the hyperstreamline
285  double StepLength;
286 
287  // terminal propagation speed
289 
290  // number of sides of tube
292 
293  // maximum radius of tube
294  double Radius;
295 
296  // boolean controls whether scaling is clamped
298 
299  // which eigenvector to use as integration vector field
301 
302 private:
303  vtkHyperStreamline(const vtkHyperStreamline&) = delete;
304  void operator=(const vtkHyperStreamline&) = delete;
305 };
306 
307 VTK_ABI_NAMESPACE_END
308 #endif
abstract class to specify dataset behavior
Definition: vtkDataSet.h:62
generate hyperstreamline in arbitrary dataset
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
void IntegrateMinorEigenvector()
Use the minor eigenvector field as the vector field through which to integrate.
void IntegrateMediumEigenvector()
Use the medium eigenvector field as the vector field through which to integrate.
~vtkHyperStreamline() override
int BuildTube(vtkDataSet *input, vtkPolyData *output)
int FillInputPortInformation(int port, vtkInformation *info) override
Fill the input port information objects for this algorithm.
void SetIntegrationDirectionToBackward()
Specify the direction in which to integrate the hyperstreamline.
void SetIntegrationEigenvectorToMedium()
Set / get the eigenvector field through which to ingrate.
static vtkHyperStreamline * New()
Construct object with initial starting position (0,0,0); integration step length 0....
void SetStartLocation(vtkIdType cellId, int subId, double r, double s, double t)
Specify the start of the hyperstreamline in the cell coordinate system.
double * GetStartPosition()
Get the start position of the hyperstreamline in global x-y-z coordinates.
void SetIntegrationDirectionToForward()
Specify the direction in which to integrate the hyperstreamline.
vtkIdType GetStartLocation(int &subId, double pcoords[3])
Get the starting location of the hyperstreamline in the cell coordinate system.
void SetStartLocation(vtkIdType cellId, int subId, double pcoords[3])
Specify the start of the hyperstreamline in the cell coordinate system.
void SetIntegrationDirectionToIntegrateBothDirections()
Specify the direction in which to integrate the hyperstreamline.
void IntegrateMajorEigenvector()
Use the major eigenvector field as the vector field through which to integrate.
vtkHyperArray * Streamers
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void SetIntegrationEigenvectorToMinor()
Set / get the eigenvector field through which to ingrate.
void SetStartPosition(double x[3])
Specify the start of the hyperstreamline in the global coordinate system.
void SetStartPosition(double x, double y, double z)
Specify the start of the hyperstreamline in the global coordinate system.
a simple class to control print indentation
Definition: vtkIndent.h:38
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
Superclass for algorithms that produce only polydata as output.
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:89
@ info
Definition: vtkX3D.h:376
@ port
Definition: vtkX3D.h:447
int vtkTypeBool
Definition: vtkABI.h:64
#define VTK_INTEGRATE_BACKWARD
#define VTK_INTEGRATE_MAJOR_EIGENVECTOR
#define VTK_INTEGRATE_MEDIUM_EIGENVECTOR
#define VTK_INTEGRATE_FORWARD
#define VTK_INTEGRATE_MINOR_EIGENVECTOR
#define VTK_INTEGRATE_BOTH_DIRECTIONS
int vtkIdType
Definition: vtkType.h:315
#define VTK_DOUBLE_MAX
Definition: vtkType.h:154
#define VTK_INT_MAX
Definition: vtkType.h:144
#define VTK_SIZEHINT(...)