VTK  9.2.6
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 =========================================================================*/
87 #ifndef vtkTensorGlyph_h
88 #define vtkTensorGlyph_h
89 
90 #include "vtkFiltersCoreModule.h" // For export macro
91 #include "vtkPolyDataAlgorithm.h"
92 
93 class VTKFILTERSCORE_EXPORT vtkTensorGlyph : public vtkPolyDataAlgorithm
94 {
95 public:
97 
103  static vtkTensorGlyph* New();
105  void PrintSelf(ostream& os, vtkIndent indent) override;
107 
109 
115  void SetSourceData(vtkPolyData* source);
116  vtkPolyData* GetSource();
118 
120 
125  void SetSourceConnection(int id, vtkAlgorithmOutput* algOutput);
127  {
128  this->SetSourceConnection(0, algOutput);
129  }
131 
133 
136  vtkSetMacro(Scaling, vtkTypeBool);
137  vtkGetMacro(Scaling, vtkTypeBool);
138  vtkBooleanMacro(Scaling, vtkTypeBool);
140 
142 
146  vtkSetMacro(ScaleFactor, double);
147  vtkGetMacro(ScaleFactor, double);
149 
151 
154  vtkSetMacro(ThreeGlyphs, vtkTypeBool);
155  vtkGetMacro(ThreeGlyphs, vtkTypeBool);
156  vtkBooleanMacro(ThreeGlyphs, vtkTypeBool);
158 
160 
163  vtkSetMacro(Symmetric, vtkTypeBool);
164  vtkGetMacro(Symmetric, vtkTypeBool);
165  vtkBooleanMacro(Symmetric, vtkTypeBool);
167 
169 
173  vtkSetMacro(Length, double);
174  vtkGetMacro(Length, double);
176 
178 
181  vtkSetMacro(ExtractEigenvalues, vtkTypeBool);
182  vtkBooleanMacro(ExtractEigenvalues, vtkTypeBool);
183  vtkGetMacro(ExtractEigenvalues, vtkTypeBool);
185 
187 
192  vtkSetMacro(ColorGlyphs, vtkTypeBool);
193  vtkGetMacro(ColorGlyphs, vtkTypeBool);
194  vtkBooleanMacro(ColorGlyphs, vtkTypeBool);
196 
197  enum
198  {
200  COLOR_BY_EIGENVALUES
201  };
202 
204 
214  vtkSetClampMacro(ColorMode, int, COLOR_BY_SCALARS, COLOR_BY_EIGENVALUES);
215  vtkGetMacro(ColorMode, int);
216  void SetColorModeToScalars() { this->SetColorMode(COLOR_BY_SCALARS); }
217  void SetColorModeToEigenvalues() { this->SetColorMode(COLOR_BY_EIGENVALUES); }
219 
221 
226  vtkSetMacro(ClampScaling, vtkTypeBool);
227  vtkGetMacro(ClampScaling, vtkTypeBool);
228  vtkBooleanMacro(ClampScaling, vtkTypeBool);
230 
232 
238  vtkSetMacro(MaxScaleFactor, double);
239  vtkGetMacro(MaxScaleFactor, double);
241 
242 protected:
243  vtkTensorGlyph();
244  ~vtkTensorGlyph() override;
245 
248  int FillInputPortInformation(int port, vtkInformation* info) override;
249 
250  vtkTypeBool Scaling; // Determine whether scaling of geometry is performed
251  double ScaleFactor; // Scale factor to use to scale geometry
252  vtkTypeBool ExtractEigenvalues; // Boolean controls eigenfunction extraction
253  vtkTypeBool ColorGlyphs; // Boolean controls coloring with input scalar data
254  int ColorMode; // The coloring mode to use for the glyphs.
255  vtkTypeBool ClampScaling; // Boolean controls whether scaling is clamped.
256  double MaxScaleFactor; // Maximum scale factor (ScaleFactor*eigenvalue)
257  vtkTypeBool ThreeGlyphs; // Boolean controls drawing 1 or 3 glyphs
258  vtkTypeBool Symmetric; // Boolean controls drawing a "mirror" of each glyph
259  double Length; // Distance, in x, from the origin to the end of the glyph
260 private:
261  vtkTensorGlyph(const vtkTensorGlyph&) = delete;
262  void operator=(const vtkTensorGlyph&) = delete;
263 };
264 
265 #endif
Store vtkAlgorithm input/output information.
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called by the superclass.
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:90
vtkTypeBool ColorGlyphs
vtkTypeBool Scaling
vtkTypeBool ExtractEigenvalues
Proxy object to connect input/output ports.
void SetColorModeToScalars()
Set the color mode to be used for the glyphs.
static vtkPolyDataAlgorithm * New()
int vtkTypeBool
Definition: vtkABI.h:69
virtual int RequestUpdateExtent(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
This is called by the superclass.
vtkTypeBool ThreeGlyphs
void SetSourceConnection(vtkAlgorithmOutput *algOutput)
Specify a source object at a specified table location.
Superclass for algorithms that produce only polydata as output.
vtkTypeBool ClampScaling
a simple class to control print indentation
Definition: vtkIndent.h:39
vtkTypeBool Symmetric
boost::graph_traits< vtkGraph * >::vertex_descriptor source(boost::graph_traits< vtkGraph * >::edge_descriptor e, vtkGraph *)
void SetColorModeToEigenvalues()
Set the color mode to be used for the glyphs.
scale and orient glyph(s) according to eigenvalues and eigenvectors of symmetrical part of tensor ...
int FillInputPortInformation(int port, vtkInformation *info) override
Fill the input port information objects for this algorithm.
Store zero or more vtkInformation instances.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.