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 =========================================================================*/
50 #ifndef __vtkHyperStreamline_h
51 #define __vtkHyperStreamline_h
52 
53 #include "vtkPolyDataAlgorithm.h"
54 
55 #define VTK_INTEGRATE_FORWARD 0
56 #define VTK_INTEGRATE_BACKWARD 1
57 #define VTK_INTEGRATE_BOTH_DIRECTIONS 2
58 
59 #define VTK_INTEGRATE_MAJOR_EIGENVECTOR 0
60 #define VTK_INTEGRATE_MEDIUM_EIGENVECTOR 1
61 #define VTK_INTEGRATE_MINOR_EIGENVECTOR 2
62 
63 
64 class vtkHyperArray;
65 
67 {
68 public:
70  void PrintSelf(ostream& os, vtkIndent indent);
71 
76  static vtkHyperStreamline *New();
77 
81  void SetStartLocation(vtkIdType cellId, int subId, double pcoords[3]);
82 
84 
87  void SetStartLocation(vtkIdType cellId, int subId, double r, double s,
88  double t);
90 
93  vtkIdType GetStartLocation(int& subId, double pcoords[3]);
94 
98  void SetStartPosition(double x[3]);
99 
103  void SetStartPosition(double x, double y, double z);
104 
107  double *GetStartPosition();
108 
110 
112  vtkSetClampMacro(MaximumPropagationDistance,double,0.0,VTK_DOUBLE_MAX);
113  vtkGetMacro(MaximumPropagationDistance,double);
115 
117 
124  vtkSetClampMacro(IntegrationEigenvector,int,
127  vtkGetMacro(IntegrationEigenvector,int);
129  {this->SetIntegrationEigenvector(VTK_INTEGRATE_MAJOR_EIGENVECTOR);};
131  {this->SetIntegrationEigenvector(VTK_INTEGRATE_MEDIUM_EIGENVECTOR);};
133  {this->SetIntegrationEigenvector(VTK_INTEGRATE_MINOR_EIGENVECTOR);};
135 
137 
141  {this->SetIntegrationEigenvectorToMajor();};
143 
145 
149  {this->SetIntegrationEigenvectorToMedium();};
151 
153 
157  {this->SetIntegrationEigenvectorToMinor();};
159 
161 
163  vtkSetClampMacro(IntegrationStepLength,double,0.001,0.5);
164  vtkGetMacro(IntegrationStepLength,double);
166 
168 
171  vtkSetClampMacro(StepLength,double,0.000001,1.0);
172  vtkGetMacro(StepLength,double);
174 
176 
177  vtkSetClampMacro(IntegrationDirection,int,
179  vtkGetMacro(IntegrationDirection,int);
181  {this->SetIntegrationDirection(VTK_INTEGRATE_FORWARD);};
183  {this->SetIntegrationDirection(VTK_INTEGRATE_BACKWARD);};
185  {this->SetIntegrationDirection(VTK_INTEGRATE_BOTH_DIRECTIONS);};
187 
189 
191  vtkSetClampMacro(TerminalEigenvalue,double,0.0,VTK_DOUBLE_MAX);
192  vtkGetMacro(TerminalEigenvalue,double);
194 
196 
198  vtkSetClampMacro(NumberOfSides,int,3,VTK_LARGE_INTEGER);
199  vtkGetMacro(NumberOfSides,int);
201 
203 
207  vtkSetClampMacro(Radius,double,0.0001,VTK_DOUBLE_MAX);
208  vtkGetMacro(Radius,double);
210 
212 
214  vtkSetMacro(LogScaling,int);
215  vtkGetMacro(LogScaling,int);
216  vtkBooleanMacro(LogScaling,int);
218 
219 protected:
222 
223  // Integrate data
225  int BuildTube(vtkDataSet *input, vtkPolyData *output);
226 
228 
229  // Flag indicates where streamlines start from (either position or location)
231 
232  // Starting from cell location
235  double StartPCoords[3];
236 
237  // starting from global x-y-z position
238  double StartPosition[3];
239 
240  //array of hyperstreamlines
241  vtkHyperArray *Streamers;
243 
244  // length of hyperstreamline in absolute distance
246 
247  // integration direction
249 
250  // the length (fraction of cell size) of integration steps
252 
253  // the length of the tube segments composing the hyperstreamline
254  double StepLength;
255 
256  // terminal propagation speed
258 
259  // number of sides of tube
261 
262  // maximum radius of tube
263  double Radius;
264 
265  // boolean controls whether scaling is clamped
267 
268  // which eigenvector to use as integration vector field
270 private:
271  vtkHyperStreamline(const vtkHyperStreamline&); // Not implemented.
272  void operator=(const vtkHyperStreamline&); // Not implemented.
273 };
274 
275 #endif
#define VTK_GRAPHICS_EXPORT
virtual int FillInputPortInformation(int port, vtkInformation *info)
#define VTK_DOUBLE_MAX
Definition: vtkType.h:133
Store vtkAlgorithm input/output information.
void SetIntegrationEigenvectorToMinor()
abstract class to specify dataset behavior
Definition: vtkDataSet.h:58
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
void SetIntegrationDirectionToForward()
void SetIntegrationDirectionToBackward()
int vtkIdType
Definition: vtkType.h:255
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:81
#define VTK_INTEGRATE_MAJOR_EIGENVECTOR
#define VTK_INTEGRATE_MEDIUM_EIGENVECTOR
static vtkPolyDataAlgorithm * New()
void PrintSelf(ostream &os, vtkIndent indent)
Superclass for algorithms that produce only polydata as output.
#define VTK_INTEGRATE_MINOR_EIGENVECTOR
a simple class to control print indentation
Definition: vtkIndent.h:37
#define VTK_INTEGRATE_FORWARD
void SetIntegrationEigenvectorToMedium()
void SetIntegrationEigenvectorToMajor()
#define VTK_INTEGRATE_BACKWARD
Store zero or more vtkInformation instances.
vtkHyperArray * Streamers
#define VTK_LARGE_INTEGER
Definition: vtkType.h:148
void SetIntegrationDirectionToIntegrateBothDirections()
#define VTK_INTEGRATE_BOTH_DIRECTIONS
generate hyperstreamline in arbitrary dataset