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=========================================================================*/
51#ifndef vtkHyperStreamline_h
52#define vtkHyperStreamline_h
53
54#include "vtkFiltersGeneralModule.h" // For export macro
56
57#define VTK_INTEGRATE_FORWARD 0
58#define VTK_INTEGRATE_BACKWARD 1
59#define VTK_INTEGRATE_BOTH_DIRECTIONS 2
60
61#define VTK_INTEGRATE_MAJOR_EIGENVECTOR 0
62#define VTK_INTEGRATE_MEDIUM_EIGENVECTOR 1
63#define VTK_INTEGRATE_MINOR_EIGENVECTOR 2
64
65class vtkHyperArray;
66
67class VTKFILTERSGENERAL_EXPORT vtkHyperStreamline : public vtkPolyDataAlgorithm
68{
69public:
71 void PrintSelf(ostream& os, vtkIndent indent) override;
72
80
85 void SetStartLocation(vtkIdType cellId, int subId, double pcoords[3]);
86
91 void SetStartLocation(vtkIdType cellId, int subId, double r, double s, double t);
92
97 vtkIdType GetStartLocation(int& subId, double pcoords[3]);
98
104 void SetStartPosition(double x[3]);
105
111 void SetStartPosition(double x, double y, double z);
112
117
119
123 vtkSetClampMacro(MaximumPropagationDistance, double, 0.0, VTK_DOUBLE_MAX);
124 vtkGetMacro(MaximumPropagationDistance, double);
126
128
138 vtkSetClampMacro(
140 vtkGetMacro(IntegrationEigenvector, int);
141 void SetIntegrationEigenvectorToMajor()
142 {
143 this->SetIntegrationEigenvector(VTK_INTEGRATE_MAJOR_EIGENVECTOR);
144 }
146 {
147 this->SetIntegrationEigenvector(VTK_INTEGRATE_MEDIUM_EIGENVECTOR);
148 }
150 {
151 this->SetIntegrationEigenvector(VTK_INTEGRATE_MINOR_EIGENVECTOR);
152 }
154
160 void IntegrateMajorEigenvector() { this->SetIntegrationEigenvectorToMajor(); }
161
168 void IntegrateMediumEigenvector() { this->SetIntegrationEigenvectorToMedium(); }
169
175 void IntegrateMinorEigenvector() { this->SetIntegrationEigenvectorToMinor(); }
176
178
182 vtkSetClampMacro(IntegrationStepLength, double, 0.001, 0.5);
183 vtkGetMacro(IntegrationStepLength, double);
185
187
192 vtkSetClampMacro(StepLength, double, 0.000001, 1.0);
193 vtkGetMacro(StepLength, double);
195
197
200 vtkSetClampMacro(IntegrationDirection, int, VTK_INTEGRATE_FORWARD, VTK_INTEGRATE_BOTH_DIRECTIONS);
201 vtkGetMacro(IntegrationDirection, int);
202 void SetIntegrationDirectionToForward() { this->SetIntegrationDirection(VTK_INTEGRATE_FORWARD); }
204 {
205 this->SetIntegrationDirection(VTK_INTEGRATE_BACKWARD);
206 }
208 {
209 this->SetIntegrationDirection(VTK_INTEGRATE_BOTH_DIRECTIONS);
210 }
212
214
218 vtkSetClampMacro(TerminalEigenvalue, double, 0.0, VTK_DOUBLE_MAX);
219 vtkGetMacro(TerminalEigenvalue, double);
221
223
227 vtkSetClampMacro(NumberOfSides, int, 3, VTK_INT_MAX);
228 vtkGetMacro(NumberOfSides, int);
230
232
238 vtkSetClampMacro(Radius, double, 0.0001, VTK_DOUBLE_MAX);
239 vtkGetMacro(Radius, double);
241
243
247 vtkSetMacro(LogScaling, vtkTypeBool);
248 vtkGetMacro(LogScaling, vtkTypeBool);
249 vtkBooleanMacro(LogScaling, vtkTypeBool);
251
252protected:
255
256 // Integrate data
258 int BuildTube(vtkDataSet* input, vtkPolyData* output);
259
260 int FillInputPortInformation(int port, vtkInformation* info) override;
261
262 // Flag indicates where streamlines start from (either position or location)
264
265 // Starting from cell location
268 double StartPCoords[3];
269
270 // starting from global x-y-z position
271 double StartPosition[3];
272
273 // array of hyperstreamlines
274 vtkHyperArray* Streamers;
276
277 // length of hyperstreamline in absolute distance
279
280 // integration direction
282
283 // the length (fraction of cell size) of integration steps
285
286 // the length of the tube segments composing the hyperstreamline
288
289 // terminal propagation speed
291
292 // number of sides of tube
294
295 // maximum radius of tube
296 double Radius;
297
298 // boolean controls whether scaling is clamped
300
301 // which eigenvector to use as integration vector field
303
304private:
305 vtkHyperStreamline(const vtkHyperStreamline&) = delete;
306 void operator=(const vtkHyperStreamline&) = delete;
307};
308
309#endif
abstract class to specify dataset behavior
Definition: vtkDataSet.h:63
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:40
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:91
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(...)