VTK  9.3.0
vtkTensorGlyph.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-License-Identifier: BSD-3-Clause
84 #ifndef vtkTensorGlyph_h
85 #define vtkTensorGlyph_h
86 
87 #include "vtkFiltersCoreModule.h" // For export macro
88 #include "vtkPolyDataAlgorithm.h"
89 
90 VTK_ABI_NAMESPACE_BEGIN
91 class VTKFILTERSCORE_EXPORT vtkTensorGlyph : public vtkPolyDataAlgorithm
92 {
93 public:
95 
101  static vtkTensorGlyph* New();
103  void PrintSelf(ostream& os, vtkIndent indent) override;
105 
107 
116 
118 
123  void SetSourceConnection(int id, vtkAlgorithmOutput* algOutput);
125  {
126  this->SetSourceConnection(0, algOutput);
127  }
129 
131 
134  vtkSetMacro(Scaling, vtkTypeBool);
135  vtkGetMacro(Scaling, vtkTypeBool);
136  vtkBooleanMacro(Scaling, vtkTypeBool);
138 
140 
144  vtkSetMacro(ScaleFactor, double);
145  vtkGetMacro(ScaleFactor, double);
147 
149 
152  vtkSetMacro(ThreeGlyphs, vtkTypeBool);
153  vtkGetMacro(ThreeGlyphs, vtkTypeBool);
154  vtkBooleanMacro(ThreeGlyphs, vtkTypeBool);
156 
158 
161  vtkSetMacro(Symmetric, vtkTypeBool);
162  vtkGetMacro(Symmetric, vtkTypeBool);
163  vtkBooleanMacro(Symmetric, vtkTypeBool);
165 
167 
171  vtkSetMacro(Length, double);
172  vtkGetMacro(Length, double);
174 
176 
179  vtkSetMacro(ExtractEigenvalues, vtkTypeBool);
180  vtkBooleanMacro(ExtractEigenvalues, vtkTypeBool);
181  vtkGetMacro(ExtractEigenvalues, vtkTypeBool);
183 
185 
190  vtkSetMacro(ColorGlyphs, vtkTypeBool);
191  vtkGetMacro(ColorGlyphs, vtkTypeBool);
192  vtkBooleanMacro(ColorGlyphs, vtkTypeBool);
194 
195  enum
196  {
198  COLOR_BY_EIGENVALUES
199  };
200 
202 
212  vtkSetClampMacro(ColorMode, int, COLOR_BY_SCALARS, COLOR_BY_EIGENVALUES);
213  vtkGetMacro(ColorMode, int);
214  void SetColorModeToScalars() { this->SetColorMode(COLOR_BY_SCALARS); }
215  void SetColorModeToEigenvalues() { this->SetColorMode(COLOR_BY_EIGENVALUES); }
217 
219 
224  vtkSetMacro(ClampScaling, vtkTypeBool);
225  vtkGetMacro(ClampScaling, vtkTypeBool);
226  vtkBooleanMacro(ClampScaling, vtkTypeBool);
228 
230 
236  vtkSetMacro(MaxScaleFactor, double);
237  vtkGetMacro(MaxScaleFactor, double);
239 
240 protected:
242  ~vtkTensorGlyph() override;
243 
247 
248  vtkTypeBool Scaling; // Determine whether scaling of geometry is performed
249  double ScaleFactor; // Scale factor to use to scale geometry
250  vtkTypeBool ExtractEigenvalues; // Boolean controls eigenfunction extraction
251  vtkTypeBool ColorGlyphs; // Boolean controls coloring with input scalar data
252  int ColorMode; // The coloring mode to use for the glyphs.
253  vtkTypeBool ClampScaling; // Boolean controls whether scaling is clamped.
254  double MaxScaleFactor; // Maximum scale factor (ScaleFactor*eigenvalue)
255  vtkTypeBool ThreeGlyphs; // Boolean controls drawing 1 or 3 glyphs
256  vtkTypeBool Symmetric; // Boolean controls drawing a "mirror" of each glyph
257  double Length; // Distance, in x, from the origin to the end of the glyph
258 private:
259  vtkTensorGlyph(const vtkTensorGlyph&) = delete;
260  void operator=(const vtkTensorGlyph&) = delete;
261 };
262 
263 VTK_ABI_NAMESPACE_END
264 #endif
Proxy object to connect input/output ports.
a simple class to control print indentation
Definition: vtkIndent.h:38
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
Superclass for algorithms that produce only polydata as output.
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:89
scale and orient glyph(s) according to eigenvalues and eigenvectors of symmetrical part of tensor
void SetSourceData(vtkPolyData *source)
Specify the geometry to copy to each point.
void SetColorModeToScalars()
Set the color mode to be used for the glyphs.
vtkPolyData * GetSource()
Specify the geometry to copy to each point.
int FillInputPortInformation(int port, vtkInformation *info) override
Fill the input port information objects for this algorithm.
void SetColorModeToEigenvalues()
Set the color mode to be used for the glyphs.
vtkTypeBool ThreeGlyphs
void SetSourceConnection(int id, vtkAlgorithmOutput *algOutput)
Specify a source object at a specified table location.
vtkTypeBool ClampScaling
vtkTypeBool ColorGlyphs
static vtkTensorGlyph * New()
Standard methods for instantiation, obtaining type information, and printing.Construct object with sc...
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
int RequestUpdateExtent(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
vtkTypeBool Scaling
vtkTypeBool Symmetric
void PrintSelf(ostream &os, vtkIndent indent) override
Standard methods for instantiation, obtaining type information, and printing.Construct object with sc...
~vtkTensorGlyph() override
void SetSourceConnection(vtkAlgorithmOutput *algOutput)
Specify a source object at a specified table location.
vtkTypeBool ExtractEigenvalues
@ info
Definition: vtkX3D.h:376
@ port
Definition: vtkX3D.h:447
int vtkTypeBool
Definition: vtkABI.h:64
boost::graph_traits< vtkGraph * >::vertex_descriptor source(boost::graph_traits< vtkGraph * >::edge_descriptor e, vtkGraph *)