VTK  9.1.0
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=========================================================================*/
67#ifndef vtkHyperStreamline_h
68#define vtkHyperStreamline_h
69
70#include "vtkFiltersGeneralModule.h" // For export macro
72
73#define VTK_INTEGRATE_FORWARD 0
74#define VTK_INTEGRATE_BACKWARD 1
75#define VTK_INTEGRATE_BOTH_DIRECTIONS 2
76
77#define VTK_INTEGRATE_MAJOR_EIGENVECTOR 0
78#define VTK_INTEGRATE_MEDIUM_EIGENVECTOR 1
79#define VTK_INTEGRATE_MINOR_EIGENVECTOR 2
80
81class vtkHyperArray;
82
83class VTKFILTERSGENERAL_EXPORT vtkHyperStreamline : public vtkPolyDataAlgorithm
84{
85public:
87 void PrintSelf(ostream& os, vtkIndent indent) override;
88
96
101 void SetStartLocation(vtkIdType cellId, int subId, double pcoords[3]);
102
107 void SetStartLocation(vtkIdType cellId, int subId, double r, double s, double t);
108
113 vtkIdType GetStartLocation(int& subId, double pcoords[3]);
114
120 void SetStartPosition(double x[3]);
121
127 void SetStartPosition(double x, double y, double z);
128
133
135
139 vtkSetClampMacro(MaximumPropagationDistance, double, 0.0, VTK_DOUBLE_MAX);
140 vtkGetMacro(MaximumPropagationDistance, double);
142
144
154 vtkSetClampMacro(
156 vtkGetMacro(IntegrationEigenvector, int);
157 void SetIntegrationEigenvectorToMajor()
158 {
159 this->SetIntegrationEigenvector(VTK_INTEGRATE_MAJOR_EIGENVECTOR);
160 }
162 {
163 this->SetIntegrationEigenvector(VTK_INTEGRATE_MEDIUM_EIGENVECTOR);
164 }
166 {
167 this->SetIntegrationEigenvector(VTK_INTEGRATE_MINOR_EIGENVECTOR);
168 }
170
176 void IntegrateMajorEigenvector() { this->SetIntegrationEigenvectorToMajor(); }
177
184 void IntegrateMediumEigenvector() { this->SetIntegrationEigenvectorToMedium(); }
185
191 void IntegrateMinorEigenvector() { this->SetIntegrationEigenvectorToMinor(); }
192
194
198 vtkSetClampMacro(IntegrationStepLength, double, 0.001, 0.5);
199 vtkGetMacro(IntegrationStepLength, double);
201
203
208 vtkSetClampMacro(StepLength, double, 0.000001, 1.0);
209 vtkGetMacro(StepLength, double);
211
213
216 vtkSetClampMacro(IntegrationDirection, int, VTK_INTEGRATE_FORWARD, VTK_INTEGRATE_BOTH_DIRECTIONS);
217 vtkGetMacro(IntegrationDirection, int);
218 void SetIntegrationDirectionToForward() { this->SetIntegrationDirection(VTK_INTEGRATE_FORWARD); }
220 {
221 this->SetIntegrationDirection(VTK_INTEGRATE_BACKWARD);
222 }
224 {
225 this->SetIntegrationDirection(VTK_INTEGRATE_BOTH_DIRECTIONS);
226 }
228
230
234 vtkSetClampMacro(TerminalEigenvalue, double, 0.0, VTK_DOUBLE_MAX);
235 vtkGetMacro(TerminalEigenvalue, double);
237
239
243 vtkSetClampMacro(NumberOfSides, int, 3, VTK_INT_MAX);
244 vtkGetMacro(NumberOfSides, int);
246
248
254 vtkSetClampMacro(Radius, double, 0.0001, VTK_DOUBLE_MAX);
255 vtkGetMacro(Radius, double);
257
259
263 vtkSetMacro(LogScaling, vtkTypeBool);
264 vtkGetMacro(LogScaling, vtkTypeBool);
265 vtkBooleanMacro(LogScaling, vtkTypeBool);
267
268protected:
271
272 // Integrate data
274 int BuildTube(vtkDataSet* input, vtkPolyData* output);
275
276 int FillInputPortInformation(int port, vtkInformation* info) override;
277
278 // Flag indicates where streamlines start from (either position or location)
280
281 // Starting from cell location
284 double StartPCoords[3];
285
286 // starting from global x-y-z position
287 double StartPosition[3];
288
289 // array of hyperstreamlines
290 vtkHyperArray* Streamers;
292
293 // length of hyperstreamline in absolute distance
295
296 // integration direction
298
299 // the length (fraction of cell size) of integration steps
301
302 // the length of the tube segments composing the hyperstreamline
304
305 // terminal propagation speed
307
308 // number of sides of tube
310
311 // maximum radius of tube
312 double Radius;
313
314 // boolean controls whether scaling is clamped
316
317 // which eigenvector to use as integration vector field
319
320private:
321 vtkHyperStreamline(const vtkHyperStreamline&) = delete;
322 void operator=(const vtkHyperStreamline&) = delete;
323};
324
325#endif
abstract class to specify dataset behavior
Definition: vtkDataSet.h:166
generate hyperstreamline in arbitrary dataset
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
void IntegrateMinorEigenvector()
Use the minor eigenvector field as the vector field through which to integrate.
void IntegrateMediumEigenvector()
Use the medium eigenvector field as the vector field through which to integrate.
~vtkHyperStreamline() override
int BuildTube(vtkDataSet *input, vtkPolyData *output)
int FillInputPortInformation(int port, vtkInformation *info) override
Fill the input port information objects for this algorithm.
void SetIntegrationDirectionToBackward()
Specify the direction in which to integrate the hyperstreamline.
void SetIntegrationEigenvectorToMedium()
Set / get the eigenvector field through which to ingrate.
void SetStartLocation(vtkIdType cellId, int subId, double r, double s, double t)
Specify the start of the hyperstreamline in the cell coordinate system.
static vtkHyperStreamline * New()
Construct object with initial starting position (0,0,0); integration step length 0....
void SetIntegrationDirectionToForward()
Specify the direction in which to integrate the hyperstreamline.
vtkIdType GetStartLocation(int &subId, double pcoords[3])
Get the starting location of the hyperstreamline in the cell coordinate system.
void SetStartLocation(vtkIdType cellId, int subId, double pcoords[3])
Specify the start of the hyperstreamline in the cell coordinate system.
double * GetStartPosition()
Get the start position of the hyperstreamline in global x-y-z coordinates.
void SetIntegrationDirectionToIntegrateBothDirections()
Specify the direction in which to integrate the hyperstreamline.
void IntegrateMajorEigenvector()
Use the major eigenvector field as the vector field through which to integrate.
vtkHyperArray * Streamers
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void SetIntegrationEigenvectorToMinor()
Set / get the eigenvector field through which to ingrate.
void SetStartPosition(double x[3])
Specify the start of the hyperstreamline in the global coordinate system.
void SetStartPosition(double x, double y, double z)
Specify the start of the hyperstreamline in the global coordinate system.
a simple class to control print indentation
Definition: vtkIndent.h:113
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
Superclass for algorithms that produce only polydata as output.
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:195
int vtkTypeBool
Definition: vtkABI.h:69
#define VTK_INTEGRATE_BACKWARD
#define VTK_INTEGRATE_MAJOR_EIGENVECTOR
#define VTK_INTEGRATE_MEDIUM_EIGENVECTOR
#define VTK_INTEGRATE_FORWARD
#define VTK_INTEGRATE_MINOR_EIGENVECTOR
#define VTK_INTEGRATE_BOTH_DIRECTIONS
int vtkIdType
Definition: vtkType.h:332
#define VTK_DOUBLE_MAX
Definition: vtkType.h:165
#define VTK_INT_MAX
Definition: vtkType.h:155
#define VTK_SIZEHINT(...)