NAME
vtkTensorGlyph - scale and orient glyph according to tensor eigenvalues and eigenvectors
SYNOPSIS
#include "/opt/vtk-c++/graphics/vtkTensorGlyph.h"
class VTK_EXPORT vtkTensorGlyph : public vtkDataSetToPolyDataFilter
vtkTensorGlyph();
static vtkTensorGlyph *New() {return new vtkTensorGlyph;};
const char *GetClassName() {return "vtkTensorGlyph";};
void PrintSelf(ostream& os, vtkIndent indent);
void Update();
void SetSource(vtkPolyData*);
void SetSource(vtkPolyData& );
vtkPolyData *GetSource();
void SetScaling(int);
int GetScaling();
void ScalingOn();
void ScalingOff();
void SetScaleFactor(float);
float GetScaleFactor();
void SetExtractEigenvalues(int);
void ExtractEigenvaluesOn();
void ExtractEigenvaluesOff();
int GetExtractEigenvalues();
void SetColorGlyphs(int);
int GetColorGlyphs();
void ColorGlyphsOn();
void ColorGlyphsOff();
void SetClampScaling(int);
int GetClampScaling();
void ClampScalingOn();
void ClampScalingOff();
void SetMaxScaleFactor(float);
float GetMaxScaleFactor();
DESCRIPTION
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. 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.
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.
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 (norm of column is eigenvalue). This allows additional capability over the vtkGlyph3D object. That is, the glyph can be oriented in three directions instead of one.
SEE ALSO
vtkGlyph3D vtkPointLoad vtkHyperStreamline
SUMMARY
void SetSource(vtkPolyData*)
void SetSource(vtkPolyData& )
Specify the geometry to copy to each point.
void SetScaling(int)
Turn on/off scaling of glyph with eigenvalues.
void SetScaleFactor(float)
Specify scale factor to scale object by. (Scale factor always affects output even if scaling is off.)
void SetExtractEigenvalues(int)
Turn on/off extraction of eigenvalues from tensor.
void SetColorGlyphs(int)
Turn on/off coloring of glyph with input scalar data. If false, or input scalar data not present, then the scalars from the source object are passed through the filter.
void SetClampScaling(int)
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.)
void SetMaxScaleFactor(float)
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.
void Update()
Override update method because execution can branch two ways (via Input and Source objects).