vtkTensorGlyph Class Reference
#include <vtkTensorGlyph.h>
Inheritance diagram for vtkTensorGlyph:
[legend]Collaboration diagram for vtkTensorGlyph:
[legend]List of all members.
Detailed Description
scale and orient glyph(s) according to tensor eigenvalues and eigenvectors
vtkTensorGlyph is a filter that copies a geometric representation (specified as polygonal data) to every input point. The geometric representation, or glyph, can be scaled and/or rotated according to the tensor at the input point. Scaling and rotation is controlled by the eigenvalues/eigenvectors of the tensor as follows. For each tensor, the eigenvalues (and associated eigenvectors) are sorted to determine the major, medium, and minor eigenvalues/eigenvectors.
If the boolean variable ThreeGlyphs is not set the major eigenvalue scales the glyph in the x-direction, the medium in the y-direction, and the minor in the z-direction. Then, the glyph is rotated so that the glyph's local x-axis lies along the major eigenvector, y-axis along the medium eigenvector, and z-axis along the minor.
If the boolean variable ThreeGlyphs is set three glyphs are produced, each of them oriented along an eigenvector and scaled according to the corresponding eigenvector.
If the boolean variable Symmetric is set each glyph is mirrored (2 or 6 glyphs will be produced)
The x-axis of the source glyph will correspond to the eigenvector on output. Point (0,0,0) in the source will be placed in the data point. Variable Length will normally correspond to the distance from the origin to the tip of the source glyph along the x-axis, but can be changed to produce other results when Symmetric is on, e.g. glyphs that do not touch or that overlap.
Please note that when Symmetric is false it will generally be better to place the source glyph from (-0.5,0,0) to (0.5,0,0), i.e. centred at the origin. When symmetric is true the placement from (0,0,0) to (1,0,0) will generally be more convenient.
A scale factor is provided to control the amount of scaling. Also, you can turn off scaling completely if desired. The boolean variable ClampScaling controls the maximum scaling (in conjunction with MaxScaleFactor.) This is useful in certain applications where singularities or large order of magnitude differences exist in the eigenvalues.
If the boolean variable ColorGlyphs is set to true the glyphs are colored. The glyphs can be colored using the input scalars (SetColorModeToScalars), which is the default, or colored using the eigenvalues (SetColorModeToEigenvalues).
Another instance variable, ExtractEigenvalues, has been provided to control extraction of eigenvalues/eigenvectors. If this boolean is false, then eigenvalues/eigenvectors are not extracted, and the columns of the tensor are taken as the eigenvectors (the norm of column, always positive, is the eigenvalue). This allows additional capability over the vtkGlyph3D object. That is, the glyph can be oriented in three directions instead of one.
- Thanks:
- Thanks to Jose Paulo Moitinho de Almeida for enhancements.
- See also:
- vtkGlyph3D vtkPointLoad vtkHyperStreamline
- Tests:
- vtkTensorGlyph (Tests)
Definition at line 86 of file vtkTensorGlyph.h.
Member Typedef Documentation
Member Enumeration Documentation
|
- Enumerator:
-
COLOR_BY_SCALARS |
|
COLOR_BY_EIGENVALUES |
|
Definition at line 167 of file vtkTensorGlyph.h. |
Constructor & Destructor Documentation
vtkTensorGlyph::vtkTensorGlyph |
( |
|
) |
[protected] |
|
vtkTensorGlyph::~vtkTensorGlyph |
( |
|
) |
[protected] |
|
Member Function Documentation
virtual const char* vtkTensorGlyph::GetClassName |
( |
|
) |
[virtual] |
|
static int vtkTensorGlyph::IsTypeOf |
( |
const char * |
type |
) |
[static] |
|
|
Return 1 if this class type is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeRevisionMacro found in vtkSetGet.h.
Reimplemented from vtkPolyDataAlgorithm. |
virtual int vtkTensorGlyph::IsA |
( |
const char * |
type |
) |
[virtual] |
|
|
Return 1 if this class is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeRevisionMacro found in vtkSetGet.h.
Reimplemented from vtkPolyDataAlgorithm. |
void vtkTensorGlyph::PrintSelf |
( |
ostream & |
os, |
|
|
vtkIndent |
indent |
|
) |
[virtual] |
|
|
Methods invoked by print to print information about the object including superclasses. Typically not called by the user (use Print() instead) but used in the hierarchical print process to combine the output of several classes.
Reimplemented from vtkPolyDataAlgorithm. |
|
Construct object with scaling on and scale factor 1.0. Eigenvalues are extracted, glyphs are colored with input scalar data, and logarithmic scaling is turned off.
Reimplemented from vtkPolyDataAlgorithm. |
void vtkTensorGlyph::SetSource |
( |
vtkPolyData * |
source |
) |
|
|
|
Specify the geometry to copy to each point. Old style. See SetSourceConnection. |
|
Specify the geometry to copy to each point. Old style. See SetSourceConnection. |
|
Specify a source object at a specified table location. New style. Source connection is stored in port 1. This method is equivalent to SetInputConnection(1, id, outputPort). |
|
Specify a source object at a specified table location. New style. Source connection is stored in port 1. This method is equivalent to SetInputConnection(1, id, outputPort).
Definition at line 109 of file vtkTensorGlyph.h. |
virtual void vtkTensorGlyph::SetScaling |
( |
int |
|
) |
[virtual] |
|
|
Turn on/off scaling of glyph with eigenvalues. |
virtual int vtkTensorGlyph::GetScaling |
( |
|
) |
[virtual] |
|
|
Turn on/off scaling of glyph with eigenvalues. |
virtual void vtkTensorGlyph::ScalingOn |
( |
|
) |
[virtual] |
|
|
Turn on/off scaling of glyph with eigenvalues. |
virtual void vtkTensorGlyph::ScalingOff |
( |
|
) |
[virtual] |
|
|
Turn on/off scaling of glyph with eigenvalues. |
virtual void vtkTensorGlyph::SetScaleFactor |
( |
double |
|
) |
[virtual] |
|
|
Specify scale factor to scale object by. (Scale factor always affects output even if scaling is off.) |
virtual double vtkTensorGlyph::GetScaleFactor |
( |
|
) |
[virtual] |
|
|
Specify scale factor to scale object by. (Scale factor always affects output even if scaling is off.) |
virtual void vtkTensorGlyph::SetThreeGlyphs |
( |
int |
|
) |
[virtual] |
|
|
Turn on/off drawing three glyphs |
virtual int vtkTensorGlyph::GetThreeGlyphs |
( |
|
) |
[virtual] |
|
|
Turn on/off drawing three glyphs |
virtual void vtkTensorGlyph::ThreeGlyphsOn |
( |
|
) |
[virtual] |
|
|
Turn on/off drawing three glyphs |
virtual void vtkTensorGlyph::ThreeGlyphsOff |
( |
|
) |
[virtual] |
|
|
Turn on/off drawing three glyphs |
virtual void vtkTensorGlyph::SetSymmetric |
( |
int |
|
) |
[virtual] |
|
|
Turn on/off drawing a mirror of each glyph |
virtual int vtkTensorGlyph::GetSymmetric |
( |
|
) |
[virtual] |
|
|
Turn on/off drawing a mirror of each glyph |
virtual void vtkTensorGlyph::SymmetricOn |
( |
|
) |
[virtual] |
|
|
Turn on/off drawing a mirror of each glyph |
virtual void vtkTensorGlyph::SymmetricOff |
( |
|
) |
[virtual] |
|
|
Turn on/off drawing a mirror of each glyph |
virtual void vtkTensorGlyph::SetLength |
( |
double |
|
) |
[virtual] |
|
|
Set/Get the distance, along x, from the origin to the end of the source glyph. It is used to draw the symmetric glyphs. |
virtual double vtkTensorGlyph::GetLength |
( |
|
) |
[virtual] |
|
|
Set/Get the distance, along x, from the origin to the end of the source glyph. It is used to draw the symmetric glyphs. |
virtual void vtkTensorGlyph::SetExtractEigenvalues |
( |
int |
|
) |
[virtual] |
|
|
Turn on/off extraction of eigenvalues from tensor. |
virtual void vtkTensorGlyph::ExtractEigenvaluesOn |
( |
|
) |
[virtual] |
|
|
Turn on/off extraction of eigenvalues from tensor. |
virtual void vtkTensorGlyph::ExtractEigenvaluesOff |
( |
|
) |
[virtual] |
|
|
Turn on/off extraction of eigenvalues from tensor. |
virtual int vtkTensorGlyph::GetExtractEigenvalues |
( |
|
) |
[virtual] |
|
|
Turn on/off extraction of eigenvalues from tensor. |
virtual void vtkTensorGlyph::SetColorGlyphs |
( |
int |
|
) |
[virtual] |
|
|
Turn on/off coloring of glyph with input scalar data or eigenvalues. If false, or input scalar data not present, then the scalars from the source object are passed through the filter. |
virtual int vtkTensorGlyph::GetColorGlyphs |
( |
|
) |
[virtual] |
|
|
Turn on/off coloring of glyph with input scalar data or eigenvalues. If false, or input scalar data not present, then the scalars from the source object are passed through the filter. |
virtual void vtkTensorGlyph::ColorGlyphsOn |
( |
|
) |
[virtual] |
|
|
Turn on/off coloring of glyph with input scalar data or eigenvalues. If false, or input scalar data not present, then the scalars from the source object are passed through the filter. |
virtual void vtkTensorGlyph::ColorGlyphsOff |
( |
|
) |
[virtual] |
|
|
Turn on/off coloring of glyph with input scalar data or eigenvalues. If false, or input scalar data not present, then the scalars from the source object are passed through the filter. |
virtual void vtkTensorGlyph::SetColorMode |
( |
int |
|
) |
[virtual] |
|
|
Set the color mode to be used for the glyphs. This can be set to use the input scalars (default) or to use the eigenvalues at the point. If ThreeGlyphs is set and the eigenvalues are chosen for coloring then each glyph is colored by the corresponding eigenvalue and if not set the color corresponding to the largest eigenvalue is chosen. The recognized values are: COLOR_BY_SCALARS = 0 (default) COLOR_BY_EIGENVALUES = 1 |
virtual int vtkTensorGlyph::GetColorMode |
( |
|
) |
[virtual] |
|
|
Set the color mode to be used for the glyphs. This can be set to use the input scalars (default) or to use the eigenvalues at the point. If ThreeGlyphs is set and the eigenvalues are chosen for coloring then each glyph is colored by the corresponding eigenvalue and if not set the color corresponding to the largest eigenvalue is chosen. The recognized values are: COLOR_BY_SCALARS = 0 (default) COLOR_BY_EIGENVALUES = 1 |
void vtkTensorGlyph::SetColorModeToScalars |
( |
|
) |
[inline] |
|
|
Set the color mode to be used for the glyphs. This can be set to use the input scalars (default) or to use the eigenvalues at the point. If ThreeGlyphs is set and the eigenvalues are chosen for coloring then each glyph is colored by the corresponding eigenvalue and if not set the color corresponding to the largest eigenvalue is chosen. The recognized values are: COLOR_BY_SCALARS = 0 (default) COLOR_BY_EIGENVALUES = 1
Definition at line 184 of file vtkTensorGlyph.h. |
void vtkTensorGlyph::SetColorModeToEigenvalues |
( |
|
) |
[inline] |
|
|
Set the color mode to be used for the glyphs. This can be set to use the input scalars (default) or to use the eigenvalues at the point. If ThreeGlyphs is set and the eigenvalues are chosen for coloring then each glyph is colored by the corresponding eigenvalue and if not set the color corresponding to the largest eigenvalue is chosen. The recognized values are: COLOR_BY_SCALARS = 0 (default) COLOR_BY_EIGENVALUES = 1
Definition at line 186 of file vtkTensorGlyph.h. |
virtual void vtkTensorGlyph::SetClampScaling |
( |
int |
|
) |
[virtual] |
|
|
Turn on/off scalar clamping. If scalar clamping is on, the ivar MaxScaleFactor is used to control the maximum scale factor. (This is useful to prevent uncontrolled scaling near singularities.) |
virtual int vtkTensorGlyph::GetClampScaling |
( |
|
) |
[virtual] |
|
|
Turn on/off scalar clamping. If scalar clamping is on, the ivar MaxScaleFactor is used to control the maximum scale factor. (This is useful to prevent uncontrolled scaling near singularities.) |
virtual void vtkTensorGlyph::ClampScalingOn |
( |
|
) |
[virtual] |
|
|
Turn on/off scalar clamping. If scalar clamping is on, the ivar MaxScaleFactor is used to control the maximum scale factor. (This is useful to prevent uncontrolled scaling near singularities.) |
virtual void vtkTensorGlyph::ClampScalingOff |
( |
|
) |
[virtual] |
|
|
Turn on/off scalar clamping. If scalar clamping is on, the ivar MaxScaleFactor is used to control the maximum scale factor. (This is useful to prevent uncontrolled scaling near singularities.) |
virtual void vtkTensorGlyph::SetMaxScaleFactor |
( |
double |
|
) |
[virtual] |
|
|
Set/Get the maximum allowable scale factor. This value is compared to the combination of the scale factor times the eigenvalue. If less, the scale factor is reset to the MaxScaleFactor. The boolean ClampScaling has to be "on" for this to work. |
virtual double vtkTensorGlyph::GetMaxScaleFactor |
( |
|
) |
[virtual] |
|
|
Set/Get the maximum allowable scale factor. This value is compared to the combination of the scale factor times the eigenvalue. If less, the scale factor is reset to the MaxScaleFactor. The boolean ClampScaling has to be "on" for this to work. |
|
This is called by the superclass. This is the method you should override.
Reimplemented from vtkPolyDataAlgorithm. |
virtual int vtkTensorGlyph::FillInputPortInformation |
( |
int |
port, |
|
|
vtkInformation * |
info |
|
) |
[protected, virtual] |
|
|
Fill the input port information objects for this algorithm. This is invoked by the first call to GetInputPortInformation for each port so subclasses can specify what they can handle.
Reimplemented from vtkPolyDataAlgorithm. |
Member Data Documentation
The documentation for this class was generated from the following file:
Generated on Tue Jan 22 00:21:22 2008 for VTK by
1.4.3-20050530