VTK  9.7.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
75 #ifndef vtkTensorGlyph_h
76 #define vtkTensorGlyph_h
77 
78 #include "vtkFiltersCoreModule.h" // For export macro
79 #include "vtkPolyDataAlgorithm.h"
80 #include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
81 
82 VTK_ABI_NAMESPACE_BEGIN
83 class VTKFILTERSCORE_EXPORT VTK_MARSHALAUTO vtkTensorGlyph : public vtkPolyDataAlgorithm
84 {
85 public:
87 
93  static vtkTensorGlyph* New();
95  void PrintSelf(ostream& os, vtkIndent indent) override;
97 
99 
105  void SetSourceData(vtkPolyData* source);
106  vtkPolyData* GetSource();
108 
110 
115  void SetSourceConnection(int id, vtkAlgorithmOutput* algOutput);
117  {
118  this->SetSourceConnection(0, algOutput);
119  }
121 
123 
126  vtkSetMacro(Scaling, vtkTypeBool);
127  vtkGetMacro(Scaling, vtkTypeBool);
128  vtkBooleanMacro(Scaling, vtkTypeBool);
130 
132 
136  vtkSetMacro(ScaleFactor, double);
137  vtkGetMacro(ScaleFactor, double);
139 
141 
144  vtkSetMacro(ThreeGlyphs, vtkTypeBool);
145  vtkGetMacro(ThreeGlyphs, vtkTypeBool);
146  vtkBooleanMacro(ThreeGlyphs, vtkTypeBool);
148 
150 
153  vtkSetMacro(Symmetric, vtkTypeBool);
154  vtkGetMacro(Symmetric, vtkTypeBool);
155  vtkBooleanMacro(Symmetric, vtkTypeBool);
157 
159 
163  vtkSetMacro(Length, double);
164  vtkGetMacro(Length, double);
166 
168 
171  vtkSetMacro(ExtractEigenvalues, vtkTypeBool);
172  vtkBooleanMacro(ExtractEigenvalues, vtkTypeBool);
173  vtkGetMacro(ExtractEigenvalues, vtkTypeBool);
175 
177 
182  vtkSetMacro(ColorGlyphs, vtkTypeBool);
183  vtkGetMacro(ColorGlyphs, vtkTypeBool);
184  vtkBooleanMacro(ColorGlyphs, vtkTypeBool);
186 
187  enum
188  {
190  COLOR_BY_EIGENVALUES
191  };
192 
194 
204  vtkSetClampMacro(ColorMode, int, COLOR_BY_SCALARS, COLOR_BY_EIGENVALUES);
205  vtkGetMacro(ColorMode, int);
206  void SetColorModeToScalars() { this->SetColorMode(COLOR_BY_SCALARS); }
207  void SetColorModeToEigenvalues() { this->SetColorMode(COLOR_BY_EIGENVALUES); }
209 
211 
216  vtkSetMacro(ClampScaling, vtkTypeBool);
217  vtkGetMacro(ClampScaling, vtkTypeBool);
218  vtkBooleanMacro(ClampScaling, vtkTypeBool);
220 
222 
228  vtkSetMacro(MaxScaleFactor, double);
229  vtkGetMacro(MaxScaleFactor, double);
231 
232 protected:
233  vtkTensorGlyph();
234  ~vtkTensorGlyph() override;
235 
238  int FillInputPortInformation(int port, vtkInformation* info) override;
239 
240  vtkTypeBool Scaling; // Determine whether scaling of geometry is performed
241  double ScaleFactor; // Scale factor to use to scale geometry
242  vtkTypeBool ExtractEigenvalues; // Boolean controls eigenfunction extraction
243  vtkTypeBool ColorGlyphs; // Boolean controls coloring with input scalar data
244  int ColorMode; // The coloring mode to use for the glyphs.
245  vtkTypeBool ClampScaling; // Boolean controls whether scaling is clamped.
246  double MaxScaleFactor; // Maximum scale factor (ScaleFactor*eigenvalue)
247  vtkTypeBool ThreeGlyphs; // Boolean controls drawing 1 or 3 glyphs
248  vtkTypeBool Symmetric; // Boolean controls drawing a "mirror" of each glyph
249  double Length; // Distance, in x, from the origin to the end of the glyph
250 private:
251  vtkTensorGlyph(const vtkTensorGlyph&) = delete;
252  void operator=(const vtkTensorGlyph&) = delete;
253 };
254 
255 VTK_ABI_NAMESPACE_END
256 #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:71
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:64
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:28
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.
#define VTK_MARSHALAUTO
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.