VTK
|
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 "vtkFiltersCoreModule.h" // For export macro 00085 #include "vtkPolyDataAlgorithm.h" 00086 00087 class VTKFILTERSCORE_EXPORT vtkTensorGlyph : public vtkPolyDataAlgorithm 00088 { 00089 public: 00090 vtkTypeMacro(vtkTensorGlyph,vtkPolyDataAlgorithm); 00091 void PrintSelf(ostream& os, vtkIndent indent); 00092 00096 static vtkTensorGlyph *New(); 00097 00099 00103 void SetSourceData(vtkPolyData *source); 00104 vtkPolyData *GetSource(); 00106 00108 00111 void SetSourceConnection(int id, vtkAlgorithmOutput* algOutput); 00112 void SetSourceConnection(vtkAlgorithmOutput* algOutput) 00113 { 00114 this->SetSourceConnection(0, algOutput); 00115 } 00117 00119 00120 vtkSetMacro(Scaling,int); 00121 vtkGetMacro(Scaling,int); 00122 vtkBooleanMacro(Scaling,int); 00124 00126 00128 vtkSetMacro(ScaleFactor,double); 00129 vtkGetMacro(ScaleFactor,double); 00131 00133 00134 vtkSetMacro(ThreeGlyphs,int); 00135 vtkGetMacro(ThreeGlyphs,int); 00136 vtkBooleanMacro(ThreeGlyphs,int); 00138 00140 00141 vtkSetMacro(Symmetric,int); 00142 vtkGetMacro(Symmetric,int); 00143 vtkBooleanMacro(Symmetric,int); 00145 00147 00149 vtkSetMacro(Length,double); 00150 vtkGetMacro(Length,double); 00152 00154 00155 vtkSetMacro(ExtractEigenvalues,int); 00156 vtkBooleanMacro(ExtractEigenvalues,int); 00157 vtkGetMacro(ExtractEigenvalues,int); 00159 00161 00164 vtkSetMacro(ColorGlyphs,int); 00165 vtkGetMacro(ColorGlyphs,int); 00166 vtkBooleanMacro(ColorGlyphs,int); 00168 00169 //BTX 00170 enum 00171 { 00172 COLOR_BY_SCALARS, 00173 COLOR_BY_EIGENVALUES 00174 }; 00175 //ETX 00176 00178 00185 vtkSetClampMacro(ColorMode, int, COLOR_BY_SCALARS, COLOR_BY_EIGENVALUES); 00186 vtkGetMacro(ColorMode, int); 00187 void SetColorModeToScalars() 00188 {this->SetColorMode(COLOR_BY_SCALARS);}; 00189 void SetColorModeToEigenvalues() 00190 {this->SetColorMode(COLOR_BY_EIGENVALUES);}; 00192 00194 00197 vtkSetMacro(ClampScaling,int); 00198 vtkGetMacro(ClampScaling,int); 00199 vtkBooleanMacro(ClampScaling,int); 00201 00203 00207 vtkSetMacro(MaxScaleFactor,double); 00208 vtkGetMacro(MaxScaleFactor,double); 00210 00211 protected: 00212 vtkTensorGlyph(); 00213 ~vtkTensorGlyph(); 00214 00215 virtual int RequestUpdateExtent(vtkInformation *, vtkInformationVector **, vtkInformationVector *); 00216 virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *); 00217 virtual int FillInputPortInformation(int port, vtkInformation *info); 00218 00219 int Scaling; // Determine whether scaling of geometry is performed 00220 double ScaleFactor; // Scale factor to use to scale geometry 00221 int ExtractEigenvalues; // Boolean controls eigenfunction extraction 00222 int ColorGlyphs; // Boolean controls coloring with input scalar data 00223 int ColorMode; // The coloring mode to use for the glyphs. 00224 int ClampScaling; // Boolean controls whether scaling is clamped. 00225 double MaxScaleFactor; // Maximum scale factor (ScaleFactor*eigenvalue) 00226 int ThreeGlyphs; // Boolean controls drawing 1 or 3 glyphs 00227 int Symmetric; // Boolean controls drawing a "mirror" of each glyph 00228 double Length; // Distance, in x, from the origin to the end of the glyph 00229 private: 00230 vtkTensorGlyph(const vtkTensorGlyph&); // Not implemented. 00231 void operator=(const vtkTensorGlyph&); // Not implemented. 00232 }; 00233 00234 #endif