VTK
dox/Graphics/vtkTensorGlyph.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkTensorGlyph.h
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 =========================================================================*/
00081 #ifndef __vtkTensorGlyph_h
00082 #define __vtkTensorGlyph_h
00083 
00084 #include "vtkPolyDataAlgorithm.h"
00085 
00086 class VTK_GRAPHICS_EXPORT vtkTensorGlyph : public vtkPolyDataAlgorithm
00087 {
00088 public:
00089   vtkTypeMacro(vtkTensorGlyph,vtkPolyDataAlgorithm);
00090   void PrintSelf(ostream& os, vtkIndent indent);
00091 
00095   static vtkTensorGlyph *New();
00096 
00098 
00100   void SetSource(vtkPolyData *source);
00101   vtkPolyData *GetSource();
00103 
00105 
00108   void SetSourceConnection(int id, vtkAlgorithmOutput* algOutput);
00109   void SetSourceConnection(vtkAlgorithmOutput* algOutput)
00110     {
00111       this->SetSourceConnection(0, algOutput);
00112     }
00114 
00116 
00117   vtkSetMacro(Scaling,int);
00118   vtkGetMacro(Scaling,int);
00119   vtkBooleanMacro(Scaling,int);
00121 
00123 
00125   vtkSetMacro(ScaleFactor,double);
00126   vtkGetMacro(ScaleFactor,double);
00128 
00130 
00131   vtkSetMacro(ThreeGlyphs,int);
00132   vtkGetMacro(ThreeGlyphs,int);
00133   vtkBooleanMacro(ThreeGlyphs,int);
00135 
00137 
00138   vtkSetMacro(Symmetric,int);
00139   vtkGetMacro(Symmetric,int);
00140   vtkBooleanMacro(Symmetric,int);
00142 
00144 
00146   vtkSetMacro(Length,double);
00147   vtkGetMacro(Length,double);
00149 
00151 
00152   vtkSetMacro(ExtractEigenvalues,int);
00153   vtkBooleanMacro(ExtractEigenvalues,int);
00154   vtkGetMacro(ExtractEigenvalues,int);
00156 
00158 
00161   vtkSetMacro(ColorGlyphs,int);
00162   vtkGetMacro(ColorGlyphs,int);
00163   vtkBooleanMacro(ColorGlyphs,int);
00165 
00166 //BTX
00167   enum
00168   {
00169       COLOR_BY_SCALARS,
00170       COLOR_BY_EIGENVALUES
00171   };
00172 //ETX
00173 
00175 
00182   vtkSetClampMacro(ColorMode, int, COLOR_BY_SCALARS, COLOR_BY_EIGENVALUES);
00183   vtkGetMacro(ColorMode, int);
00184   void SetColorModeToScalars()
00185     {this->SetColorMode(COLOR_BY_SCALARS);};
00186   void SetColorModeToEigenvalues()
00187     {this->SetColorMode(COLOR_BY_EIGENVALUES);};  
00189 
00191 
00194   vtkSetMacro(ClampScaling,int);
00195   vtkGetMacro(ClampScaling,int);
00196   vtkBooleanMacro(ClampScaling,int);
00198 
00200 
00204   vtkSetMacro(MaxScaleFactor,double);
00205   vtkGetMacro(MaxScaleFactor,double);
00207 
00208 protected:
00209   vtkTensorGlyph();
00210   ~vtkTensorGlyph();
00211 
00212   virtual int RequestUpdateExtent(vtkInformation *,  vtkInformationVector **, vtkInformationVector *);
00213   virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *);
00214   virtual int FillInputPortInformation(int port, vtkInformation *info);
00215 
00216   int Scaling; // Determine whether scaling of geometry is performed
00217   double ScaleFactor; // Scale factor to use to scale geometry
00218   int ExtractEigenvalues; // Boolean controls eigenfunction extraction
00219   int ColorGlyphs; // Boolean controls coloring with input scalar data
00220   int ColorMode; // The coloring mode to use for the glyphs.
00221   int ClampScaling; // Boolean controls whether scaling is clamped.
00222   double MaxScaleFactor; // Maximum scale factor (ScaleFactor*eigenvalue)
00223   int ThreeGlyphs; // Boolean controls drawing 1 or 3 glyphs
00224   int Symmetric; // Boolean controls drawing a "mirror" of each glyph
00225   double Length; // Distance, in x, from the origin to the end of the glyph
00226 private:
00227   vtkTensorGlyph(const vtkTensorGlyph&);  // Not implemented.
00228   void operator=(const vtkTensorGlyph&);  // Not implemented.
00229 };
00230 
00231 #endif