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 "vtkFiltersGeneralModule.h" // For export macro
54 #include "vtkPolyDataAlgorithm.h"
55 
56 #define VTK_INTEGRATE_FORWARD 0
57 #define VTK_INTEGRATE_BACKWARD 1
58 #define VTK_INTEGRATE_BOTH_DIRECTIONS 2
59 
60 #define VTK_INTEGRATE_MAJOR_EIGENVECTOR 0
61 #define VTK_INTEGRATE_MEDIUM_EIGENVECTOR 1
62 #define VTK_INTEGRATE_MINOR_EIGENVECTOR 2
63 
64 
65 class vtkHyperArray;
66 
68 {
69 public:
71  void PrintSelf(ostream& os, vtkIndent indent);
72 
77  static vtkHyperStreamline *New();
78 
82  void SetStartLocation(vtkIdType cellId, int subId, double pcoords[3]);
83 
85 
88  void SetStartLocation(vtkIdType cellId, int subId, double r, double s,
89  double t);
91 
94  vtkIdType GetStartLocation(int& subId, double pcoords[3]);
95 
99  void SetStartPosition(double x[3]);
100 
104  void SetStartPosition(double x, double y, double z);
105 
108  double *GetStartPosition();
109 
111 
113  vtkSetClampMacro(MaximumPropagationDistance,double,0.0,VTK_DOUBLE_MAX);
114  vtkGetMacro(MaximumPropagationDistance,double);
116 
118 
125  vtkSetClampMacro(IntegrationEigenvector,int,
128  vtkGetMacro(IntegrationEigenvector,int);
130  {this->SetIntegrationEigenvector(VTK_INTEGRATE_MAJOR_EIGENVECTOR);};
132  {this->SetIntegrationEigenvector(VTK_INTEGRATE_MEDIUM_EIGENVECTOR);};
134  {this->SetIntegrationEigenvector(VTK_INTEGRATE_MINOR_EIGENVECTOR);};
136 
138 
142  {this->SetIntegrationEigenvectorToMajor();};
144 
146 
150  {this->SetIntegrationEigenvectorToMedium();};
152 
154 
158  {this->SetIntegrationEigenvectorToMinor();};
160 
162 
164  vtkSetClampMacro(IntegrationStepLength,double,0.001,0.5);
165  vtkGetMacro(IntegrationStepLength,double);
167 
169 
172  vtkSetClampMacro(StepLength,double,0.000001,1.0);
173  vtkGetMacro(StepLength,double);
175 
177 
178  vtkSetClampMacro(IntegrationDirection,int,
180  vtkGetMacro(IntegrationDirection,int);
182  {this->SetIntegrationDirection(VTK_INTEGRATE_FORWARD);};
184  {this->SetIntegrationDirection(VTK_INTEGRATE_BACKWARD);};
186  {this->SetIntegrationDirection(VTK_INTEGRATE_BOTH_DIRECTIONS);};
188 
190 
192  vtkSetClampMacro(TerminalEigenvalue,double,0.0,VTK_DOUBLE_MAX);
193  vtkGetMacro(TerminalEigenvalue,double);
195 
197 
199  vtkSetClampMacro(NumberOfSides,int,3,VTK_INT_MAX);
200  vtkGetMacro(NumberOfSides,int);
202 
204 
208  vtkSetClampMacro(Radius,double,0.0001,VTK_DOUBLE_MAX);
209  vtkGetMacro(Radius,double);
211 
213 
215  vtkSetMacro(LogScaling,int);
216  vtkGetMacro(LogScaling,int);
217  vtkBooleanMacro(LogScaling,int);
219 
220 protected:
223 
224  // Integrate data
226  int BuildTube(vtkDataSet *input, vtkPolyData *output);
227 
229 
230  // Flag indicates where streamlines start from (either position or location)
232 
233  // Starting from cell location
236  double StartPCoords[3];
237 
238  // starting from global x-y-z position
239  double StartPosition[3];
240 
241  //array of hyperstreamlines
242  vtkHyperArray *Streamers;
244 
245  // length of hyperstreamline in absolute distance
247 
248  // integration direction
250 
251  // the length (fraction of cell size) of integration steps
253 
254  // the length of the tube segments composing the hyperstreamline
255  double StepLength;
256 
257  // terminal propagation speed
259 
260  // number of sides of tube
262 
263  // maximum radius of tube
264  double Radius;
265 
266  // boolean controls whether scaling is clamped
268 
269  // which eigenvector to use as integration vector field
271 private:
272  vtkHyperStreamline(const vtkHyperStreamline&); // Not implemented.
273  void operator=(const vtkHyperStreamline&); // Not implemented.
274 };
275 
276 #endif
virtual int FillInputPortInformation(int port, vtkInformation *info)
#define VTK_DOUBLE_MAX
Definition: vtkType.h:140
Store vtkAlgorithm input/output information.
void SetIntegrationEigenvectorToMinor()
abstract class to specify dataset behavior
Definition: vtkDataSet.h:61
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
#define VTK_INT_MAX
Definition: vtkType.h:130
void SetIntegrationDirectionToForward()
void SetIntegrationDirectionToBackward()
int vtkIdType
Definition: vtkType.h:247
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:84
#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:38
#define VTK_INTEGRATE_FORWARD
void SetIntegrationEigenvectorToMedium()
#define VTKFILTERSGENERAL_EXPORT
void SetIntegrationEigenvectorToMajor()
#define VTK_INTEGRATE_BACKWARD
Store zero or more vtkInformation instances.
vtkHyperArray * Streamers
void SetIntegrationDirectionToIntegrateBothDirections()
#define VTK_INTEGRATE_BOTH_DIRECTIONS
generate hyperstreamline in arbitrary dataset