VTK
vtkTensorGlyph.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkTensorGlyph.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
81 #ifndef __vtkTensorGlyph_h
82 #define __vtkTensorGlyph_h
83 
84 #include "vtkPolyDataAlgorithm.h"
85 
87 {
88 public:
90  void PrintSelf(ostream& os, vtkIndent indent);
91 
95  static vtkTensorGlyph *New();
96 
98 
100  void SetSource(vtkPolyData *source);
101  vtkPolyData *GetSource();
103 
105 
108  void SetSourceConnection(int id, vtkAlgorithmOutput* algOutput);
109  void SetSourceConnection(vtkAlgorithmOutput* algOutput)
110  {
111  this->SetSourceConnection(0, algOutput);
112  }
114 
116 
117  vtkSetMacro(Scaling,int);
118  vtkGetMacro(Scaling,int);
119  vtkBooleanMacro(Scaling,int);
121 
123 
125  vtkSetMacro(ScaleFactor,double);
126  vtkGetMacro(ScaleFactor,double);
128 
130 
131  vtkSetMacro(ThreeGlyphs,int);
132  vtkGetMacro(ThreeGlyphs,int);
133  vtkBooleanMacro(ThreeGlyphs,int);
135 
137 
138  vtkSetMacro(Symmetric,int);
139  vtkGetMacro(Symmetric,int);
140  vtkBooleanMacro(Symmetric,int);
142 
144 
146  vtkSetMacro(Length,double);
147  vtkGetMacro(Length,double);
149 
151 
152  vtkSetMacro(ExtractEigenvalues,int);
153  vtkBooleanMacro(ExtractEigenvalues,int);
154  vtkGetMacro(ExtractEigenvalues,int);
156 
158 
161  vtkSetMacro(ColorGlyphs,int);
162  vtkGetMacro(ColorGlyphs,int);
163  vtkBooleanMacro(ColorGlyphs,int);
165 
166 //BTX
167  enum
168  {
170  COLOR_BY_EIGENVALUES
171  };
172 //ETX
173 
175 
182  vtkSetClampMacro(ColorMode, int, COLOR_BY_SCALARS, COLOR_BY_EIGENVALUES);
183  vtkGetMacro(ColorMode, int);
184  void SetColorModeToScalars()
185  {this->SetColorMode(COLOR_BY_SCALARS);};
186  void SetColorModeToEigenvalues()
187  {this->SetColorMode(COLOR_BY_EIGENVALUES);};
189 
191 
194  vtkSetMacro(ClampScaling,int);
195  vtkGetMacro(ClampScaling,int);
196  vtkBooleanMacro(ClampScaling,int);
198 
200 
204  vtkSetMacro(MaxScaleFactor,double);
205  vtkGetMacro(MaxScaleFactor,double);
207 
208 protected:
209  vtkTensorGlyph();
210  ~vtkTensorGlyph();
211 
215 
216  int Scaling; // Determine whether scaling of geometry is performed
217  double ScaleFactor; // Scale factor to use to scale geometry
218  int ExtractEigenvalues; // Boolean controls eigenfunction extraction
219  int ColorGlyphs; // Boolean controls coloring with input scalar data
220  int ColorMode; // The coloring mode to use for the glyphs.
221  int ClampScaling; // Boolean controls whether scaling is clamped.
222  double MaxScaleFactor; // Maximum scale factor (ScaleFactor*eigenvalue)
223  int ThreeGlyphs; // Boolean controls drawing 1 or 3 glyphs
224  int Symmetric; // Boolean controls drawing a "mirror" of each glyph
225  double Length; // Distance, in x, from the origin to the end of the glyph
226 private:
227  vtkTensorGlyph(const vtkTensorGlyph&); // Not implemented.
228  void operator=(const vtkTensorGlyph&); // Not implemented.
229 };
230 
231 #endif