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 =========================================================================*/
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 
63 class vtkHyperArray;
64 
65 class VTKFILTERSGENERAL_EXPORT vtkHyperStreamline : public vtkPolyDataAlgorithm
66 {
67 public:
69  void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
70 
77  static vtkHyperStreamline *New();
78 
83  void SetStartLocation(vtkIdType cellId, int subId, double pcoords[3]);
84 
89  void SetStartLocation(vtkIdType cellId, int subId, double r, double s,
90  double t);
91 
96  vtkIdType GetStartLocation(int& subId, double pcoords[3]);
97 
103  void SetStartPosition(double x[3]);
104 
110  void SetStartPosition(double x, double y, double z);
111 
115  double *GetStartPosition();
116 
118 
122  vtkSetClampMacro(MaximumPropagationDistance,double,0.0,VTK_DOUBLE_MAX);
123  vtkGetMacro(MaximumPropagationDistance,double);
125 
127 
137  vtkSetClampMacro(IntegrationEigenvector,int,
140  vtkGetMacro(IntegrationEigenvector,int);
142  {this->SetIntegrationEigenvector(VTK_INTEGRATE_MAJOR_EIGENVECTOR);};
144  {this->SetIntegrationEigenvector(VTK_INTEGRATE_MEDIUM_EIGENVECTOR);};
146  {this->SetIntegrationEigenvector(VTK_INTEGRATE_MINOR_EIGENVECTOR);};
148 
155  {this->SetIntegrationEigenvectorToMajor();};
156 
164  {this->SetIntegrationEigenvectorToMedium();};
165 
172  {this->SetIntegrationEigenvectorToMinor();};
173 
175 
179  vtkSetClampMacro(IntegrationStepLength,double,0.001,0.5);
180  vtkGetMacro(IntegrationStepLength,double);
182 
184 
189  vtkSetClampMacro(StepLength,double,0.000001,1.0);
190  vtkGetMacro(StepLength,double);
192 
194 
197  vtkSetClampMacro(IntegrationDirection,int,
199  vtkGetMacro(IntegrationDirection,int);
201  {this->SetIntegrationDirection(VTK_INTEGRATE_FORWARD);};
203  {this->SetIntegrationDirection(VTK_INTEGRATE_BACKWARD);};
205  {this->SetIntegrationDirection(VTK_INTEGRATE_BOTH_DIRECTIONS);};
207 
209 
213  vtkSetClampMacro(TerminalEigenvalue,double,0.0,VTK_DOUBLE_MAX);
214  vtkGetMacro(TerminalEigenvalue,double);
216 
218 
222  vtkSetClampMacro(NumberOfSides,int,3,VTK_INT_MAX);
223  vtkGetMacro(NumberOfSides,int);
225 
227 
233  vtkSetClampMacro(Radius,double,0.0001,VTK_DOUBLE_MAX);
234  vtkGetMacro(Radius,double);
236 
238 
242  vtkSetMacro(LogScaling,int);
243  vtkGetMacro(LogScaling,int);
244  vtkBooleanMacro(LogScaling,int);
246 
247 protected:
249  ~vtkHyperStreamline() VTK_OVERRIDE;
250 
251  // Integrate data
253  int BuildTube(vtkDataSet *input, vtkPolyData *output);
254 
255  int FillInputPortInformation(int port, vtkInformation *info) VTK_OVERRIDE;
256 
257  // Flag indicates where streamlines start from (either position or location)
259 
260  // Starting from cell location
263  double StartPCoords[3];
264 
265  // starting from global x-y-z position
266  double StartPosition[3];
267 
268  //array of hyperstreamlines
269  vtkHyperArray *Streamers;
271 
272  // length of hyperstreamline in absolute distance
274 
275  // integration direction
277 
278  // the length (fraction of cell size) of integration steps
280 
281  // the length of the tube segments composing the hyperstreamline
282  double StepLength;
283 
284  // terminal propagation speed
286 
287  // number of sides of tube
289 
290  // maximum radius of tube
291  double Radius;
292 
293  // boolean controls whether scaling is clamped
295 
296  // which eigenvector to use as integration vector field
298 private:
299  vtkHyperStreamline(const vtkHyperStreamline&) VTK_DELETE_FUNCTION;
300  void operator=(const vtkHyperStreamline&) VTK_DELETE_FUNCTION;
301 };
302 
303 #endif
#define VTK_DOUBLE_MAX
Definition: vtkType.h:167
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:56
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called by the superclass.
#define VTK_INT_MAX
Definition: vtkType.h:157
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:345
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()
Superclass for algorithms that produce only polydata as output.
#define VTK_INTEGRATE_MINOR_EIGENVECTOR
a simple class to control print indentation
Definition: vtkIndent.h:33
#define VTK_INTEGRATE_FORWARD
void SetIntegrationEigenvectorToMedium()
Set / get the eigenvector field through which to ingrate.
void SetIntegrationEigenvectorToMajor()
Set / get the eigenvector field through which to ingrate.
#define VTK_INTEGRATE_BACKWARD
vtkSetMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
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.
vtkBooleanMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
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