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 00101 void SetSourceData(vtkPolyData *source); 00102 vtkPolyData *GetSource(); 00104 00106 00109 void SetSourceConnection(int id, vtkAlgorithmOutput* algOutput); 00110 void SetSourceConnection(vtkAlgorithmOutput* algOutput) 00111 { 00112 this->SetSourceConnection(0, algOutput); 00113 } 00115 00117 00118 vtkSetMacro(Scaling,int); 00119 vtkGetMacro(Scaling,int); 00120 vtkBooleanMacro(Scaling,int); 00122 00124 00126 vtkSetMacro(ScaleFactor,double); 00127 vtkGetMacro(ScaleFactor,double); 00129 00131 00132 vtkSetMacro(ThreeGlyphs,int); 00133 vtkGetMacro(ThreeGlyphs,int); 00134 vtkBooleanMacro(ThreeGlyphs,int); 00136 00138 00139 vtkSetMacro(Symmetric,int); 00140 vtkGetMacro(Symmetric,int); 00141 vtkBooleanMacro(Symmetric,int); 00143 00145 00147 vtkSetMacro(Length,double); 00148 vtkGetMacro(Length,double); 00150 00152 00153 vtkSetMacro(ExtractEigenvalues,int); 00154 vtkBooleanMacro(ExtractEigenvalues,int); 00155 vtkGetMacro(ExtractEigenvalues,int); 00157 00159 00162 vtkSetMacro(ColorGlyphs,int); 00163 vtkGetMacro(ColorGlyphs,int); 00164 vtkBooleanMacro(ColorGlyphs,int); 00166 00167 //BTX 00168 enum 00169 { 00170 COLOR_BY_SCALARS, 00171 COLOR_BY_EIGENVALUES 00172 }; 00173 //ETX 00174 00176 00183 vtkSetClampMacro(ColorMode, int, COLOR_BY_SCALARS, COLOR_BY_EIGENVALUES); 00184 vtkGetMacro(ColorMode, int); 00185 void SetColorModeToScalars() 00186 {this->SetColorMode(COLOR_BY_SCALARS);}; 00187 void SetColorModeToEigenvalues() 00188 {this->SetColorMode(COLOR_BY_EIGENVALUES);}; 00190 00192 00195 vtkSetMacro(ClampScaling,int); 00196 vtkGetMacro(ClampScaling,int); 00197 vtkBooleanMacro(ClampScaling,int); 00199 00201 00205 vtkSetMacro(MaxScaleFactor,double); 00206 vtkGetMacro(MaxScaleFactor,double); 00208 00209 protected: 00210 vtkTensorGlyph(); 00211 ~vtkTensorGlyph(); 00212 00213 virtual int RequestUpdateExtent(vtkInformation *, vtkInformationVector **, vtkInformationVector *); 00214 virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *); 00215 virtual int FillInputPortInformation(int port, vtkInformation *info); 00216 00217 int Scaling; // Determine whether scaling of geometry is performed 00218 double ScaleFactor; // Scale factor to use to scale geometry 00219 int ExtractEigenvalues; // Boolean controls eigenfunction extraction 00220 int ColorGlyphs; // Boolean controls coloring with input scalar data 00221 int ColorMode; // The coloring mode to use for the glyphs. 00222 int ClampScaling; // Boolean controls whether scaling is clamped. 00223 double MaxScaleFactor; // Maximum scale factor (ScaleFactor*eigenvalue) 00224 int ThreeGlyphs; // Boolean controls drawing 1 or 3 glyphs 00225 int Symmetric; // Boolean controls drawing a "mirror" of each glyph 00226 double Length; // Distance, in x, from the origin to the end of the glyph 00227 private: 00228 vtkTensorGlyph(const vtkTensorGlyph&); // Not implemented. 00229 void operator=(const vtkTensorGlyph&); // Not implemented. 00230 }; 00231 00232 #endif