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 "vtkFiltersCoreModule.h" // For export macro
85 #include "vtkPolyDataAlgorithm.h"
86 
88 {
89 public:
91  void PrintSelf(ostream& os, vtkIndent indent);
92 
96  static vtkTensorGlyph *New();
97 
99 
103  void SetSourceData(vtkPolyData *source);
104  vtkPolyData *GetSource();
106 
108 
111  void SetSourceConnection(int id, vtkAlgorithmOutput* algOutput);
113  {
114  this->SetSourceConnection(0, algOutput);
115  }
117 
119 
120  vtkSetMacro(Scaling,int);
121  vtkGetMacro(Scaling,int);
122  vtkBooleanMacro(Scaling,int);
124 
126 
128  vtkSetMacro(ScaleFactor,double);
129  vtkGetMacro(ScaleFactor,double);
131 
133 
134  vtkSetMacro(ThreeGlyphs,int);
135  vtkGetMacro(ThreeGlyphs,int);
136  vtkBooleanMacro(ThreeGlyphs,int);
138 
140 
141  vtkSetMacro(Symmetric,int);
142  vtkGetMacro(Symmetric,int);
143  vtkBooleanMacro(Symmetric,int);
145 
147 
149  vtkSetMacro(Length,double);
150  vtkGetMacro(Length,double);
152 
154 
155  vtkSetMacro(ExtractEigenvalues,int);
156  vtkBooleanMacro(ExtractEigenvalues,int);
157  vtkGetMacro(ExtractEigenvalues,int);
159 
161 
164  vtkSetMacro(ColorGlyphs,int);
165  vtkGetMacro(ColorGlyphs,int);
166  vtkBooleanMacro(ColorGlyphs,int);
168 
169 //BTX
170  enum
171  {
173  COLOR_BY_EIGENVALUES
174  };
175 //ETX
176 
178 
185  vtkSetClampMacro(ColorMode, int, COLOR_BY_SCALARS, COLOR_BY_EIGENVALUES);
186  vtkGetMacro(ColorMode, int);
188  {this->SetColorMode(COLOR_BY_SCALARS);};
190  {this->SetColorMode(COLOR_BY_EIGENVALUES);};
192 
194 
197  vtkSetMacro(ClampScaling,int);
198  vtkGetMacro(ClampScaling,int);
199  vtkBooleanMacro(ClampScaling,int);
201 
203 
207  vtkSetMacro(MaxScaleFactor,double);
208  vtkGetMacro(MaxScaleFactor,double);
210 
211 protected:
212  vtkTensorGlyph();
213  ~vtkTensorGlyph();
214 
218 
219  int Scaling; // Determine whether scaling of geometry is performed
220  double ScaleFactor; // Scale factor to use to scale geometry
221  int ExtractEigenvalues; // Boolean controls eigenfunction extraction
222  int ColorGlyphs; // Boolean controls coloring with input scalar data
223  int ColorMode; // The coloring mode to use for the glyphs.
224  int ClampScaling; // Boolean controls whether scaling is clamped.
225  double MaxScaleFactor; // Maximum scale factor (ScaleFactor*eigenvalue)
226  int ThreeGlyphs; // Boolean controls drawing 1 or 3 glyphs
227  int Symmetric; // Boolean controls drawing a "mirror" of each glyph
228  double Length; // Distance, in x, from the origin to the end of the glyph
229 private:
230  vtkTensorGlyph(const vtkTensorGlyph&); // Not implemented.
231  void operator=(const vtkTensorGlyph&); // Not implemented.
232 };
233 
234 #endif
virtual int FillInputPortInformation(int port, vtkInformation *info)
Store vtkAlgorithm input/output information.
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
#define VTKFILTERSCORE_EXPORT
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:83
Proxy object to connect input/output ports.
void SetColorModeToScalars()
static vtkPolyDataAlgorithm * New()
void PrintSelf(ostream &os, vtkIndent indent)
virtual int RequestUpdateExtent(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
void SetSourceConnection(vtkAlgorithmOutput *algOutput)
Superclass for algorithms that produce only polydata as output.
a simple class to control print indentation
Definition: vtkIndent.h:38
boost::graph_traits< vtkGraph * >::vertex_descriptor source(boost::graph_traits< vtkGraph * >::edge_descriptor e, vtkGraph *)
void SetColorModeToEigenvalues()
scale and orient glyph(s) according to tensor eigenvalues and eigenvectors
Store zero or more vtkInformation instances.