VTK  9.1.0
vtkTensorGlyph.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkTensorGlyph.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
123 #ifndef vtkTensorGlyph_h
124 #define vtkTensorGlyph_h
125 
126 #include "vtkFiltersCoreModule.h" // For export macro
127 #include "vtkPolyDataAlgorithm.h"
128 
129 class VTKFILTERSCORE_EXPORT vtkTensorGlyph : public vtkPolyDataAlgorithm
130 {
131 public:
133 
139  static vtkTensorGlyph* New();
141  void PrintSelf(ostream& os, vtkIndent indent) override;
143 
145 
154 
156 
161  void SetSourceConnection(int id, vtkAlgorithmOutput* algOutput);
163  {
164  this->SetSourceConnection(0, algOutput);
165  }
167 
169 
172  vtkSetMacro(Scaling, vtkTypeBool);
173  vtkGetMacro(Scaling, vtkTypeBool);
174  vtkBooleanMacro(Scaling, vtkTypeBool);
176 
178 
182  vtkSetMacro(ScaleFactor, double);
183  vtkGetMacro(ScaleFactor, double);
185 
187 
190  vtkSetMacro(ThreeGlyphs, vtkTypeBool);
191  vtkGetMacro(ThreeGlyphs, vtkTypeBool);
192  vtkBooleanMacro(ThreeGlyphs, vtkTypeBool);
194 
196 
199  vtkSetMacro(Symmetric, vtkTypeBool);
200  vtkGetMacro(Symmetric, vtkTypeBool);
201  vtkBooleanMacro(Symmetric, vtkTypeBool);
203 
205 
209  vtkSetMacro(Length, double);
210  vtkGetMacro(Length, double);
212 
214 
217  vtkSetMacro(ExtractEigenvalues, vtkTypeBool);
218  vtkBooleanMacro(ExtractEigenvalues, vtkTypeBool);
219  vtkGetMacro(ExtractEigenvalues, vtkTypeBool);
221 
223 
228  vtkSetMacro(ColorGlyphs, vtkTypeBool);
229  vtkGetMacro(ColorGlyphs, vtkTypeBool);
230  vtkBooleanMacro(ColorGlyphs, vtkTypeBool);
232 
233  enum
234  {
236  COLOR_BY_EIGENVALUES
237  };
238 
240 
250  vtkSetClampMacro(ColorMode, int, COLOR_BY_SCALARS, COLOR_BY_EIGENVALUES);
251  vtkGetMacro(ColorMode, int);
252  void SetColorModeToScalars() { this->SetColorMode(COLOR_BY_SCALARS); }
253  void SetColorModeToEigenvalues() { this->SetColorMode(COLOR_BY_EIGENVALUES); }
255 
257 
262  vtkSetMacro(ClampScaling, vtkTypeBool);
263  vtkGetMacro(ClampScaling, vtkTypeBool);
264  vtkBooleanMacro(ClampScaling, vtkTypeBool);
266 
268 
274  vtkSetMacro(MaxScaleFactor, double);
275  vtkGetMacro(MaxScaleFactor, double);
277 
278 protected:
280  ~vtkTensorGlyph() override;
281 
285 
286  vtkTypeBool Scaling; // Determine whether scaling of geometry is performed
287  double ScaleFactor; // Scale factor to use to scale geometry
288  vtkTypeBool ExtractEigenvalues; // Boolean controls eigenfunction extraction
289  vtkTypeBool ColorGlyphs; // Boolean controls coloring with input scalar data
290  int ColorMode; // The coloring mode to use for the glyphs.
291  vtkTypeBool ClampScaling; // Boolean controls whether scaling is clamped.
292  double MaxScaleFactor; // Maximum scale factor (ScaleFactor*eigenvalue)
293  vtkTypeBool ThreeGlyphs; // Boolean controls drawing 1 or 3 glyphs
294  vtkTypeBool Symmetric; // Boolean controls drawing a "mirror" of each glyph
295  double Length; // Distance, in x, from the origin to the end of the glyph
296 private:
297  vtkTensorGlyph(const vtkTensorGlyph&) = delete;
298  void operator=(const vtkTensorGlyph&) = delete;
299 };
300 
301 #endif
vtkTensorGlyph::New
static vtkTensorGlyph * New()
Standard methods for instantiation, obtaining type information, and printing.Construct object with sc...
vtkTensorGlyph::ScaleFactor
double ScaleFactor
Definition: vtkTensorGlyph.h:287
vtkTensorGlyph::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Standard methods for instantiation, obtaining type information, and printing.Construct object with sc...
vtkTensorGlyph
scale and orient glyph(s) according to eigenvalues and eigenvectors of symmetrical part of tensor
Definition: vtkTensorGlyph.h:130
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:145
vtkTensorGlyph::RequestUpdateExtent
int RequestUpdateExtent(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
vtkTensorGlyph::ClampScaling
vtkTypeBool ClampScaling
Definition: vtkTensorGlyph.h:291
vtkTensorGlyph::~vtkTensorGlyph
~vtkTensorGlyph() override
vtkTensorGlyph::SetColorModeToScalars
void SetColorModeToScalars()
Set the color mode to be used for the glyphs.
Definition: vtkTensorGlyph.h:252
vtkTensorGlyph::Symmetric
vtkTypeBool Symmetric
Definition: vtkTensorGlyph.h:294
vtkTensorGlyph::MaxScaleFactor
double MaxScaleFactor
Definition: vtkTensorGlyph.h:292
vtkPolyDataAlgorithm.h
vtkX3D::port
@ port
Definition: vtkX3D.h:453
vtkTensorGlyph::FillInputPortInformation
int FillInputPortInformation(int port, vtkInformation *info) override
Fill the input port information objects for this algorithm.
vtkTensorGlyph::Length
double Length
Definition: vtkTensorGlyph.h:295
vtkTensorGlyph::ThreeGlyphs
vtkTypeBool ThreeGlyphs
Definition: vtkTensorGlyph.h:293
vtkTensorGlyph::SetSourceConnection
void SetSourceConnection(int id, vtkAlgorithmOutput *algOutput)
Specify a source object at a specified table location.
vtkTensorGlyph::ExtractEigenvalues
vtkTypeBool ExtractEigenvalues
Definition: vtkTensorGlyph.h:288
vtkTensorGlyph::SetColorModeToEigenvalues
void SetColorModeToEigenvalues()
Set the color mode to be used for the glyphs.
Definition: vtkTensorGlyph.h:253
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:113
vtkTensorGlyph::ColorGlyphs
vtkTypeBool ColorGlyphs
Definition: vtkTensorGlyph.h:289
vtkTensorGlyph::Scaling
vtkTypeBool Scaling
Definition: vtkTensorGlyph.h:286
vtkTensorGlyph::ColorMode
int ColorMode
Definition: vtkTensorGlyph.h:290
vtkTensorGlyph::RequestData
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:183
vtkX3D::info
@ info
Definition: vtkX3D.h:382
vtkTensorGlyph::SetSourceConnection
void SetSourceConnection(vtkAlgorithmOutput *algOutput)
Specify a source object at a specified table location.
Definition: vtkTensorGlyph.h:162
vtkAlgorithmOutput
Proxy object to connect input/output ports.
Definition: vtkAlgorithmOutput.h:66
vtkTensorGlyph::SetSourceData
void SetSourceData(vtkPolyData *source)
Specify the geometry to copy to each point.
vtkTensorGlyph::GetSource
vtkPolyData * GetSource()
Specify the geometry to copy to each point.
vtkPolyData
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:195
source
boost::graph_traits< vtkGraph * >::vertex_descriptor source(boost::graph_traits< vtkGraph * >::edge_descriptor e, vtkGraph *)
Definition: vtkBoostGraphAdapter.h:998
vtkTypeBool
int vtkTypeBool
Definition: vtkABI.h:69
vtkTensorGlyph::COLOR_BY_SCALARS
@ COLOR_BY_SCALARS
Definition: vtkTensorGlyph.h:235
vtkTensorGlyph::vtkTensorGlyph
vtkTensorGlyph()
vtkPolyDataAlgorithm
Superclass for algorithms that produce only polydata as output.
Definition: vtkPolyDataAlgorithm.h:151