VTK  9.0.1
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 =========================================================================*/
84 #ifndef vtkTensorGlyph_h
85 #define vtkTensorGlyph_h
86 
87 #include "vtkFiltersCoreModule.h" // For export macro
88 #include "vtkPolyDataAlgorithm.h"
89 
90 class VTKFILTERSCORE_EXPORT vtkTensorGlyph : public vtkPolyDataAlgorithm
91 {
92 public:
94  void PrintSelf(ostream& os, vtkIndent indent) override;
95 
101  static vtkTensorGlyph* New();
102 
104 
110  void SetSourceData(vtkPolyData* source);
111  vtkPolyData* GetSource();
113 
115 
120  void SetSourceConnection(int id, vtkAlgorithmOutput* algOutput);
122  {
123  this->SetSourceConnection(0, algOutput);
124  }
126 
128 
131  vtkSetMacro(Scaling, vtkTypeBool);
132  vtkGetMacro(Scaling, vtkTypeBool);
133  vtkBooleanMacro(Scaling, vtkTypeBool);
135 
137 
141  vtkSetMacro(ScaleFactor, double);
142  vtkGetMacro(ScaleFactor, double);
144 
146 
149  vtkSetMacro(ThreeGlyphs, vtkTypeBool);
150  vtkGetMacro(ThreeGlyphs, vtkTypeBool);
151  vtkBooleanMacro(ThreeGlyphs, vtkTypeBool);
153 
155 
158  vtkSetMacro(Symmetric, vtkTypeBool);
159  vtkGetMacro(Symmetric, vtkTypeBool);
160  vtkBooleanMacro(Symmetric, vtkTypeBool);
162 
164 
168  vtkSetMacro(Length, double);
169  vtkGetMacro(Length, double);
171 
173 
176  vtkSetMacro(ExtractEigenvalues, vtkTypeBool);
177  vtkBooleanMacro(ExtractEigenvalues, vtkTypeBool);
178  vtkGetMacro(ExtractEigenvalues, vtkTypeBool);
180 
182 
187  vtkSetMacro(ColorGlyphs, vtkTypeBool);
188  vtkGetMacro(ColorGlyphs, vtkTypeBool);
189  vtkBooleanMacro(ColorGlyphs, vtkTypeBool);
191 
192  enum
193  {
195  COLOR_BY_EIGENVALUES
196  };
197 
199 
209  vtkSetClampMacro(ColorMode, int, COLOR_BY_SCALARS, COLOR_BY_EIGENVALUES);
210  vtkGetMacro(ColorMode, int);
211  void SetColorModeToScalars() { this->SetColorMode(COLOR_BY_SCALARS); }
212  void SetColorModeToEigenvalues() { this->SetColorMode(COLOR_BY_EIGENVALUES); }
214 
216 
221  vtkSetMacro(ClampScaling, vtkTypeBool);
222  vtkGetMacro(ClampScaling, vtkTypeBool);
223  vtkBooleanMacro(ClampScaling, vtkTypeBool);
225 
227 
233  vtkSetMacro(MaxScaleFactor, double);
234  vtkGetMacro(MaxScaleFactor, double);
236 
237 protected:
238  vtkTensorGlyph();
239  ~vtkTensorGlyph() override;
240 
243  int FillInputPortInformation(int port, vtkInformation* info) override;
244 
245  vtkTypeBool Scaling; // Determine whether scaling of geometry is performed
246  double ScaleFactor; // Scale factor to use to scale geometry
247  vtkTypeBool ExtractEigenvalues; // Boolean controls eigenfunction extraction
248  vtkTypeBool ColorGlyphs; // Boolean controls coloring with input scalar data
249  int ColorMode; // The coloring mode to use for the glyphs.
250  vtkTypeBool ClampScaling; // Boolean controls whether scaling is clamped.
251  double MaxScaleFactor; // Maximum scale factor (ScaleFactor*eigenvalue)
252  vtkTypeBool ThreeGlyphs; // Boolean controls drawing 1 or 3 glyphs
253  vtkTypeBool Symmetric; // Boolean controls drawing a "mirror" of each glyph
254  double Length; // Distance, in x, from the origin to the end of the glyph
255 private:
256  vtkTensorGlyph(const vtkTensorGlyph&) = delete;
257  void operator=(const vtkTensorGlyph&) = delete;
258 };
259 
260 #endif
vtkTensorGlyph::ScaleFactor
double ScaleFactor
Definition: vtkTensorGlyph.h:246
vtkTensorGlyph
scale and orient glyph(s) according to eigenvalues and eigenvectors of symmetrical part of tensor
Definition: vtkTensorGlyph.h:90
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:35
vtkPolyDataAlgorithm::RequestUpdateExtent
virtual int RequestUpdateExtent(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
This is called by the superclass.
vtkTensorGlyph::ClampScaling
vtkTypeBool ClampScaling
Definition: vtkTensorGlyph.h:250
vtkTensorGlyph::SetColorModeToScalars
void SetColorModeToScalars()
Definition: vtkTensorGlyph.h:211
vtkPolyDataAlgorithm::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkTensorGlyph::Symmetric
vtkTypeBool Symmetric
Definition: vtkTensorGlyph.h:253
vtkTensorGlyph::MaxScaleFactor
double MaxScaleFactor
Definition: vtkTensorGlyph.h:251
vtkPolyDataAlgorithm.h
vtkX3D::port
@ port
Definition: vtkX3D.h:453
vtkTensorGlyph::Length
double Length
Definition: vtkTensorGlyph.h:254
vtkTensorGlyph::ThreeGlyphs
vtkTypeBool ThreeGlyphs
Definition: vtkTensorGlyph.h:252
vtkTensorGlyph::ExtractEigenvalues
vtkTypeBool ExtractEigenvalues
Definition: vtkTensorGlyph.h:247
vtkTensorGlyph::SetColorModeToEigenvalues
void SetColorModeToEigenvalues()
Definition: vtkTensorGlyph.h:212
vtkPolyDataAlgorithm::RequestData
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called by the superclass.
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:33
vtkTensorGlyph::ColorGlyphs
vtkTypeBool ColorGlyphs
Definition: vtkTensorGlyph.h:248
vtkTensorGlyph::Scaling
vtkTypeBool Scaling
Definition: vtkTensorGlyph.h:245
vtkTensorGlyph::ColorMode
int ColorMode
Definition: vtkTensorGlyph.h:249
vtkPolyDataAlgorithm::FillInputPortInformation
int FillInputPortInformation(int port, vtkInformation *info) override
Fill the input port information objects for this algorithm.
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:73
vtkX3D::info
@ info
Definition: vtkX3D.h:382
vtkTensorGlyph::SetSourceConnection
void SetSourceConnection(vtkAlgorithmOutput *algOutput)
Definition: vtkTensorGlyph.h:121
vtkAlgorithmOutput
Proxy object to connect input/output ports.
Definition: vtkAlgorithmOutput.h:36
vtkPolyData
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:84
source
boost::graph_traits< vtkGraph * >::vertex_descriptor source(boost::graph_traits< vtkGraph * >::edge_descriptor e, vtkGraph *)
Definition: vtkBoostGraphAdapter.h:959
vtkTypeBool
int vtkTypeBool
Definition: vtkABI.h:69
vtkPolyDataAlgorithm::New
static vtkPolyDataAlgorithm * New()
vtkTensorGlyph::COLOR_BY_SCALARS
@ COLOR_BY_SCALARS
Definition: vtkTensorGlyph.h:194
vtkPolyDataAlgorithm
Superclass for algorithms that produce only polydata as output.
Definition: vtkPolyDataAlgorithm.h:41