VTK  9.2.6
vtkHyperStreamline.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkHyperStreamline.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
60 #ifndef vtkHyperStreamline_h
61 #define vtkHyperStreamline_h
62 
63 #include "vtkFiltersGeneralModule.h" // For export macro
64 #include "vtkPolyDataAlgorithm.h"
65 
66 #define VTK_INTEGRATE_FORWARD 0
67 #define VTK_INTEGRATE_BACKWARD 1
68 #define VTK_INTEGRATE_BOTH_DIRECTIONS 2
69 
70 #define VTK_INTEGRATE_MAJOR_EIGENVECTOR 0
71 #define VTK_INTEGRATE_MEDIUM_EIGENVECTOR 1
72 #define VTK_INTEGRATE_MINOR_EIGENVECTOR 2
73 
74 class vtkHyperArray;
75 
76 class VTKFILTERSGENERAL_EXPORT vtkHyperStreamline : public vtkPolyDataAlgorithm
77 {
78 public:
80  void PrintSelf(ostream& os, vtkIndent indent) override;
81 
89 
94  void SetStartLocation(vtkIdType cellId, int subId, double pcoords[3]);
95 
100  void SetStartLocation(vtkIdType cellId, int subId, double r, double s, double t);
101 
106  vtkIdType GetStartLocation(int& subId, double pcoords[3]);
107 
113  void SetStartPosition(double x[3]);
114 
120  void SetStartPosition(double x, double y, double z);
121 
126 
128 
132  vtkSetClampMacro(MaximumPropagationDistance, double, 0.0, VTK_DOUBLE_MAX);
133  vtkGetMacro(MaximumPropagationDistance, double);
135 
137 
147  vtkSetClampMacro(
149  vtkGetMacro(IntegrationEigenvector, int);
150  void SetIntegrationEigenvectorToMajor()
151  {
152  this->SetIntegrationEigenvector(VTK_INTEGRATE_MAJOR_EIGENVECTOR);
153  }
155  {
156  this->SetIntegrationEigenvector(VTK_INTEGRATE_MEDIUM_EIGENVECTOR);
157  }
159  {
160  this->SetIntegrationEigenvector(VTK_INTEGRATE_MINOR_EIGENVECTOR);
161  }
163 
169  void IntegrateMajorEigenvector() { this->SetIntegrationEigenvectorToMajor(); }
170 
177  void IntegrateMediumEigenvector() { this->SetIntegrationEigenvectorToMedium(); }
178 
184  void IntegrateMinorEigenvector() { this->SetIntegrationEigenvectorToMinor(); }
185 
187 
191  vtkSetClampMacro(IntegrationStepLength, double, 0.001, 0.5);
192  vtkGetMacro(IntegrationStepLength, double);
194 
196 
201  vtkSetClampMacro(StepLength, double, 0.000001, 1.0);
202  vtkGetMacro(StepLength, double);
204 
206 
209  vtkSetClampMacro(IntegrationDirection, int, VTK_INTEGRATE_FORWARD, VTK_INTEGRATE_BOTH_DIRECTIONS);
210  vtkGetMacro(IntegrationDirection, int);
211  void SetIntegrationDirectionToForward() { this->SetIntegrationDirection(VTK_INTEGRATE_FORWARD); }
213  {
214  this->SetIntegrationDirection(VTK_INTEGRATE_BACKWARD);
215  }
217  {
218  this->SetIntegrationDirection(VTK_INTEGRATE_BOTH_DIRECTIONS);
219  }
221 
223 
227  vtkSetClampMacro(TerminalEigenvalue, double, 0.0, VTK_DOUBLE_MAX);
228  vtkGetMacro(TerminalEigenvalue, double);
230 
232 
236  vtkSetClampMacro(NumberOfSides, int, 3, VTK_INT_MAX);
237  vtkGetMacro(NumberOfSides, int);
239 
241 
247  vtkSetClampMacro(Radius, double, 0.0001, VTK_DOUBLE_MAX);
248  vtkGetMacro(Radius, double);
250 
252 
256  vtkSetMacro(LogScaling, vtkTypeBool);
257  vtkGetMacro(LogScaling, vtkTypeBool);
258  vtkBooleanMacro(LogScaling, vtkTypeBool);
260 
261 protected:
264 
265  // Integrate data
267  int BuildTube(vtkDataSet* input, vtkPolyData* output);
268 
270 
271  // Flag indicates where streamlines start from (either position or location)
273 
274  // Starting from cell location
277  double StartPCoords[3];
278 
279  // starting from global x-y-z position
280  double StartPosition[3];
281 
282  // array of hyperstreamlines
283  vtkHyperArray* Streamers;
285 
286  // length of hyperstreamline in absolute distance
288 
289  // integration direction
291 
292  // the length (fraction of cell size) of integration steps
294 
295  // the length of the tube segments composing the hyperstreamline
296  double StepLength;
297 
298  // terminal propagation speed
300 
301  // number of sides of tube
303 
304  // maximum radius of tube
305  double Radius;
306 
307  // boolean controls whether scaling is clamped
309 
310  // which eigenvector to use as integration vector field
312 
313 private:
314  vtkHyperStreamline(const vtkHyperStreamline&) = delete;
315  void operator=(const vtkHyperStreamline&) = delete;
316 };
317 
318 #endif
abstract class to specify dataset behavior
Definition: vtkDataSet.h:72
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:49
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:100
@ info
Definition: vtkX3D.h:382
@ port
Definition: vtkX3D.h:453
int vtkTypeBool
Definition: vtkABI.h:69
#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:332
#define VTK_DOUBLE_MAX
Definition: vtkType.h:165
#define VTK_INT_MAX
Definition: vtkType.h:155
#define VTK_SIZEHINT(...)