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
75 #ifndef vtkTensorGlyph_h
76 #define vtkTensorGlyph_h
77 
78 #include "vtkFiltersCoreModule.h" // For export macro
79 #include "vtkPolyDataAlgorithm.h"
80 
81 VTK_ABI_NAMESPACE_BEGIN
82 class VTKFILTERSCORE_EXPORT vtkTensorGlyph : public vtkPolyDataAlgorithm
83 {
84 public:
86 
92  static vtkTensorGlyph* New();
94  void PrintSelf(ostream& os, vtkIndent indent) override;
96 
98 
104  void SetSourceData(vtkPolyData* source);
105  vtkPolyData* GetSource();
107 
109 
114  void SetSourceConnection(int id, vtkAlgorithmOutput* algOutput);
116  {
117  this->SetSourceConnection(0, algOutput);
118  }
120 
122 
125  vtkSetMacro(Scaling, vtkTypeBool);
126  vtkGetMacro(Scaling, vtkTypeBool);
127  vtkBooleanMacro(Scaling, vtkTypeBool);
129 
131 
135  vtkSetMacro(ScaleFactor, double);
136  vtkGetMacro(ScaleFactor, double);
138 
140 
143  vtkSetMacro(ThreeGlyphs, vtkTypeBool);
144  vtkGetMacro(ThreeGlyphs, vtkTypeBool);
145  vtkBooleanMacro(ThreeGlyphs, vtkTypeBool);
147 
149 
152  vtkSetMacro(Symmetric, vtkTypeBool);
153  vtkGetMacro(Symmetric, vtkTypeBool);
154  vtkBooleanMacro(Symmetric, vtkTypeBool);
156 
158 
162  vtkSetMacro(Length, double);
163  vtkGetMacro(Length, double);
165 
167 
170  vtkSetMacro(ExtractEigenvalues, vtkTypeBool);
171  vtkBooleanMacro(ExtractEigenvalues, vtkTypeBool);
172  vtkGetMacro(ExtractEigenvalues, vtkTypeBool);
174 
176 
181  vtkSetMacro(ColorGlyphs, vtkTypeBool);
182  vtkGetMacro(ColorGlyphs, vtkTypeBool);
183  vtkBooleanMacro(ColorGlyphs, vtkTypeBool);
185 
186  enum
187  {
189  COLOR_BY_EIGENVALUES
190  };
191 
193 
203  vtkSetClampMacro(ColorMode, int, COLOR_BY_SCALARS, COLOR_BY_EIGENVALUES);
204  vtkGetMacro(ColorMode, int);
205  void SetColorModeToScalars() { this->SetColorMode(COLOR_BY_SCALARS); }
206  void SetColorModeToEigenvalues() { this->SetColorMode(COLOR_BY_EIGENVALUES); }
208 
210 
215  vtkSetMacro(ClampScaling, vtkTypeBool);
216  vtkGetMacro(ClampScaling, vtkTypeBool);
217  vtkBooleanMacro(ClampScaling, vtkTypeBool);
219 
221 
227  vtkSetMacro(MaxScaleFactor, double);
228  vtkGetMacro(MaxScaleFactor, double);
230 
231 protected:
232  vtkTensorGlyph();
233  ~vtkTensorGlyph() override;
234 
237  int FillInputPortInformation(int port, vtkInformation* info) override;
238 
239  vtkTypeBool Scaling; // Determine whether scaling of geometry is performed
240  double ScaleFactor; // Scale factor to use to scale geometry
241  vtkTypeBool ExtractEigenvalues; // Boolean controls eigenfunction extraction
242  vtkTypeBool ColorGlyphs; // Boolean controls coloring with input scalar data
243  int ColorMode; // The coloring mode to use for the glyphs.
244  vtkTypeBool ClampScaling; // Boolean controls whether scaling is clamped.
245  double MaxScaleFactor; // Maximum scale factor (ScaleFactor*eigenvalue)
246  vtkTypeBool ThreeGlyphs; // Boolean controls drawing 1 or 3 glyphs
247  vtkTypeBool Symmetric; // Boolean controls drawing a "mirror" of each glyph
248  double Length; // Distance, in x, from the origin to the end of the glyph
249 private:
250  vtkTensorGlyph(const vtkTensorGlyph&) = delete;
251  void operator=(const vtkTensorGlyph&) = delete;
252 };
253 
254 VTK_ABI_NAMESPACE_END
255 #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:79
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.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.