VTK
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 =========================================================================*/
83 #ifndef vtkTensorGlyph_h
84 #define vtkTensorGlyph_h
85 
86 #include "vtkFiltersCoreModule.h" // For export macro
87 #include "vtkPolyDataAlgorithm.h"
88 
89 class VTKFILTERSCORE_EXPORT vtkTensorGlyph : public vtkPolyDataAlgorithm
90 {
91 public:
93  void PrintSelf(ostream& os, vtkIndent indent) override;
94 
100  static vtkTensorGlyph *New();
101 
103 
109  void SetSourceData(vtkPolyData *source);
110  vtkPolyData *GetSource();
112 
114 
119  void SetSourceConnection(int id, vtkAlgorithmOutput* algOutput);
121  {
122  this->SetSourceConnection(0, algOutput);
123  }
125 
127 
130  vtkSetMacro(Scaling,vtkTypeBool);
131  vtkGetMacro(Scaling,vtkTypeBool);
132  vtkBooleanMacro(Scaling,vtkTypeBool);
134 
136 
140  vtkSetMacro(ScaleFactor,double);
141  vtkGetMacro(ScaleFactor,double);
143 
145 
148  vtkSetMacro(ThreeGlyphs,vtkTypeBool);
149  vtkGetMacro(ThreeGlyphs,vtkTypeBool);
150  vtkBooleanMacro(ThreeGlyphs,vtkTypeBool);
152 
154 
157  vtkSetMacro(Symmetric,vtkTypeBool);
158  vtkGetMacro(Symmetric,vtkTypeBool);
159  vtkBooleanMacro(Symmetric,vtkTypeBool);
161 
163 
167  vtkSetMacro(Length,double);
168  vtkGetMacro(Length,double);
170 
172 
175  vtkSetMacro(ExtractEigenvalues,vtkTypeBool);
176  vtkBooleanMacro(ExtractEigenvalues,vtkTypeBool);
177  vtkGetMacro(ExtractEigenvalues,vtkTypeBool);
179 
181 
186  vtkSetMacro(ColorGlyphs,vtkTypeBool);
187  vtkGetMacro(ColorGlyphs,vtkTypeBool);
188  vtkBooleanMacro(ColorGlyphs,vtkTypeBool);
190 
191  enum
192  {
194  COLOR_BY_EIGENVALUES
195  };
196 
198 
208  vtkSetClampMacro(ColorMode, int, COLOR_BY_SCALARS, COLOR_BY_EIGENVALUES);
209  vtkGetMacro(ColorMode, int);
211  {this->SetColorMode(COLOR_BY_SCALARS);};
213  {this->SetColorMode(COLOR_BY_EIGENVALUES);};
215 
217 
222  vtkSetMacro(ClampScaling,vtkTypeBool);
223  vtkGetMacro(ClampScaling,vtkTypeBool);
224  vtkBooleanMacro(ClampScaling,vtkTypeBool);
226 
228 
234  vtkSetMacro(MaxScaleFactor,double);
235  vtkGetMacro(MaxScaleFactor,double);
237 
238 protected:
239  vtkTensorGlyph();
240  ~vtkTensorGlyph() override;
241 
244  int FillInputPortInformation(int port, vtkInformation *info) override;
245 
246  vtkTypeBool Scaling; // Determine whether scaling of geometry is performed
247  double ScaleFactor; // Scale factor to use to scale geometry
248  vtkTypeBool ExtractEigenvalues; // Boolean controls eigenfunction extraction
249  vtkTypeBool ColorGlyphs; // Boolean controls coloring with input scalar data
250  int ColorMode; // The coloring mode to use for the glyphs.
251  vtkTypeBool ClampScaling; // Boolean controls whether scaling is clamped.
252  double MaxScaleFactor; // Maximum scale factor (ScaleFactor*eigenvalue)
253  vtkTypeBool ThreeGlyphs; // Boolean controls drawing 1 or 3 glyphs
254  vtkTypeBool Symmetric; // Boolean controls drawing a "mirror" of each glyph
255  double Length; // Distance, in x, from the origin to the end of the glyph
256 private:
257  vtkTensorGlyph(const vtkTensorGlyph&) = delete;
258  void operator=(const vtkTensorGlyph&) = delete;
259 };
260 
261 #endif
vtkTensorGlyph::ScaleFactor
double ScaleFactor
Definition: vtkTensorGlyph.h:247
vtkTensorGlyph
scale and orient glyph(s) according to eigenvalues and eigenvectors of symmetrical part of tensor
Definition: vtkTensorGlyph.h:89
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:251
vtkTensorGlyph::SetColorModeToScalars
void SetColorModeToScalars()
Definition: vtkTensorGlyph.h:210
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:254
vtkTensorGlyph::MaxScaleFactor
double MaxScaleFactor
Definition: vtkTensorGlyph.h:252
vtkTensorGlyph::COLOR_BY_SCALARS
Definition: vtkTensorGlyph.h:193
vtkPolyDataAlgorithm.h
source
boost::graph_traits< vtkGraph * >::vertex_descriptor source(boost::graph_traits< vtkGraph * >::edge_descriptor e, vtkGraph *)
Definition: vtkBoostGraphAdapter.h:825
vtkX3D::port
Definition: vtkX3D.h:447
vtkTensorGlyph::Length
double Length
Definition: vtkTensorGlyph.h:255
vtkTensorGlyph::ThreeGlyphs
vtkTypeBool ThreeGlyphs
Definition: vtkTensorGlyph.h:253
vtkTensorGlyph::ExtractEigenvalues
vtkTypeBool ExtractEigenvalues
Definition: vtkTensorGlyph.h:248
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:249
vtkTensorGlyph::Scaling
vtkTypeBool Scaling
Definition: vtkTensorGlyph.h:246
vtkTensorGlyph::ColorMode
int ColorMode
Definition: vtkTensorGlyph.h:250
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:80
vtkX3D::info
Definition: vtkX3D.h:376
vtkTensorGlyph::SetSourceConnection
void SetSourceConnection(vtkAlgorithmOutput *algOutput)
Definition: vtkTensorGlyph.h:120
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:79
vtkTypeBool
int vtkTypeBool
Definition: vtkABI.h:69
vtkPolyDataAlgorithm::New
static vtkPolyDataAlgorithm * New()
vtkPolyDataAlgorithm
Superclass for algorithms that produce only polydata as output.
Definition: vtkPolyDataAlgorithm.h:41