VTK  9.0.1
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 class vtkHyperArray;
63 
64 class VTKFILTERSGENERAL_EXPORT vtkHyperStreamline : public vtkPolyDataAlgorithm
65 {
66 public:
68  void PrintSelf(ostream& os, vtkIndent indent) override;
69 
76  static vtkHyperStreamline* New();
77 
82  void SetStartLocation(vtkIdType cellId, int subId, double pcoords[3]);
83 
88  void SetStartLocation(vtkIdType cellId, int subId, double r, double s, double t);
89 
94  vtkIdType GetStartLocation(int& subId, double pcoords[3]);
95 
101  void SetStartPosition(double x[3]);
102 
108  void SetStartPosition(double x, double y, double z);
109 
113  double* GetStartPosition() VTK_SIZEHINT(3);
114 
116 
120  vtkSetClampMacro(MaximumPropagationDistance, double, 0.0, VTK_DOUBLE_MAX);
121  vtkGetMacro(MaximumPropagationDistance, double);
123 
125 
135  vtkSetClampMacro(
137  vtkGetMacro(IntegrationEigenvector, int);
138  void SetIntegrationEigenvectorToMajor()
139  {
140  this->SetIntegrationEigenvector(VTK_INTEGRATE_MAJOR_EIGENVECTOR);
141  }
143  {
144  this->SetIntegrationEigenvector(VTK_INTEGRATE_MEDIUM_EIGENVECTOR);
145  }
147  {
148  this->SetIntegrationEigenvector(VTK_INTEGRATE_MINOR_EIGENVECTOR);
149  }
151 
157  void IntegrateMajorEigenvector() { this->SetIntegrationEigenvectorToMajor(); }
158 
165  void IntegrateMediumEigenvector() { this->SetIntegrationEigenvectorToMedium(); }
166 
172  void IntegrateMinorEigenvector() { 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, VTK_INTEGRATE_FORWARD, VTK_INTEGRATE_BOTH_DIRECTIONS);
198  vtkGetMacro(IntegrationDirection, int);
199  void SetIntegrationDirectionToForward() { this->SetIntegrationDirection(VTK_INTEGRATE_FORWARD); }
201  {
202  this->SetIntegrationDirection(VTK_INTEGRATE_BACKWARD);
203  }
205  {
206  this->SetIntegrationDirection(VTK_INTEGRATE_BOTH_DIRECTIONS);
207  }
209 
211 
215  vtkSetClampMacro(TerminalEigenvalue, double, 0.0, VTK_DOUBLE_MAX);
216  vtkGetMacro(TerminalEigenvalue, double);
218 
220 
224  vtkSetClampMacro(NumberOfSides, int, 3, VTK_INT_MAX);
225  vtkGetMacro(NumberOfSides, int);
227 
229 
235  vtkSetClampMacro(Radius, double, 0.0001, VTK_DOUBLE_MAX);
236  vtkGetMacro(Radius, double);
238 
240 
244  vtkSetMacro(LogScaling, vtkTypeBool);
245  vtkGetMacro(LogScaling, vtkTypeBool);
246  vtkBooleanMacro(LogScaling, vtkTypeBool);
248 
249 protected:
251  ~vtkHyperStreamline() override;
252 
253  // Integrate data
255  int BuildTube(vtkDataSet* input, vtkPolyData* output);
256 
257  int FillInputPortInformation(int port, vtkInformation* info) override;
258 
259  // Flag indicates where streamlines start from (either position or location)
261 
262  // Starting from cell location
265  double StartPCoords[3];
266 
267  // starting from global x-y-z position
268  double StartPosition[3];
269 
270  // array of hyperstreamlines
271  vtkHyperArray* Streamers;
273 
274  // length of hyperstreamline in absolute distance
276 
277  // integration direction
279 
280  // the length (fraction of cell size) of integration steps
282 
283  // the length of the tube segments composing the hyperstreamline
284  double StepLength;
285 
286  // terminal propagation speed
288 
289  // number of sides of tube
291 
292  // maximum radius of tube
293  double Radius;
294 
295  // boolean controls whether scaling is clamped
297 
298  // which eigenvector to use as integration vector field
300 
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:155
vtkHyperStreamline
generate hyperstreamline in arbitrary dataset
Definition: vtkHyperStreamline.h:64
vtkHyperStreamline::Streamers
vtkHyperArray * Streamers
Definition: vtkHyperStreamline.h:271
VTK_INTEGRATE_MAJOR_EIGENVECTOR
#define VTK_INTEGRATE_MAJOR_EIGENVECTOR
Definition: vtkHyperStreamline.h:58
vtkIdType
int vtkIdType
Definition: vtkType.h:338
VTK_INTEGRATE_FORWARD
#define VTK_INTEGRATE_FORWARD
Definition: vtkHyperStreamline.h:54
vtkHyperStreamline::NumberOfStreamers
int NumberOfStreamers
Definition: vtkHyperStreamline.h:272
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:35
vtkHyperStreamline::StartSubId
int StartSubId
Definition: vtkHyperStreamline.h:264
vtkHyperStreamline::SetIntegrationEigenvectorToMedium
void SetIntegrationEigenvectorToMedium()
Definition: vtkHyperStreamline.h:142
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:278
vtkHyperStreamline::NumberOfSides
int NumberOfSides
Definition: vtkHyperStreamline.h:290
vtkHyperStreamline::StartFrom
int StartFrom
Definition: vtkHyperStreamline.h:260
VTK_INTEGRATE_BACKWARD
#define VTK_INTEGRATE_BACKWARD
Definition: vtkHyperStreamline.h:55
vtkHyperStreamline::IntegrationStepLength
double IntegrationStepLength
Definition: vtkHyperStreamline.h:281
vtkPolyDataAlgorithm.h
vtkHyperStreamline::SetIntegrationDirectionToForward
void SetIntegrationDirectionToForward()
Definition: vtkHyperStreamline.h:199
vtkX3D::port
@ port
Definition: vtkX3D.h:453
VTK_SIZEHINT
#define VTK_SIZEHINT(...)
Definition: vtkWrappingHints.h:45
vtkPolyDataAlgorithm::RequestData
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called by the superclass.
vtkHyperStreamline::SetIntegrationDirectionToBackward
void SetIntegrationDirectionToBackward()
Definition: vtkHyperStreamline.h:200
VTK_INTEGRATE_MEDIUM_EIGENVECTOR
#define VTK_INTEGRATE_MEDIUM_EIGENVECTOR
Definition: vtkHyperStreamline.h:59
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:33
vtkHyperStreamline::StepLength
double StepLength
Definition: vtkHyperStreamline.h:284
vtkHyperStreamline::StartCell
vtkIdType StartCell
Definition: vtkHyperStreamline.h:263
vtkHyperStreamline::IntegrateMediumEigenvector
void IntegrateMediumEigenvector()
Use the medium eigenvector field as the vector field through which to integrate.
Definition: vtkHyperStreamline.h:165
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:204
vtkDataSet
abstract class to specify dataset behavior
Definition: vtkDataSet.h:56
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:73
vtkX3D::info
@ info
Definition: vtkX3D.h:382
vtkHyperStreamline::TerminalEigenvalue
double TerminalEigenvalue
Definition: vtkHyperStreamline.h:287
vtkHyperStreamline::LogScaling
vtkTypeBool LogScaling
Definition: vtkHyperStreamline.h:296
VTK_INTEGRATE_BOTH_DIRECTIONS
#define VTK_INTEGRATE_BOTH_DIRECTIONS
Definition: vtkHyperStreamline.h:56
vtkPolyData
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:84
vtkHyperStreamline::IntegrationEigenvector
int IntegrationEigenvector
Definition: vtkHyperStreamline.h:299
VTK_INTEGRATE_MINOR_EIGENVECTOR
#define VTK_INTEGRATE_MINOR_EIGENVECTOR
Definition: vtkHyperStreamline.h:60
vtkHyperStreamline::IntegrateMinorEigenvector
void IntegrateMinorEigenvector()
Use the minor eigenvector field as the vector field through which to integrate.
Definition: vtkHyperStreamline.h:172
vtkHyperStreamline::MaximumPropagationDistance
double MaximumPropagationDistance
Definition: vtkHyperStreamline.h:275
VTK_DOUBLE_MAX
#define VTK_DOUBLE_MAX
Definition: vtkType.h:165
vtkTypeBool
int vtkTypeBool
Definition: vtkABI.h:69
vtkPolyDataAlgorithm::New
static vtkPolyDataAlgorithm * New()
vtkHyperStreamline::Radius
double Radius
Definition: vtkHyperStreamline.h:293
vtkHyperStreamline::SetIntegrationEigenvectorToMinor
void SetIntegrationEigenvectorToMinor()
Definition: vtkHyperStreamline.h:146
vtkPolyDataAlgorithm
Superclass for algorithms that produce only polydata as output.
Definition: vtkPolyDataAlgorithm.h:41