/usr/include/vtk-5.10/vtkHyperStreamline.h is in libvtk5-dev 5.10.1+dfsg-2.1build1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 | /*=========================================================================
Program: Visualization Toolkit
Module: vtkHyperStreamline.h
Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
All rights reserved.
See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notice for more information.
=========================================================================*/
// .NAME vtkHyperStreamline - generate hyperstreamline in arbitrary dataset
// .SECTION Description
// vtkHyperStreamline is a filter that integrates through a tensor field to
// generate a hyperstreamline. The integration is along the maximum eigenvector
// and the cross section of the hyperstreamline is defined by the two other
// eigenvectors. Thus the shape of the hyperstreamline is "tube-like", with
// the cross section being elliptical. Hyperstreamlines are used to visualize
// tensor fields.
//
// The starting point of a hyperstreamline can be defined in one of two ways.
// First, you may specify an initial position. This is a x-y-z global
// coordinate. The second option is to specify a starting location. This is
// cellId, subId, and cell parametric coordinates.
//
// The integration of the hyperstreamline occurs through the major eigenvector
// field. IntegrationStepLength controls the step length within each cell
// (i.e., this is the fraction of the cell length). The length of the
// hyperstreamline is controlled by MaximumPropagationDistance. This parameter
// is the length of the hyperstreamline in units of distance. The tube itself
// is composed of many small sub-tubes - NumberOfSides controls the number of
// sides in the tube, and StepLength controls the length of the sub-tubes.
//
// Because hyperstreamlines are often created near regions of singularities, it
// is possible to control the scaling of the tube cross section by using a
// logarithmic scale. Use LogScalingOn to turn this capability on. The Radius
// value controls the initial radius of the tube.
// .SECTION See Also
// vtkTensorGlyph vtkStreamer
#ifndef __vtkHyperStreamline_h
#define __vtkHyperStreamline_h
#include "vtkPolyDataAlgorithm.h"
#define VTK_INTEGRATE_FORWARD 0
#define VTK_INTEGRATE_BACKWARD 1
#define VTK_INTEGRATE_BOTH_DIRECTIONS 2
#define VTK_INTEGRATE_MAJOR_EIGENVECTOR 0
#define VTK_INTEGRATE_MEDIUM_EIGENVECTOR 1
#define VTK_INTEGRATE_MINOR_EIGENVECTOR 2
class vtkHyperArray;
class VTK_GRAPHICS_EXPORT vtkHyperStreamline : public vtkPolyDataAlgorithm
{
public:
vtkTypeMacro(vtkHyperStreamline,vtkPolyDataAlgorithm);
void PrintSelf(ostream& os, vtkIndent indent);
// Description:
// Construct object with initial starting position (0,0,0); integration
// step length 0.2; step length 0.01; forward integration; terminal
// eigenvalue 0.0; number of sides 6; radius 0.5; and logarithmic scaling
// off.
static vtkHyperStreamline *New();
// Description:
// Specify the start of the hyperstreamline in the cell coordinate system.
// That is, cellId and subId (if composite cell), and parametric coordinates.
void SetStartLocation(vtkIdType cellId, int subId, double pcoords[3]);
// Description:
// Specify the start of the hyperstreamline in the cell coordinate system.
// That is, cellId and subId (if composite cell), and parametric coordinates.
void SetStartLocation(vtkIdType cellId, int subId, double r, double s,
double t);
// Description:
// Get the starting location of the hyperstreamline in the cell coordinate
// system. Returns the cell that the starting point is in.
vtkIdType GetStartLocation(int& subId, double pcoords[3]);
// Description:
// Specify the start of the hyperstreamline in the global coordinate system.
// Starting from position implies that a search must be performed to find
// initial cell to start integration from.
void SetStartPosition(double x[3]);
// Description:
// Specify the start of the hyperstreamline in the global coordinate system.
// Starting from position implies that a search must be performed to find
// initial cell to start integration from.
void SetStartPosition(double x, double y, double z);
// Description:
// Get the start position of the hyperstreamline in global x-y-z coordinates.
double *GetStartPosition();
// Description:
// Set / get the maximum length of the hyperstreamline expressed as absolute
// distance (i.e., arc length) value.
vtkSetClampMacro(MaximumPropagationDistance,double,0.0,VTK_DOUBLE_MAX);
vtkGetMacro(MaximumPropagationDistance,double);
// Description:
// Set / get the eigenvector field through which to ingrate. It is
// possible to integrate using the major, medium or minor
// eigenvector field. The major eigenvector is the eigenvector
// whose corresponding eigenvalue is closest to positive infinity.
// The minor eigenvector is the eigenvector whose corresponding
// eigenvalue is closest to negative infinity. The medium
// eigenvector is the eigenvector whose corresponding eigenvalue is
// between the major and minor eigenvalues.
vtkSetClampMacro(IntegrationEigenvector,int,
VTK_INTEGRATE_MAJOR_EIGENVECTOR,
VTK_INTEGRATE_MINOR_EIGENVECTOR);
vtkGetMacro(IntegrationEigenvector,int);
void SetIntegrationEigenvectorToMajor()
{this->SetIntegrationEigenvector(VTK_INTEGRATE_MAJOR_EIGENVECTOR);};
void SetIntegrationEigenvectorToMedium()
{this->SetIntegrationEigenvector(VTK_INTEGRATE_MEDIUM_EIGENVECTOR);};
void SetIntegrationEigenvectorToMinor()
{this->SetIntegrationEigenvector(VTK_INTEGRATE_MINOR_EIGENVECTOR);};
// Description:
// Use the major eigenvector field as the vector field through which
// to integrate. The major eigenvector is the eigenvector whose
// corresponding eigenvalue is closest to positive infinity.
void IntegrateMajorEigenvector()
{this->SetIntegrationEigenvectorToMajor();};
// Description:
// Use the medium eigenvector field as the vector field through which
// to integrate. The medium eigenvector is the eigenvector whose
// corresponding eigenvalue is between the major and minor
// eigenvalues.
void IntegrateMediumEigenvector()
{this->SetIntegrationEigenvectorToMedium();};
// Description:
// Use the minor eigenvector field as the vector field through which
// to integrate. The minor eigenvector is the eigenvector whose
// corresponding eigenvalue is closest to negative infinity.
void IntegrateMinorEigenvector()
{this->SetIntegrationEigenvectorToMinor();};
// Description:
// Set / get a nominal integration step size (expressed as a fraction of
// the size of each cell).
vtkSetClampMacro(IntegrationStepLength,double,0.001,0.5);
vtkGetMacro(IntegrationStepLength,double);
// Description:
// Set / get the length of a tube segment composing the
// hyperstreamline. The length is specified as a fraction of the
// diagonal length of the input bounding box.
vtkSetClampMacro(StepLength,double,0.000001,1.0);
vtkGetMacro(StepLength,double);
// Description:
// Specify the direction in which to integrate the hyperstreamline.
vtkSetClampMacro(IntegrationDirection,int,
VTK_INTEGRATE_FORWARD,VTK_INTEGRATE_BOTH_DIRECTIONS);
vtkGetMacro(IntegrationDirection,int);
void SetIntegrationDirectionToForward()
{this->SetIntegrationDirection(VTK_INTEGRATE_FORWARD);};
void SetIntegrationDirectionToBackward()
{this->SetIntegrationDirection(VTK_INTEGRATE_BACKWARD);};
void SetIntegrationDirectionToIntegrateBothDirections()
{this->SetIntegrationDirection(VTK_INTEGRATE_BOTH_DIRECTIONS);};
// Description:
// Set/get terminal eigenvalue. If major eigenvalue falls below this
// value, hyperstreamline terminates propagation.
vtkSetClampMacro(TerminalEigenvalue,double,0.0,VTK_DOUBLE_MAX);
vtkGetMacro(TerminalEigenvalue,double);
// Description:
// Set / get the number of sides for the hyperstreamlines. At a minimum,
// number of sides is 3.
vtkSetClampMacro(NumberOfSides,int,3,VTK_LARGE_INTEGER);
vtkGetMacro(NumberOfSides,int);
// Description:
// Set / get the initial tube radius. This is the maximum "elliptical"
// radius at the beginning of the tube. Radius varies based on ratio of
// eigenvalues. Note that tube section is actually elliptical and may
// become a point or line in cross section in some cases.
vtkSetClampMacro(Radius,double,0.0001,VTK_DOUBLE_MAX);
vtkGetMacro(Radius,double);
// Description:
// Turn on/off logarithmic scaling. If scaling is on, the log base 10
// of the computed eigenvalues are used to scale the cross section radii.
vtkSetMacro(LogScaling,int);
vtkGetMacro(LogScaling,int);
vtkBooleanMacro(LogScaling,int);
protected:
vtkHyperStreamline();
~vtkHyperStreamline();
// Integrate data
virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *);
int BuildTube(vtkDataSet *input, vtkPolyData *output);
virtual int FillInputPortInformation(int port, vtkInformation *info);
// Flag indicates where streamlines start from (either position or location)
int StartFrom;
// Starting from cell location
vtkIdType StartCell;
int StartSubId;
double StartPCoords[3];
// starting from global x-y-z position
double StartPosition[3];
//array of hyperstreamlines
vtkHyperArray *Streamers;
int NumberOfStreamers;
// length of hyperstreamline in absolute distance
double MaximumPropagationDistance;
// integration direction
int IntegrationDirection;
// the length (fraction of cell size) of integration steps
double IntegrationStepLength;
// the length of the tube segments composing the hyperstreamline
double StepLength;
// terminal propagation speed
double TerminalEigenvalue;
// number of sides of tube
int NumberOfSides;
// maximum radius of tube
double Radius;
// boolean controls whether scaling is clamped
int LogScaling;
// which eigenvector to use as integration vector field
int IntegrationEigenvector;
private:
vtkHyperStreamline(const vtkHyperStreamline&); // Not implemented.
void operator=(const vtkHyperStreamline&); // Not implemented.
};
#endif
|