VTK: Filters/Core/vtkTensorGlyph.h Source File

| VTK 9.3.1

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();
102 vtkTypeMacro(vtkTensorGlyph, vtkPolyDataAlgorithm);
103 void PrintSelf(ostream& os, vtkIndent indent) override;
105
107
113 void SetSourceData(vtkPolyData* source);
114 vtkPolyData* GetSource();
116
118
123 void SetSourceConnection(int id, vtkAlgorithmOutput* algOutput);
124 void SetSourceConnection(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 {
197 COLOR_BY_SCALARS,
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:
241 vtkTensorGlyph();
242 ~vtkTensorGlyph() override;
243
244 int RequestUpdateExtent(vtkInformation*, vtkInformationVector**, vtkInformationVector*) override;
245 int RequestData(vtkInformation*, vtkInformationVector**, vtkInformationVector*) override;
246 int FillInputPortInformation(int port, vtkInformation* info) override;
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
vtkAlgorithmOutput
Proxy object to connect input/output ports.
Definition: vtkAlgorithmOutput.h:41
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:38
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:40
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:72
vtkPolyDataAlgorithm
Superclass for algorithms that produce only polydata as output.
Definition: vtkPolyDataAlgorithm.h:43
vtkPolyData
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:89
vtkTensorGlyph
scale and orient glyph(s) according to eigenvalues and eigenvectors of symmetrical part of tensor
Definition: vtkTensorGlyph.h:92
vtkTensorGlyph::SetSourceData
void SetSourceData(vtkPolyData *source)
Specify the geometry to copy to each point.
vtkTensorGlyph::SetColorModeToScalars
void SetColorModeToScalars()
Set the color mode to be used for the glyphs.
Definition: vtkTensorGlyph.h:214
vtkTensorGlyph::ScaleFactor
double ScaleFactor
Definition: vtkTensorGlyph.h:249
vtkTensorGlyph::GetSource
vtkPolyData * GetSource()
Specify the geometry to copy to each point.
vtkTensorGlyph::COLOR_BY_SCALARS
@ COLOR_BY_SCALARS
Definition: vtkTensorGlyph.h:197
vtkTensorGlyph::FillInputPortInformation
int FillInputPortInformation(int port, vtkInformation *info) override
Fill the input port information objects for this algorithm.
vtkTensorGlyph::SetColorModeToEigenvalues
void SetColorModeToEigenvalues()
Set the color mode to be used for the glyphs.
Definition: vtkTensorGlyph.h:215
vtkTensorGlyph::ThreeGlyphs
vtkTypeBool ThreeGlyphs
Definition: vtkTensorGlyph.h:255
vtkTensorGlyph::SetSourceConnection
void SetSourceConnection(int id, vtkAlgorithmOutput *algOutput)
Specify a source object at a specified table location.
vtkTensorGlyph::ClampScaling
vtkTypeBool ClampScaling
Definition: vtkTensorGlyph.h:253
vtkTensorGlyph::ColorGlyphs
vtkTypeBool ColorGlyphs
Definition: vtkTensorGlyph.h:251
vtkTensorGlyph::New
static vtkTensorGlyph * New()
Standard methods for instantiation, obtaining type information, and printing.Construct object with sc...
vtkTensorGlyph::RequestData
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
vtkTensorGlyph::MaxScaleFactor
double MaxScaleFactor
Definition: vtkTensorGlyph.h:254
vtkTensorGlyph::RequestUpdateExtent
int RequestUpdateExtent(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
vtkTensorGlyph::Scaling
vtkTypeBool Scaling
Definition: vtkTensorGlyph.h:248
vtkTensorGlyph::vtkTensorGlyph
vtkTensorGlyph()
vtkTensorGlyph::ColorMode
int ColorMode
Definition: vtkTensorGlyph.h:252
vtkTensorGlyph::Symmetric
vtkTypeBool Symmetric
Definition: vtkTensorGlyph.h:256
vtkTensorGlyph::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Standard methods for instantiation, obtaining type information, and printing.Construct object with sc...
vtkTensorGlyph::~vtkTensorGlyph
~vtkTensorGlyph() override
vtkTensorGlyph::Length
double Length
Definition: vtkTensorGlyph.h:257
vtkTensorGlyph::SetSourceConnection
void SetSourceConnection(vtkAlgorithmOutput *algOutput)
Specify a source object at a specified table location.
Definition: vtkTensorGlyph.h:124
vtkTensorGlyph::ExtractEigenvalues
vtkTypeBool ExtractEigenvalues
Definition: vtkTensorGlyph.h:250
vtkX3D::info
@ info
Definition: vtkX3D.h:376
vtkX3D::port
@ port
Definition: vtkX3D.h:447
vtkTypeBool
int vtkTypeBool
Definition: vtkABI.h:64
source
boost::graph_traits< vtkGraph * >::vertex_descriptor source(boost::graph_traits< vtkGraph * >::edge_descriptor e, vtkGraph *)
Definition: vtkBoostGraphAdapter.h:964
vtkPolyDataAlgorithm.h