Main Page Class Hierarchy Alphabetical List Compound List File List Compound Members File Members Related Pages

# Graphics/vtkHyperStreamline.h

Go to the documentation of this file.

    00001 /*=========================================================================
    00002
    00003   Program:   Visualization Toolkit
    00004   Module:    $RCSfile: vtkHyperStreamline.h,v $
    00005   Language:  C++
    00006
    00007   Copyright (c) 1993-2002 Ken Martin, Will Schroeder, Bill Lorensen
    00008   All rights reserved.
    00009   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
    00010
    00011      This software is distributed WITHOUT ANY WARRANTY; without even
    00012      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
    00013      PURPOSE.  See the above copyright notice for more information.
    00014
    00015 =========================================================================*/
    00066 #ifndef __vtkHyperStreamline_h
    00067 #define __vtkHyperStreamline_h
    00068
    00069 #include "vtkDataSetToPolyDataFilter.h"
    00070
    00071 #define VTK_INTEGRATE_FORWARD 0
    00072 #define VTK_INTEGRATE_BACKWARD 1
    00073 #define VTK_INTEGRATE_BOTH_DIRECTIONS 2
    00074
    00075 #define VTK_INTEGRATE_MAJOR_EIGENVECTOR 0
    00076 #define VTK_INTEGRATE_MEDIUM_EIGENVECTOR 1
    00077 #define VTK_INTEGRATE_MINOR_EIGENVECTOR 2
    00078
    00079
    00080 class vtkHyperArray;
    00081
    00082 class VTK_GRAPHICS_EXPORT vtkHyperStreamline : public vtkDataSetToPolyDataFilter
    00083 {
    00084 public:
    00085   vtkTypeRevisionMacro(vtkHyperStreamline,vtkDataSetToPolyDataFilter);
    00086   void PrintSelf(ostream& os, vtkIndent indent);
    00087
    00092   static vtkHyperStreamline *New();
    00093
    00097   void SetStartLocation(vtkIdType cellId, int subId, float pcoords[3]);
    00098
    00100
    00103   void SetStartLocation(vtkIdType cellId, int subId, float r, float s,
    00104                         float t);
    00106
    00109   vtkIdType GetStartLocation(int& subId, float pcoords[3]);
    00110
    00114   void SetStartPosition(float x[3]);
    00115
    00119   void SetStartPosition(float x, float y, float z);
    00120
    00123   float *GetStartPosition();
    00124
    00126
    00128   vtkSetClampMacro(MaximumPropagationDistance,float,0.0,VTK_LARGE_FLOAT);
    00129   vtkGetMacro(MaximumPropagationDistance,float);
    00131
    00133
    00140   vtkSetClampMacro(IntegrationEigenvector,int,
    00141                    VTK_INTEGRATE_MAJOR_EIGENVECTOR,
    00142                    VTK_INTEGRATE_MINOR_EIGENVECTOR);
    00143   vtkGetMacro(IntegrationEigenvector,int);
    00144   void SetIntegrationEigenvectorToMajor()
    00145     {this->SetIntegrationEigenvector(VTK_INTEGRATE_MAJOR_EIGENVECTOR);};
    00146   void SetIntegrationEigenvectorToMedium()
    00147     {this->SetIntegrationEigenvector(VTK_INTEGRATE_MEDIUM_EIGENVECTOR);};
    00148   void SetIntegrationEigenvectorToMinor()
    00149     {this->SetIntegrationEigenvector(VTK_INTEGRATE_MINOR_EIGENVECTOR);};
    00151
    00153
    00156   void IntegrateMajorEigenvector()
    00157     {this->SetIntegrationEigenvectorToMajor();};
    00159
    00161
    00164   void IntegrateMediumEigenvector()
    00165     {this->SetIntegrationEigenvectorToMedium();};
    00167
    00169
    00172   void IntegrateMinorEigenvector()
    00173     {this->SetIntegrationEigenvectorToMinor();};
    00175
    00177
    00179   vtkSetClampMacro(IntegrationStepLength,float,0.001,0.5);
    00180   vtkGetMacro(IntegrationStepLength,float);
    00182
    00184
    00187   vtkSetClampMacro(StepLength,float,0.000001,1.0);
    00188   vtkGetMacro(StepLength,float);
    00190
    00192
    00193   vtkSetClampMacro(IntegrationDirection,int,
    00194                   VTK_INTEGRATE_FORWARD,VTK_INTEGRATE_BOTH_DIRECTIONS);
    00195   vtkGetMacro(IntegrationDirection,int);
    00196   void SetIntegrationDirectionToForward()
    00197     {this->SetIntegrationDirection(VTK_INTEGRATE_FORWARD);};
    00198   void SetIntegrationDirectionToBackward()
    00199     {this->SetIntegrationDirection(VTK_INTEGRATE_BACKWARD);};
    00200   void SetIntegrationDirectionToIntegrateBothDirections()
    00201     {this->SetIntegrationDirection(VTK_INTEGRATE_BOTH_DIRECTIONS);};
    00203
    00205
    00207   vtkSetClampMacro(TerminalEigenvalue,float,0.0,VTK_LARGE_FLOAT);
    00208   vtkGetMacro(TerminalEigenvalue,float);
    00210
    00212
    00214   vtkSetClampMacro(NumberOfSides,int,3,VTK_LARGE_INTEGER);
    00215   vtkGetMacro(NumberOfSides,int);
    00217
    00219
    00223   vtkSetClampMacro(Radius,float,0.0001,VTK_LARGE_FLOAT);
    00224   vtkGetMacro(Radius,float);
    00226
    00228
    00230   vtkSetMacro(LogScaling,int);
    00231   vtkGetMacro(LogScaling,int);
    00232   vtkBooleanMacro(LogScaling,int);
    00234
    00235 protected:
    00236   vtkHyperStreamline();
    00237   ~vtkHyperStreamline();
    00238
    00239   // Integrate data
    00240   void Execute();
    00241   void BuildTube();
    00242
    00243   // Flag indicates where streamlines start from (either position or location)
    00244   int StartFrom;
    00245
    00246   // Starting from cell location
    00247   vtkIdType StartCell;
    00248   int StartSubId;
    00249   float StartPCoords[3];
    00250
    00251   // starting from global x-y-z position
    00252   float StartPosition[3];
    00253
    00254   //array of hyperstreamlines
    00255   vtkHyperArray *Streamers;
    00256   int NumberOfStreamers;
    00257
    00258   // length of hyperstreamline in absolute distance
    00259   float MaximumPropagationDistance;
    00260
    00261   // integration direction
    00262   int IntegrationDirection;
    00263
    00264   // the length (fraction of cell size) of integration steps
    00265   float IntegrationStepLength;
    00266
    00267   // the length of the tube segments composing the hyperstreamline
    00268   float StepLength;
    00269
    00270   // terminal propagation speed
    00271   float TerminalEigenvalue;
    00272
    00273   // number of sides of tube
    00274   int NumberOfSides;
    00275
    00276   // maximum radius of tube
    00277   float Radius;
    00278
    00279   // boolean controls whether scaling is clamped
    00280   int LogScaling;
    00281
    00282   // which eigenvector to use as integration vector field
    00283   int IntegrationEigenvector;
    00284 private:
    00285   vtkHyperStreamline(const vtkHyperStreamline&);  // Not implemented.
    00286   void operator=(const vtkHyperStreamline&);  // Not implemented.
    00287 };
    00288
    00289 #endif
    00290
    00291