VTK  9.4.20241218
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
114#ifndef vtkTensorGlyph_h
115#define vtkTensorGlyph_h
116
117#include "vtkFiltersCoreModule.h" // For export macro
118#include "vtkPolyDataAlgorithm.h"
119
120VTK_ABI_NAMESPACE_BEGIN
121class VTKFILTERSCORE_EXPORT vtkTensorGlyph : public vtkPolyDataAlgorithm
122{
123public:
125
133 void PrintSelf(ostream& os, vtkIndent indent) override;
135
137
146
148
153 void SetSourceConnection(int id, vtkAlgorithmOutput* algOutput);
155 {
156 this->SetSourceConnection(0, algOutput);
157 }
159
161
164 vtkSetMacro(Scaling, vtkTypeBool);
165 vtkGetMacro(Scaling, vtkTypeBool);
166 vtkBooleanMacro(Scaling, vtkTypeBool);
168
170
174 vtkSetMacro(ScaleFactor, double);
175 vtkGetMacro(ScaleFactor, double);
177
179
182 vtkSetMacro(ThreeGlyphs, vtkTypeBool);
183 vtkGetMacro(ThreeGlyphs, vtkTypeBool);
184 vtkBooleanMacro(ThreeGlyphs, vtkTypeBool);
186
188
191 vtkSetMacro(Symmetric, vtkTypeBool);
192 vtkGetMacro(Symmetric, vtkTypeBool);
193 vtkBooleanMacro(Symmetric, vtkTypeBool);
195
197
201 vtkSetMacro(Length, double);
202 vtkGetMacro(Length, double);
204
206
209 vtkSetMacro(ExtractEigenvalues, vtkTypeBool);
210 vtkBooleanMacro(ExtractEigenvalues, vtkTypeBool);
211 vtkGetMacro(ExtractEigenvalues, vtkTypeBool);
213
215
220 vtkSetMacro(ColorGlyphs, vtkTypeBool);
221 vtkGetMacro(ColorGlyphs, vtkTypeBool);
222 vtkBooleanMacro(ColorGlyphs, vtkTypeBool);
224
225 enum
226 {
228 COLOR_BY_EIGENVALUES
229 };
230
232
242 vtkSetClampMacro(ColorMode, int, COLOR_BY_SCALARS, COLOR_BY_EIGENVALUES);
243 vtkGetMacro(ColorMode, int);
244 void SetColorModeToScalars() { this->SetColorMode(COLOR_BY_SCALARS); }
245 void SetColorModeToEigenvalues() { this->SetColorMode(COLOR_BY_EIGENVALUES); }
247
249
254 vtkSetMacro(ClampScaling, vtkTypeBool);
255 vtkGetMacro(ClampScaling, vtkTypeBool);
256 vtkBooleanMacro(ClampScaling, vtkTypeBool);
258
260
266 vtkSetMacro(MaxScaleFactor, double);
267 vtkGetMacro(MaxScaleFactor, double);
269
270protected:
272 ~vtkTensorGlyph() override;
273
276 int FillInputPortInformation(int port, vtkInformation* info) override;
277
278 vtkTypeBool Scaling; // Determine whether scaling of geometry is performed
279 double ScaleFactor; // Scale factor to use to scale geometry
280 vtkTypeBool ExtractEigenvalues; // Boolean controls eigenfunction extraction
281 vtkTypeBool ColorGlyphs; // Boolean controls coloring with input scalar data
282 int ColorMode; // The coloring mode to use for the glyphs.
283 vtkTypeBool ClampScaling; // Boolean controls whether scaling is clamped.
284 double MaxScaleFactor; // Maximum scale factor (ScaleFactor*eigenvalue)
285 vtkTypeBool ThreeGlyphs; // Boolean controls drawing 1 or 3 glyphs
286 vtkTypeBool Symmetric; // Boolean controls drawing a "mirror" of each glyph
287 double Length; // Distance, in x, from the origin to the end of the glyph
288private:
289 vtkTensorGlyph(const vtkTensorGlyph&) = delete;
290 void operator=(const vtkTensorGlyph&) = delete;
291};
292
293VTK_ABI_NAMESPACE_END
294#endif
Proxy object to connect input/output ports.
a simple class to control print indentation
Definition vtkIndent.h:108
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
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.
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
static vtkTensorGlyph * New()
Standard methods for instantiation, obtaining type information, and printing.Construct object with sc...
void SetSourceConnection(int id, vtkAlgorithmOutput *algOutput)
Specify a source object at a specified table location.
vtkTypeBool ClampScaling
vtkTypeBool ColorGlyphs
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
vtkPolyData * GetSource()
Specify the geometry to copy to each point.
void SetSourceConnection(vtkAlgorithmOutput *algOutput)
Specify a source object at a specified table location.
vtkTypeBool ExtractEigenvalues
int vtkTypeBool
Definition vtkABI.h:64
boost::graph_traits< vtkGraph * >::vertex_descriptor source(boost::graph_traits< vtkGraph * >::edge_descriptor e, vtkGraph *)