VTK  9.2.6
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=========================================================================*/
70#ifndef vtkHyperStreamline_h
71#define vtkHyperStreamline_h
72
73#include "vtkFiltersGeneralModule.h" // For export macro
75
76#define VTK_INTEGRATE_FORWARD 0
77#define VTK_INTEGRATE_BACKWARD 1
78#define VTK_INTEGRATE_BOTH_DIRECTIONS 2
79
80#define VTK_INTEGRATE_MAJOR_EIGENVECTOR 0
81#define VTK_INTEGRATE_MEDIUM_EIGENVECTOR 1
82#define VTK_INTEGRATE_MINOR_EIGENVECTOR 2
83
84class vtkHyperArray;
85
86class VTKFILTERSGENERAL_EXPORT vtkHyperStreamline : public vtkPolyDataAlgorithm
87{
88public:
90 void PrintSelf(ostream& os, vtkIndent indent) override;
91
99
104 void SetStartLocation(vtkIdType cellId, int subId, double pcoords[3]);
105
110 void SetStartLocation(vtkIdType cellId, int subId, double r, double s, double t);
111
116 vtkIdType GetStartLocation(int& subId, double pcoords[3]);
117
123 void SetStartPosition(double x[3]);
124
130 void SetStartPosition(double x, double y, double z);
131
136
138
142 vtkSetClampMacro(MaximumPropagationDistance, double, 0.0, VTK_DOUBLE_MAX);
143 vtkGetMacro(MaximumPropagationDistance, double);
145
147
157 vtkSetClampMacro(
159 vtkGetMacro(IntegrationEigenvector, int);
160 void SetIntegrationEigenvectorToMajor()
161 {
162 this->SetIntegrationEigenvector(VTK_INTEGRATE_MAJOR_EIGENVECTOR);
163 }
165 {
166 this->SetIntegrationEigenvector(VTK_INTEGRATE_MEDIUM_EIGENVECTOR);
167 }
169 {
170 this->SetIntegrationEigenvector(VTK_INTEGRATE_MINOR_EIGENVECTOR);
171 }
173
179 void IntegrateMajorEigenvector() { this->SetIntegrationEigenvectorToMajor(); }
180
187 void IntegrateMediumEigenvector() { this->SetIntegrationEigenvectorToMedium(); }
188
194 void IntegrateMinorEigenvector() { this->SetIntegrationEigenvectorToMinor(); }
195
197
201 vtkSetClampMacro(IntegrationStepLength, double, 0.001, 0.5);
202 vtkGetMacro(IntegrationStepLength, double);
204
206
211 vtkSetClampMacro(StepLength, double, 0.000001, 1.0);
212 vtkGetMacro(StepLength, double);
214
216
219 vtkSetClampMacro(IntegrationDirection, int, VTK_INTEGRATE_FORWARD, VTK_INTEGRATE_BOTH_DIRECTIONS);
220 vtkGetMacro(IntegrationDirection, int);
221 void SetIntegrationDirectionToForward() { this->SetIntegrationDirection(VTK_INTEGRATE_FORWARD); }
223 {
224 this->SetIntegrationDirection(VTK_INTEGRATE_BACKWARD);
225 }
227 {
228 this->SetIntegrationDirection(VTK_INTEGRATE_BOTH_DIRECTIONS);
229 }
231
233
237 vtkSetClampMacro(TerminalEigenvalue, double, 0.0, VTK_DOUBLE_MAX);
238 vtkGetMacro(TerminalEigenvalue, double);
240
242
246 vtkSetClampMacro(NumberOfSides, int, 3, VTK_INT_MAX);
247 vtkGetMacro(NumberOfSides, int);
249
251
257 vtkSetClampMacro(Radius, double, 0.0001, VTK_DOUBLE_MAX);
258 vtkGetMacro(Radius, double);
260
262
266 vtkSetMacro(LogScaling, vtkTypeBool);
267 vtkGetMacro(LogScaling, vtkTypeBool);
268 vtkBooleanMacro(LogScaling, vtkTypeBool);
270
271protected:
274
275 // Integrate data
277 int BuildTube(vtkDataSet* input, vtkPolyData* output);
278
280
281 // Flag indicates where streamlines start from (either position or location)
283
284 // Starting from cell location
287 double StartPCoords[3];
288
289 // starting from global x-y-z position
290 double StartPosition[3];
291
292 // array of hyperstreamlines
293 vtkHyperArray* Streamers;
295
296 // length of hyperstreamline in absolute distance
298
299 // integration direction
301
302 // the length (fraction of cell size) of integration steps
304
305 // the length of the tube segments composing the hyperstreamline
307
308 // terminal propagation speed
310
311 // number of sides of tube
313
314 // maximum radius of tube
315 double Radius;
316
317 // boolean controls whether scaling is clamped
319
320 // which eigenvector to use as integration vector field
322
323private:
324 vtkHyperStreamline(const vtkHyperStreamline&) = delete;
325 void operator=(const vtkHyperStreamline&) = delete;
326};
327
328#endif
abstract class to specify dataset behavior
Definition: vtkDataSet.h:172
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:119
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:200
@ info
Definition: vtkX3D.h:382
@ port
Definition: vtkX3D.h:453
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(...)