VTK  9.3.0
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
39#ifndef vtkHyperStreamline_h
40#define vtkHyperStreamline_h
41
42#include "vtkFiltersGeneralModule.h" // For export macro
44
45#define VTK_INTEGRATE_FORWARD 0
46#define VTK_INTEGRATE_BACKWARD 1
47#define VTK_INTEGRATE_BOTH_DIRECTIONS 2
48
49#define VTK_INTEGRATE_MAJOR_EIGENVECTOR 0
50#define VTK_INTEGRATE_MEDIUM_EIGENVECTOR 1
51#define VTK_INTEGRATE_MINOR_EIGENVECTOR 2
52
53VTK_ABI_NAMESPACE_BEGIN
54class vtkHyperArray;
55
56class VTKFILTERSGENERAL_EXPORT vtkHyperStreamline : public vtkPolyDataAlgorithm
57{
58public:
60 void PrintSelf(ostream& os, vtkIndent indent) override;
61
69
74 void SetStartLocation(vtkIdType cellId, int subId, double pcoords[3]);
75
80 void SetStartLocation(vtkIdType cellId, int subId, double r, double s, double t);
81
86 vtkIdType GetStartLocation(int& subId, double pcoords[3]);
87
93 void SetStartPosition(double x[3]);
94
100 void SetStartPosition(double x, double y, double z);
101
106
108
112 vtkSetClampMacro(MaximumPropagationDistance, double, 0.0, VTK_DOUBLE_MAX);
113 vtkGetMacro(MaximumPropagationDistance, double);
115
117
127 vtkSetClampMacro(
129 vtkGetMacro(IntegrationEigenvector, int);
130 void SetIntegrationEigenvectorToMajor()
131 {
132 this->SetIntegrationEigenvector(VTK_INTEGRATE_MAJOR_EIGENVECTOR);
133 }
135 {
136 this->SetIntegrationEigenvector(VTK_INTEGRATE_MEDIUM_EIGENVECTOR);
137 }
139 {
140 this->SetIntegrationEigenvector(VTK_INTEGRATE_MINOR_EIGENVECTOR);
141 }
143
149 void IntegrateMajorEigenvector() { this->SetIntegrationEigenvectorToMajor(); }
150
157 void IntegrateMediumEigenvector() { this->SetIntegrationEigenvectorToMedium(); }
158
164 void IntegrateMinorEigenvector() { this->SetIntegrationEigenvectorToMinor(); }
165
167
171 vtkSetClampMacro(IntegrationStepLength, double, 0.001, 0.5);
172 vtkGetMacro(IntegrationStepLength, double);
174
176
181 vtkSetClampMacro(StepLength, double, 0.000001, 1.0);
182 vtkGetMacro(StepLength, double);
184
186
189 vtkSetClampMacro(IntegrationDirection, int, VTK_INTEGRATE_FORWARD, VTK_INTEGRATE_BOTH_DIRECTIONS);
190 vtkGetMacro(IntegrationDirection, int);
191 void SetIntegrationDirectionToForward() { this->SetIntegrationDirection(VTK_INTEGRATE_FORWARD); }
193 {
194 this->SetIntegrationDirection(VTK_INTEGRATE_BACKWARD);
195 }
197 {
198 this->SetIntegrationDirection(VTK_INTEGRATE_BOTH_DIRECTIONS);
199 }
201
203
207 vtkSetClampMacro(TerminalEigenvalue, double, 0.0, VTK_DOUBLE_MAX);
208 vtkGetMacro(TerminalEigenvalue, double);
210
212
216 vtkSetClampMacro(NumberOfSides, int, 3, VTK_INT_MAX);
217 vtkGetMacro(NumberOfSides, int);
219
221
227 vtkSetClampMacro(Radius, double, 0.0001, VTK_DOUBLE_MAX);
228 vtkGetMacro(Radius, double);
230
232
236 vtkSetMacro(LogScaling, vtkTypeBool);
237 vtkGetMacro(LogScaling, vtkTypeBool);
238 vtkBooleanMacro(LogScaling, vtkTypeBool);
240
241protected:
244
245 // Integrate data
247 int BuildTube(vtkDataSet* input, vtkPolyData* output);
248
249 int FillInputPortInformation(int port, vtkInformation* info) override;
250
251 // Flag indicates where streamlines start from (either position or location)
253
254 // Starting from cell location
257 double StartPCoords[3];
258
259 // starting from global x-y-z position
260 double StartPosition[3];
261
262 // array of hyperstreamlines
263 vtkHyperArray* Streamers;
265
266 // length of hyperstreamline in absolute distance
268
269 // integration direction
271
272 // the length (fraction of cell size) of integration steps
274
275 // the length of the tube segments composing the hyperstreamline
277
278 // terminal propagation speed
280
281 // number of sides of tube
283
284 // maximum radius of tube
285 double Radius;
286
287 // boolean controls whether scaling is clamped
289
290 // which eigenvector to use as integration vector field
292
293private:
294 vtkHyperStreamline(const vtkHyperStreamline&) = delete;
295 void operator=(const vtkHyperStreamline&) = delete;
296};
297
298VTK_ABI_NAMESPACE_END
299#endif
abstract class to specify dataset behavior
Definition vtkDataSet.h:53
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:29
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:80
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(...)