Main Page | Directories | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

vtkHyperStreamline.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkHyperStreamline.h,v $
00005 
00006   Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
00007   All rights reserved.
00008   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
00009 
00010      This software is distributed WITHOUT ANY WARRANTY; without even
00011      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00012      PURPOSE.  See the above copyright notice for more information.
00013 
00014 =========================================================================*/
00062 #ifndef __vtkHyperStreamline_h
00063 #define __vtkHyperStreamline_h
00064 
00065 #include "vtkDataSetToPolyDataFilter.h"
00066 
00067 #define VTK_INTEGRATE_FORWARD 0
00068 #define VTK_INTEGRATE_BACKWARD 1
00069 #define VTK_INTEGRATE_BOTH_DIRECTIONS 2
00070 
00071 #define VTK_INTEGRATE_MAJOR_EIGENVECTOR 0
00072 #define VTK_INTEGRATE_MEDIUM_EIGENVECTOR 1
00073 #define VTK_INTEGRATE_MINOR_EIGENVECTOR 2
00074 
00075 
00076 class vtkHyperArray;
00077 
00078 class VTK_GRAPHICS_EXPORT vtkHyperStreamline : public vtkDataSetToPolyDataFilter
00079 {
00080 public:
00081   vtkTypeRevisionMacro(vtkHyperStreamline,vtkDataSetToPolyDataFilter);
00082   void PrintSelf(ostream& os, vtkIndent indent);
00083 
00088   static vtkHyperStreamline *New();
00089 
00093   void SetStartLocation(vtkIdType cellId, int subId, double pcoords[3]);
00094 
00096 
00099   void SetStartLocation(vtkIdType cellId, int subId, double r, double s,
00100                         double t);
00102 
00105   vtkIdType GetStartLocation(int& subId, double pcoords[3]);
00106 
00110   void SetStartPosition(double x[3]);
00111 
00115   void SetStartPosition(double x, double y, double z);
00116 
00119   double *GetStartPosition();
00120 
00122 
00124   vtkSetClampMacro(MaximumPropagationDistance,double,0.0,VTK_DOUBLE_MAX);
00125   vtkGetMacro(MaximumPropagationDistance,double);
00127 
00129 
00136   vtkSetClampMacro(IntegrationEigenvector,int,
00137                    VTK_INTEGRATE_MAJOR_EIGENVECTOR,
00138                    VTK_INTEGRATE_MINOR_EIGENVECTOR);
00139   vtkGetMacro(IntegrationEigenvector,int);
00140   void SetIntegrationEigenvectorToMajor()
00141     {this->SetIntegrationEigenvector(VTK_INTEGRATE_MAJOR_EIGENVECTOR);};
00142   void SetIntegrationEigenvectorToMedium()
00143     {this->SetIntegrationEigenvector(VTK_INTEGRATE_MEDIUM_EIGENVECTOR);};
00144   void SetIntegrationEigenvectorToMinor()
00145     {this->SetIntegrationEigenvector(VTK_INTEGRATE_MINOR_EIGENVECTOR);};
00147 
00149 
00152   void IntegrateMajorEigenvector()
00153     {this->SetIntegrationEigenvectorToMajor();};
00155 
00157 
00160   void IntegrateMediumEigenvector()
00161     {this->SetIntegrationEigenvectorToMedium();};
00163 
00165 
00168   void IntegrateMinorEigenvector()
00169     {this->SetIntegrationEigenvectorToMinor();};
00171 
00173 
00175   vtkSetClampMacro(IntegrationStepLength,double,0.001,0.5);
00176   vtkGetMacro(IntegrationStepLength,double);
00178 
00180 
00183   vtkSetClampMacro(StepLength,double,0.000001,1.0);
00184   vtkGetMacro(StepLength,double);
00186 
00188 
00189   vtkSetClampMacro(IntegrationDirection,int,
00190                   VTK_INTEGRATE_FORWARD,VTK_INTEGRATE_BOTH_DIRECTIONS);
00191   vtkGetMacro(IntegrationDirection,int);
00192   void SetIntegrationDirectionToForward()
00193     {this->SetIntegrationDirection(VTK_INTEGRATE_FORWARD);};
00194   void SetIntegrationDirectionToBackward()
00195     {this->SetIntegrationDirection(VTK_INTEGRATE_BACKWARD);};
00196   void SetIntegrationDirectionToIntegrateBothDirections()
00197     {this->SetIntegrationDirection(VTK_INTEGRATE_BOTH_DIRECTIONS);};
00199 
00201 
00203   vtkSetClampMacro(TerminalEigenvalue,double,0.0,VTK_DOUBLE_MAX);
00204   vtkGetMacro(TerminalEigenvalue,double);
00206 
00208 
00210   vtkSetClampMacro(NumberOfSides,int,3,VTK_LARGE_INTEGER);
00211   vtkGetMacro(NumberOfSides,int);
00213 
00215 
00219   vtkSetClampMacro(Radius,double,0.0001,VTK_DOUBLE_MAX);
00220   vtkGetMacro(Radius,double);
00222 
00224 
00226   vtkSetMacro(LogScaling,int);
00227   vtkGetMacro(LogScaling,int);
00228   vtkBooleanMacro(LogScaling,int);
00230 
00231 protected:
00232   vtkHyperStreamline();
00233   ~vtkHyperStreamline();
00234 
00235   // Integrate data
00236   void Execute();
00237   void BuildTube();
00238 
00239   // Flag indicates where streamlines start from (either position or location)
00240   int StartFrom;
00241 
00242   // Starting from cell location
00243   vtkIdType StartCell;
00244   int StartSubId;
00245   double StartPCoords[3];
00246 
00247   // starting from global x-y-z position
00248   double StartPosition[3];
00249 
00250   //array of hyperstreamlines
00251   vtkHyperArray *Streamers;
00252   int NumberOfStreamers;
00253 
00254   // length of hyperstreamline in absolute distance
00255   double MaximumPropagationDistance;
00256 
00257   // integration direction
00258   int IntegrationDirection;
00259 
00260   // the length (fraction of cell size) of integration steps
00261   double IntegrationStepLength;
00262 
00263   // the length of the tube segments composing the hyperstreamline
00264   double StepLength;
00265 
00266   // terminal propagation speed
00267   double TerminalEigenvalue;
00268 
00269   // number of sides of tube
00270   int NumberOfSides;
00271 
00272   // maximum radius of tube
00273   double Radius;
00274 
00275   // boolean controls whether scaling is clamped
00276   int LogScaling;
00277 
00278   // which eigenvector to use as integration vector field
00279   int IntegrationEigenvector;
00280 private:
00281   vtkHyperStreamline(const vtkHyperStreamline&);  // Not implemented.
00282   void operator=(const vtkHyperStreamline&);  // Not implemented.
00283 };
00284 
00285 #endif
00286 
00287