VTK  9.3.20240423
vtkHyperStreamline.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2// SPDX-License-Identifier: BSD-3-Clause
58#ifndef vtkHyperStreamline_h
59#define vtkHyperStreamline_h
60
61#include "vtkFiltersGeneralModule.h" // For export macro
63
64#define VTK_INTEGRATE_FORWARD 0
65#define VTK_INTEGRATE_BACKWARD 1
66#define VTK_INTEGRATE_BOTH_DIRECTIONS 2
67
68#define VTK_INTEGRATE_MAJOR_EIGENVECTOR 0
69#define VTK_INTEGRATE_MEDIUM_EIGENVECTOR 1
70#define VTK_INTEGRATE_MINOR_EIGENVECTOR 2
71
72VTK_ABI_NAMESPACE_BEGIN
73class vtkHyperArray;
74
75class VTKFILTERSGENERAL_EXPORT vtkHyperStreamline : public vtkPolyDataAlgorithm
76{
77public:
79 void PrintSelf(ostream& os, vtkIndent indent) override;
80
88
93 void SetStartLocation(vtkIdType cellId, int subId, double pcoords[3]);
94
99 void SetStartLocation(vtkIdType cellId, int subId, double r, double s, double t);
100
105 vtkIdType GetStartLocation(int& subId, double pcoords[3]);
106
112 void SetStartPosition(double x[3]);
113
119 void SetStartPosition(double x, double y, double z);
120
125
127
131 vtkSetClampMacro(MaximumPropagationDistance, double, 0.0, VTK_DOUBLE_MAX);
132 vtkGetMacro(MaximumPropagationDistance, double);
134
136
146 vtkSetClampMacro(
148 vtkGetMacro(IntegrationEigenvector, int);
149 void SetIntegrationEigenvectorToMajor()
150 {
151 this->SetIntegrationEigenvector(VTK_INTEGRATE_MAJOR_EIGENVECTOR);
152 }
154 {
155 this->SetIntegrationEigenvector(VTK_INTEGRATE_MEDIUM_EIGENVECTOR);
156 }
158 {
159 this->SetIntegrationEigenvector(VTK_INTEGRATE_MINOR_EIGENVECTOR);
160 }
162
168 void IntegrateMajorEigenvector() { this->SetIntegrationEigenvectorToMajor(); }
169
176 void IntegrateMediumEigenvector() { this->SetIntegrationEigenvectorToMedium(); }
177
183 void IntegrateMinorEigenvector() { this->SetIntegrationEigenvectorToMinor(); }
184
186
190 vtkSetClampMacro(IntegrationStepLength, double, 0.001, 0.5);
191 vtkGetMacro(IntegrationStepLength, double);
193
195
200 vtkSetClampMacro(StepLength, double, 0.000001, 1.0);
201 vtkGetMacro(StepLength, double);
203
205
208 vtkSetClampMacro(IntegrationDirection, int, VTK_INTEGRATE_FORWARD, VTK_INTEGRATE_BOTH_DIRECTIONS);
209 vtkGetMacro(IntegrationDirection, int);
210 void SetIntegrationDirectionToForward() { this->SetIntegrationDirection(VTK_INTEGRATE_FORWARD); }
212 {
213 this->SetIntegrationDirection(VTK_INTEGRATE_BACKWARD);
214 }
216 {
217 this->SetIntegrationDirection(VTK_INTEGRATE_BOTH_DIRECTIONS);
218 }
220
222
226 vtkSetClampMacro(TerminalEigenvalue, double, 0.0, VTK_DOUBLE_MAX);
227 vtkGetMacro(TerminalEigenvalue, double);
229
231
235 vtkSetClampMacro(NumberOfSides, int, 3, VTK_INT_MAX);
236 vtkGetMacro(NumberOfSides, int);
238
240
246 vtkSetClampMacro(Radius, double, 0.0001, VTK_DOUBLE_MAX);
247 vtkGetMacro(Radius, double);
249
251
255 vtkSetMacro(LogScaling, vtkTypeBool);
256 vtkGetMacro(LogScaling, vtkTypeBool);
257 vtkBooleanMacro(LogScaling, vtkTypeBool);
259
260protected:
263
264 // Integrate data
266 int BuildTube(vtkDataSet* input, vtkPolyData* output);
267
268 int FillInputPortInformation(int port, vtkInformation* info) override;
269
270 // Flag indicates where streamlines start from (either position or location)
272
273 // Starting from cell location
276 double StartPCoords[3];
277
278 // starting from global x-y-z position
279 double StartPosition[3];
280
281 // array of hyperstreamlines
282 vtkHyperArray* Streamers;
284
285 // length of hyperstreamline in absolute distance
287
288 // integration direction
290
291 // the length (fraction of cell size) of integration steps
293
294 // the length of the tube segments composing the hyperstreamline
296
297 // terminal propagation speed
299
300 // number of sides of tube
302
303 // maximum radius of tube
304 double Radius;
305
306 // boolean controls whether scaling is clamped
308
309 // which eigenvector to use as integration vector field
311
312private:
313 vtkHyperStreamline(const vtkHyperStreamline&) = delete;
314 void operator=(const vtkHyperStreamline&) = delete;
315};
316
317VTK_ABI_NAMESPACE_END
318#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:108
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
int vtkTypeBool
Definition vtkABI.h:64
#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:315
#define VTK_DOUBLE_MAX
Definition vtkType.h:154
#define VTK_INT_MAX
Definition vtkType.h:144
#define VTK_SIZEHINT(...)