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 
00008 Copyright (c) 1993-2001 Ken Martin, Will Schroeder, Bill Lorensen 
00009 All rights reserved.
00010 
00011 Redistribution and use in source and binary forms, with or without
00012 modification, are permitted provided that the following conditions are met:
00013 
00014  * Redistributions of source code must retain the above copyright notice,
00015    this list of conditions and the following disclaimer.
00016 
00017  * Redistributions in binary form must reproduce the above copyright notice,
00018    this list of conditions and the following disclaimer in the documentation
00019    and/or other materials provided with the distribution.
00020 
00021  * Neither name of Ken Martin, Will Schroeder, or Bill Lorensen nor the names
00022    of any contributors may be used to endorse or promote products derived
00023    from this software without specific prior written permission.
00024 
00025  * Modified source versions must be plainly marked as such, and must not be
00026    misrepresented as being the original software.
00027 
00028 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
00029 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00030 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00031 ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
00032 ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
00033 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
00034 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00035 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
00036 OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
00037 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00038 
00039 =========================================================================*/
00077 #ifndef __vtkHyperStreamline_h
00078 #define __vtkHyperStreamline_h
00079 
00080 #include "vtkDataSetToPolyDataFilter.h"
00081 
00082 #define VTK_INTEGRATE_FORWARD 0
00083 #define VTK_INTEGRATE_BACKWARD 1
00084 #define VTK_INTEGRATE_BOTH_DIRECTIONS 2
00085 
00086 class vtkHyperArray;
00087 
00088 class VTK_EXPORT vtkHyperStreamline : public vtkDataSetToPolyDataFilter
00089 {
00090 public:
00091   vtkTypeMacro(vtkHyperStreamline,vtkDataSetToPolyDataFilter);
00092   void PrintSelf(ostream& os, vtkIndent indent);
00093 
00098   static vtkHyperStreamline *New();
00099 
00103   void SetStartLocation(int cellId, int subId, float pcoords[3]);
00104 
00108   void SetStartLocation(int cellId, int subId, float r, float s, float t);
00109 
00112   int GetStartLocation(int& subId, float pcoords[3]);
00113 
00117   void SetStartPosition(float x[3]);
00118 
00122   void SetStartPosition(float x, float y, float z);
00123 
00126   float *GetStartPosition();
00127 
00130   vtkSetClampMacro(MaximumPropagationDistance,float,0.0,VTK_LARGE_FLOAT);
00131   vtkGetMacro(MaximumPropagationDistance,float);
00132 
00136   void IntegrateMajorEigenvector();
00137 
00141   void IntegrateMediumEigenvector();
00142 
00146   void IntegrateMinorEigenvector();
00147 
00150   vtkSetClampMacro(IntegrationStepLength,float,0.001,0.5);
00151   vtkGetMacro(IntegrationStepLength,float);
00152 
00156   vtkSetClampMacro(StepLength,float,0.000001,1.0);
00157   vtkGetMacro(StepLength,float);
00158 
00160   vtkSetClampMacro(IntegrationDirection,int,
00161                   VTK_INTEGRATE_FORWARD,VTK_INTEGRATE_BOTH_DIRECTIONS);
00162   vtkGetMacro(IntegrationDirection,int);
00163   void SetIntegrationDirectionToForward()
00164     {this->SetIntegrationDirection(VTK_INTEGRATE_FORWARD);};
00165   void SetIntegrationDirectionToBackward()
00166     {this->SetIntegrationDirection(VTK_INTEGRATE_BACKWARD);};
00167   void SetIntegrationDirectionToIntegrateBothDirections()
00168     {this->SetIntegrationDirection(VTK_INTEGRATE_BOTH_DIRECTIONS);};
00169 
00172   vtkSetClampMacro(TerminalEigenvalue,float,0.0,VTK_LARGE_FLOAT);
00173   vtkGetMacro(TerminalEigenvalue,float);
00174 
00177   vtkSetClampMacro(NumberOfSides,int,3,VTK_LARGE_INTEGER);
00178   vtkGetMacro(NumberOfSides,int);
00179 
00184   vtkSetClampMacro(Radius,float,0.0001,VTK_LARGE_FLOAT);
00185   vtkGetMacro(Radius,float);
00186 
00189   vtkSetMacro(LogScaling,int);
00190   vtkGetMacro(LogScaling,int);
00191   vtkBooleanMacro(LogScaling,int);
00192 
00193 protected:
00194   vtkHyperStreamline();
00195   ~vtkHyperStreamline();
00196   vtkHyperStreamline(const vtkHyperStreamline&) {};
00197   void operator=(const vtkHyperStreamline&) {};
00198 
00199   // Integrate data
00200   void Execute();
00201   void BuildTube();
00202 
00203   // Flag indicates where streamlines start from (either position or location)
00204   int StartFrom;
00205 
00206   // Starting from cell location
00207   int StartCell;
00208   int StartSubId;
00209   float StartPCoords[3];
00210 
00211   // starting from global x-y-z position
00212   float StartPosition[3];
00213 
00214   //array of hyperstreamlines
00215   vtkHyperArray *Streamers;
00216   int NumberOfStreamers;
00217 
00218   // length of hyperstreamline in absolute distance
00219   float MaximumPropagationDistance;
00220 
00221   // integration direction
00222   int IntegrationDirection;
00223 
00224   // the length (fraction of cell size) of integration steps
00225   float IntegrationStepLength;
00226 
00227   // the length of the tube segments composing the hyperstreamline
00228   float StepLength;
00229 
00230   // terminal propagation speed
00231   float TerminalEigenvalue;
00232 
00233   // number of sides of tube
00234   int NumberOfSides;
00235 
00236   // maximum radius of tube
00237   float Radius;
00238 
00239   // boolean controls whether scaling is clamped
00240   int LogScaling;
00241 
00242   // which eigenvector to use as integration vector field
00243   int IntegrationEigenvector;
00244 };
00245 
00246 #endif
00247 
00248 

Generated on Wed Nov 21 12:26:59 2001 for VTK by doxygen1.2.11.1 written by Dimitri van Heesch, © 1997-2001