VTK  9.1.0
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 =========================================================================*/
67 #ifndef vtkHyperStreamline_h
68 #define vtkHyperStreamline_h
69 
70 #include "vtkFiltersGeneralModule.h" // For export macro
71 #include "vtkPolyDataAlgorithm.h"
72 
73 #define VTK_INTEGRATE_FORWARD 0
74 #define VTK_INTEGRATE_BACKWARD 1
75 #define VTK_INTEGRATE_BOTH_DIRECTIONS 2
76 
77 #define VTK_INTEGRATE_MAJOR_EIGENVECTOR 0
78 #define VTK_INTEGRATE_MEDIUM_EIGENVECTOR 1
79 #define VTK_INTEGRATE_MINOR_EIGENVECTOR 2
80 
81 class vtkHyperArray;
82 
83 class VTKFILTERSGENERAL_EXPORT vtkHyperStreamline : public vtkPolyDataAlgorithm
84 {
85 public:
87  void PrintSelf(ostream& os, vtkIndent indent) override;
88 
96 
101  void SetStartLocation(vtkIdType cellId, int subId, double pcoords[3]);
102 
107  void SetStartLocation(vtkIdType cellId, int subId, double r, double s, double t);
108 
113  vtkIdType GetStartLocation(int& subId, double pcoords[3]);
114 
120  void SetStartPosition(double x[3]);
121 
127  void SetStartPosition(double x, double y, double z);
128 
133 
135 
139  vtkSetClampMacro(MaximumPropagationDistance, double, 0.0, VTK_DOUBLE_MAX);
140  vtkGetMacro(MaximumPropagationDistance, double);
142 
144 
154  vtkSetClampMacro(
156  vtkGetMacro(IntegrationEigenvector, int);
157  void SetIntegrationEigenvectorToMajor()
158  {
159  this->SetIntegrationEigenvector(VTK_INTEGRATE_MAJOR_EIGENVECTOR);
160  }
162  {
163  this->SetIntegrationEigenvector(VTK_INTEGRATE_MEDIUM_EIGENVECTOR);
164  }
166  {
167  this->SetIntegrationEigenvector(VTK_INTEGRATE_MINOR_EIGENVECTOR);
168  }
170 
176  void IntegrateMajorEigenvector() { this->SetIntegrationEigenvectorToMajor(); }
177 
184  void IntegrateMediumEigenvector() { this->SetIntegrationEigenvectorToMedium(); }
185 
191  void IntegrateMinorEigenvector() { this->SetIntegrationEigenvectorToMinor(); }
192 
194 
198  vtkSetClampMacro(IntegrationStepLength, double, 0.001, 0.5);
199  vtkGetMacro(IntegrationStepLength, double);
201 
203 
208  vtkSetClampMacro(StepLength, double, 0.000001, 1.0);
209  vtkGetMacro(StepLength, double);
211 
213 
216  vtkSetClampMacro(IntegrationDirection, int, VTK_INTEGRATE_FORWARD, VTK_INTEGRATE_BOTH_DIRECTIONS);
217  vtkGetMacro(IntegrationDirection, int);
218  void SetIntegrationDirectionToForward() { this->SetIntegrationDirection(VTK_INTEGRATE_FORWARD); }
220  {
221  this->SetIntegrationDirection(VTK_INTEGRATE_BACKWARD);
222  }
224  {
225  this->SetIntegrationDirection(VTK_INTEGRATE_BOTH_DIRECTIONS);
226  }
228 
230 
234  vtkSetClampMacro(TerminalEigenvalue, double, 0.0, VTK_DOUBLE_MAX);
235  vtkGetMacro(TerminalEigenvalue, double);
237 
239 
243  vtkSetClampMacro(NumberOfSides, int, 3, VTK_INT_MAX);
244  vtkGetMacro(NumberOfSides, int);
246 
248 
254  vtkSetClampMacro(Radius, double, 0.0001, VTK_DOUBLE_MAX);
255  vtkGetMacro(Radius, double);
257 
259 
263  vtkSetMacro(LogScaling, vtkTypeBool);
264  vtkGetMacro(LogScaling, vtkTypeBool);
265  vtkBooleanMacro(LogScaling, vtkTypeBool);
267 
268 protected:
271 
272  // Integrate data
274  int BuildTube(vtkDataSet* input, vtkPolyData* output);
275 
277 
278  // Flag indicates where streamlines start from (either position or location)
280 
281  // Starting from cell location
284  double StartPCoords[3];
285 
286  // starting from global x-y-z position
287  double StartPosition[3];
288 
289  // array of hyperstreamlines
290  vtkHyperArray* Streamers;
292 
293  // length of hyperstreamline in absolute distance
295 
296  // integration direction
298 
299  // the length (fraction of cell size) of integration steps
301 
302  // the length of the tube segments composing the hyperstreamline
303  double StepLength;
304 
305  // terminal propagation speed
307 
308  // number of sides of tube
310 
311  // maximum radius of tube
312  double Radius;
313 
314  // boolean controls whether scaling is clamped
316 
317  // which eigenvector to use as integration vector field
319 
320 private:
321  vtkHyperStreamline(const vtkHyperStreamline&) = delete;
322  void operator=(const vtkHyperStreamline&) = delete;
323 };
324 
325 #endif
VTK_INT_MAX
#define VTK_INT_MAX
Definition: vtkType.h:155
vtkHyperStreamline
generate hyperstreamline in arbitrary dataset
Definition: vtkHyperStreamline.h:84
vtkHyperStreamline::Streamers
vtkHyperArray * Streamers
Definition: vtkHyperStreamline.h:290
vtkHyperStreamline::vtkHyperStreamline
vtkHyperStreamline()
VTK_INTEGRATE_MAJOR_EIGENVECTOR
#define VTK_INTEGRATE_MAJOR_EIGENVECTOR
Definition: vtkHyperStreamline.h:77
vtkIdType
int vtkIdType
Definition: vtkType.h:332
VTK_INTEGRATE_FORWARD
#define VTK_INTEGRATE_FORWARD
Definition: vtkHyperStreamline.h:73
vtkHyperStreamline::NumberOfStreamers
int NumberOfStreamers
Definition: vtkHyperStreamline.h:291
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:145
vtkHyperStreamline::StartSubId
int StartSubId
Definition: vtkHyperStreamline.h:283
vtkHyperStreamline::SetIntegrationEigenvectorToMedium
void SetIntegrationEigenvectorToMedium()
Set / get the eigenvector field through which to ingrate.
Definition: vtkHyperStreamline.h:161
vtkHyperStreamline::IntegrationDirection
int IntegrationDirection
Definition: vtkHyperStreamline.h:297
vtkHyperStreamline::NumberOfSides
int NumberOfSides
Definition: vtkHyperStreamline.h:309
vtkHyperStreamline::StartFrom
int StartFrom
Definition: vtkHyperStreamline.h:279
VTK_INTEGRATE_BACKWARD
#define VTK_INTEGRATE_BACKWARD
Definition: vtkHyperStreamline.h:74
vtkHyperStreamline::IntegrationStepLength
double IntegrationStepLength
Definition: vtkHyperStreamline.h:300
vtkPolyDataAlgorithm.h
vtkHyperStreamline::SetIntegrationDirectionToForward
void SetIntegrationDirectionToForward()
Specify the direction in which to integrate the hyperstreamline.
Definition: vtkHyperStreamline.h:218
vtkX3D::port
@ port
Definition: vtkX3D.h:453
vtkHyperStreamline::SetStartPosition
void SetStartPosition(double x, double y, double z)
Specify the start of the hyperstreamline in the global coordinate system.
vtkHyperStreamline::BuildTube
int BuildTube(vtkDataSet *input, vtkPolyData *output)
VTK_SIZEHINT
#define VTK_SIZEHINT(...)
Definition: vtkWrappingHints.h:48
vtkHyperStreamline::GetStartPosition
double * GetStartPosition()
Get the start position of the hyperstreamline in global x-y-z coordinates.
vtkHyperStreamline::SetIntegrationDirectionToBackward
void SetIntegrationDirectionToBackward()
Specify the direction in which to integrate the hyperstreamline.
Definition: vtkHyperStreamline.h:219
VTK_INTEGRATE_MEDIUM_EIGENVECTOR
#define VTK_INTEGRATE_MEDIUM_EIGENVECTOR
Definition: vtkHyperStreamline.h:78
vtkHyperStreamline::SetStartPosition
void SetStartPosition(double x[3])
Specify the start of the hyperstreamline in the global coordinate system.
vtkHyperStreamline::FillInputPortInformation
int FillInputPortInformation(int port, vtkInformation *info) override
Fill the input port information objects for this algorithm.
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:113
vtkHyperStreamline::~vtkHyperStreamline
~vtkHyperStreamline() override
vtkHyperStreamline::StepLength
double StepLength
Definition: vtkHyperStreamline.h:303
vtkHyperStreamline::StartCell
vtkIdType StartCell
Definition: vtkHyperStreamline.h:282
vtkHyperStreamline::IntegrateMediumEigenvector
void IntegrateMediumEigenvector()
Use the medium eigenvector field as the vector field through which to integrate.
Definition: vtkHyperStreamline.h:184
vtkHyperStreamline::SetIntegrationDirectionToIntegrateBothDirections
void SetIntegrationDirectionToIntegrateBothDirections()
Specify the direction in which to integrate the hyperstreamline.
Definition: vtkHyperStreamline.h:223
vtkDataSet
abstract class to specify dataset behavior
Definition: vtkDataSet.h:166
vtkHyperStreamline::IntegrateMajorEigenvector
void IntegrateMajorEigenvector()
Use the major eigenvector field as the vector field through which to integrate.
Definition: vtkHyperStreamline.h:176
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:183
vtkX3D::info
@ info
Definition: vtkX3D.h:382
vtkHyperStreamline::GetStartLocation
vtkIdType GetStartLocation(int &subId, double pcoords[3])
Get the starting location of the hyperstreamline in the cell coordinate system.
vtkHyperStreamline::TerminalEigenvalue
double TerminalEigenvalue
Definition: vtkHyperStreamline.h:306
vtkHyperStreamline::LogScaling
vtkTypeBool LogScaling
Definition: vtkHyperStreamline.h:315
vtkHyperStreamline::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkHyperStreamline::RequestData
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
VTK_INTEGRATE_BOTH_DIRECTIONS
#define VTK_INTEGRATE_BOTH_DIRECTIONS
Definition: vtkHyperStreamline.h:75
vtkPolyData
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:195
vtkHyperStreamline::IntegrationEigenvector
int IntegrationEigenvector
Definition: vtkHyperStreamline.h:318
VTK_INTEGRATE_MINOR_EIGENVECTOR
#define VTK_INTEGRATE_MINOR_EIGENVECTOR
Definition: vtkHyperStreamline.h:79
vtkHyperStreamline::IntegrateMinorEigenvector
void IntegrateMinorEigenvector()
Use the minor eigenvector field as the vector field through which to integrate.
Definition: vtkHyperStreamline.h:191
vtkHyperStreamline::MaximumPropagationDistance
double MaximumPropagationDistance
Definition: vtkHyperStreamline.h:294
vtkHyperStreamline::SetStartLocation
void SetStartLocation(vtkIdType cellId, int subId, double pcoords[3])
Specify the start of the hyperstreamline in the cell coordinate system.
vtkHyperStreamline::New
static vtkHyperStreamline * New()
Construct object with initial starting position (0,0,0); integration step length 0....
VTK_DOUBLE_MAX
#define VTK_DOUBLE_MAX
Definition: vtkType.h:165
vtkTypeBool
int vtkTypeBool
Definition: vtkABI.h:69
vtkHyperStreamline::SetStartLocation
void SetStartLocation(vtkIdType cellId, int subId, double r, double s, double t)
Specify the start of the hyperstreamline in the cell coordinate system.
vtkHyperStreamline::Radius
double Radius
Definition: vtkHyperStreamline.h:312
vtkHyperStreamline::SetIntegrationEigenvectorToMinor
void SetIntegrationEigenvectorToMinor()
Set / get the eigenvector field through which to ingrate.
Definition: vtkHyperStreamline.h:165
vtkPolyDataAlgorithm
Superclass for algorithms that produce only polydata as output.
Definition: vtkPolyDataAlgorithm.h:151