VTK
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 =========================================================================*/
51 #ifndef vtkHyperStreamline_h
52 #define vtkHyperStreamline_h
53 
54 #include "vtkFiltersGeneralModule.h" // For export macro
55 #include "vtkPolyDataAlgorithm.h"
56 
57 #define VTK_INTEGRATE_FORWARD 0
58 #define VTK_INTEGRATE_BACKWARD 1
59 #define VTK_INTEGRATE_BOTH_DIRECTIONS 2
60 
61 #define VTK_INTEGRATE_MAJOR_EIGENVECTOR 0
62 #define VTK_INTEGRATE_MEDIUM_EIGENVECTOR 1
63 #define VTK_INTEGRATE_MINOR_EIGENVECTOR 2
64 
65 
66 class vtkHyperArray;
67 
68 class VTKFILTERSGENERAL_EXPORT vtkHyperStreamline : public vtkPolyDataAlgorithm
69 {
70 public:
72  void PrintSelf(ostream& os, vtkIndent indent) override;
73 
80  static vtkHyperStreamline *New();
81 
86  void SetStartLocation(vtkIdType cellId, int subId, double pcoords[3]);
87 
92  void SetStartLocation(vtkIdType cellId, int subId, double r, double s,
93  double t);
94 
99  vtkIdType GetStartLocation(int& subId, double pcoords[3]);
100 
106  void SetStartPosition(double x[3]);
107 
113  void SetStartPosition(double x, double y, double z);
114 
118  double *GetStartPosition() VTK_SIZEHINT(3);
119 
121 
125  vtkSetClampMacro(MaximumPropagationDistance,double,0.0,VTK_DOUBLE_MAX);
126  vtkGetMacro(MaximumPropagationDistance,double);
128 
130 
140  vtkSetClampMacro(IntegrationEigenvector,int,
143  vtkGetMacro(IntegrationEigenvector,int);
144  void SetIntegrationEigenvectorToMajor()
145  {this->SetIntegrationEigenvector(VTK_INTEGRATE_MAJOR_EIGENVECTOR);};
147  {this->SetIntegrationEigenvector(VTK_INTEGRATE_MEDIUM_EIGENVECTOR);};
149  {this->SetIntegrationEigenvector(VTK_INTEGRATE_MINOR_EIGENVECTOR);};
151 
158  {this->SetIntegrationEigenvectorToMajor();};
159 
167  {this->SetIntegrationEigenvectorToMedium();};
168 
175  {this->SetIntegrationEigenvectorToMinor();};
176 
178 
182  vtkSetClampMacro(IntegrationStepLength,double,0.001,0.5);
183  vtkGetMacro(IntegrationStepLength,double);
185 
187 
192  vtkSetClampMacro(StepLength,double,0.000001,1.0);
193  vtkGetMacro(StepLength,double);
195 
197 
200  vtkSetClampMacro(IntegrationDirection,int,
202  vtkGetMacro(IntegrationDirection,int);
204  {this->SetIntegrationDirection(VTK_INTEGRATE_FORWARD);};
206  {this->SetIntegrationDirection(VTK_INTEGRATE_BACKWARD);};
208  {this->SetIntegrationDirection(VTK_INTEGRATE_BOTH_DIRECTIONS);};
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:
252  ~vtkHyperStreamline() override;
253 
254  // Integrate data
256  int BuildTube(vtkDataSet *input, vtkPolyData *output);
257 
258  int FillInputPortInformation(int port, vtkInformation *info) override;
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 private:
302  vtkHyperStreamline(const vtkHyperStreamline&) = delete;
303  void operator=(const vtkHyperStreamline&) = delete;
304 };
305 
306 #endif
VTK_INT_MAX
#define VTK_INT_MAX
Definition: vtkType.h:159
vtkHyperStreamline
generate hyperstreamline in arbitrary dataset
Definition: vtkHyperStreamline.h:68
vtkHyperStreamline::Streamers
vtkHyperArray * Streamers
Definition: vtkHyperStreamline.h:272
VTK_INTEGRATE_MAJOR_EIGENVECTOR
#define VTK_INTEGRATE_MAJOR_EIGENVECTOR
Definition: vtkHyperStreamline.h:61
vtkIdType
int vtkIdType
Definition: vtkType.h:347
VTK_INTEGRATE_FORWARD
#define VTK_INTEGRATE_FORWARD
Definition: vtkHyperStreamline.h:57
vtkHyperStreamline::NumberOfStreamers
int NumberOfStreamers
Definition: vtkHyperStreamline.h:273
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:41
vtkHyperStreamline::StartSubId
int StartSubId
Definition: vtkHyperStreamline.h:265
vtkHyperStreamline::SetIntegrationEigenvectorToMedium
void SetIntegrationEigenvectorToMedium()
Definition: vtkHyperStreamline.h:146
vtkPolyDataAlgorithm::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkHyperStreamline::IntegrationDirection
int IntegrationDirection
Definition: vtkHyperStreamline.h:279
vtkHyperStreamline::NumberOfSides
int NumberOfSides
Definition: vtkHyperStreamline.h:291
vtkHyperStreamline::StartFrom
int StartFrom
Definition: vtkHyperStreamline.h:261
VTK_INTEGRATE_BACKWARD
#define VTK_INTEGRATE_BACKWARD
Definition: vtkHyperStreamline.h:58
vtkHyperStreamline::IntegrationStepLength
double IntegrationStepLength
Definition: vtkHyperStreamline.h:282
vtkPolyDataAlgorithm.h
vtkHyperStreamline::SetIntegrationDirectionToForward
void SetIntegrationDirectionToForward()
Definition: vtkHyperStreamline.h:203
vtkX3D::port
Definition: vtkX3D.h:447
VTK_SIZEHINT
#define VTK_SIZEHINT(...)
Definition: vtkWrappingHints.h:42
vtkPolyDataAlgorithm::RequestData
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called by the superclass.
vtkHyperStreamline::SetIntegrationDirectionToBackward
void SetIntegrationDirectionToBackward()
Definition: vtkHyperStreamline.h:205
VTK_INTEGRATE_MEDIUM_EIGENVECTOR
#define VTK_INTEGRATE_MEDIUM_EIGENVECTOR
Definition: vtkHyperStreamline.h:62
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:39
vtkHyperStreamline::StepLength
double StepLength
Definition: vtkHyperStreamline.h:285
vtkHyperStreamline::StartCell
vtkIdType StartCell
Definition: vtkHyperStreamline.h:264
vtkHyperStreamline::IntegrateMediumEigenvector
void IntegrateMediumEigenvector()
Use the medium eigenvector field as the vector field through which to integrate.
Definition: vtkHyperStreamline.h:166
vtkPolyDataAlgorithm::FillInputPortInformation
int FillInputPortInformation(int port, vtkInformation *info) override
Fill the input port information objects for this algorithm.
vtkHyperStreamline::SetIntegrationDirectionToIntegrateBothDirections
void SetIntegrationDirectionToIntegrateBothDirections()
Definition: vtkHyperStreamline.h:207
vtkDataSet
abstract class to specify dataset behavior
Definition: vtkDataSet.h:62
vtkHyperStreamline::IntegrateMajorEigenvector
void IntegrateMajorEigenvector()
Use the major eigenvector field as the vector field through which to integrate.
Definition: vtkHyperStreamline.h:157
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:86
vtkX3D::info
Definition: vtkX3D.h:376
vtkHyperStreamline::TerminalEigenvalue
double TerminalEigenvalue
Definition: vtkHyperStreamline.h:288
vtkHyperStreamline::LogScaling
vtkTypeBool LogScaling
Definition: vtkHyperStreamline.h:297
VTK_INTEGRATE_BOTH_DIRECTIONS
#define VTK_INTEGRATE_BOTH_DIRECTIONS
Definition: vtkHyperStreamline.h:59
vtkPolyData
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:85
vtkHyperStreamline::IntegrationEigenvector
int IntegrationEigenvector
Definition: vtkHyperStreamline.h:300
VTK_INTEGRATE_MINOR_EIGENVECTOR
#define VTK_INTEGRATE_MINOR_EIGENVECTOR
Definition: vtkHyperStreamline.h:63
vtkHyperStreamline::IntegrateMinorEigenvector
void IntegrateMinorEigenvector()
Use the minor eigenvector field as the vector field through which to integrate.
Definition: vtkHyperStreamline.h:174
vtkHyperStreamline::MaximumPropagationDistance
double MaximumPropagationDistance
Definition: vtkHyperStreamline.h:276
VTK_DOUBLE_MAX
#define VTK_DOUBLE_MAX
Definition: vtkType.h:169
vtkTypeBool
int vtkTypeBool
Definition: vtkABI.h:69
vtkPolyDataAlgorithm::New
static vtkPolyDataAlgorithm * New()
vtkHyperStreamline::Radius
double Radius
Definition: vtkHyperStreamline.h:294
vtkHyperStreamline::SetIntegrationEigenvectorToMinor
void SetIntegrationEigenvectorToMinor()
Definition: vtkHyperStreamline.h:148
vtkPolyDataAlgorithm
Superclass for algorithms that produce only polydata as output.
Definition: vtkPolyDataAlgorithm.h:44