Slicer  4.11
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
List of all members | Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes
vtkDiffusionTensorGlyph Class Reference

scale and orient glyph(s) according to tensor eigenvalues and eigenvectors. More...

#include <Libs/vtkTeem/vtkDiffusionTensorGlyph.h>

Inheritance diagram for vtkDiffusionTensorGlyph:
Inheritance graph
[legend]
Collaboration diagram for vtkDiffusionTensorGlyph:
Collaboration graph
[legend]

Public Types

typedef vtkTensorGlyph Superclass
 

Public Member Functions

void ColorGlyphsByFractionalAnisotropy ()
 
void ColorGlyphsByLinearMeasure ()
 TO DO: make more of these. More...
 
void ColorGlyphsByMaxEigenvalue ()
 
void ColorGlyphsByMidEigenvalue ()
 
void ColorGlyphsByMinEigenvalue ()
 
void ColorGlyphsByOrientation ()
 
Output R,G,B scalars according to orientation of max eigenvalue More...
 
void ColorGlyphsByParallelDiffusivity ()
 
void ColorGlyphsByPerpendicularDiffusivity ()
 
void ColorGlyphsByPlanarMeasure ()
 
void ColorGlyphsByRelativeAnisotropy ()
 
void ColorGlyphsBySphericalMeasure ()
 
void ColorGlyphsByTrace ()
 
virtual const char * GetClassName ()
 
virtual int * GetDimensionResolution ()
 
virtual void GetDimensionResolution (int &, int &)
 
virtual void GetDimensionResolution (int [2])
 
virtual int GetMaskGlyphs ()
 
vtkMTimeType GetMTime () override
 
virtual int GetResolution ()
 
virtual vtkMatrix4x4 * GetTensorRotationMatrix ()
 
virtual vtkMatrix4x4 * GetVolumePositionMatrix ()
 
virtual int IsA (const char *type)
 
virtual void MaskGlyphsOff ()
 
virtual void MaskGlyphsOn ()
 
If MaskGlyphs is 1 (On), Mask is used to mask tensors. More...
 
void PrintSelf (ostream &os, vtkIndent indent) override
 
void SetDimensionResolution (int [2])
 
virtual void SetDimensionResolution (int, int)
 
virtual void SetMask (vtkImageData *)
 
virtual void SetMaskGlyphs (int)
 
virtual void SetResolution (int)
 
virtual void SetTensorRotationMatrix (vtkMatrix4x4 *)
 
virtual void SetVolumePositionMatrix (vtkMatrix4x4 *)
 

Static Public Member Functions

static int IsTypeOf (const char *type)
 
static vtkDiffusionTensorGlyphNew ()
 
static vtkDiffusionTensorGlyphSafeDownCast (vtkObject *o)
 

Protected Member Functions

void ColorGlyphsBy (int measure)
 
int RequestData (vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
 
 vtkDiffusionTensorGlyph ()
 
 ~vtkDiffusionTensorGlyph () override
 

Protected Attributes

int DimensionResolution [2]
 allows skipping some tensors for lower resolution glyphing More...
 
vtkImageData * Mask
 
int MaskGlyphs
 which function of eigenvalues to use for coloring More...
 
int Resolution
 mask glyphs outside of the brain for example, using the Mask More...
 
int ScalarInvariant
 
vtkMatrix4x4 * TensorRotationMatrix
 
vtkMatrix4x4 * VolumePositionMatrix
 

Detailed Description

scale and orient glyph(s) according to tensor eigenvalues and eigenvectors.

vtkDiffusionTensorGlyph 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.

To accommodate display in another coordinate system besides the ijk coordinate system of the volume array, two matrices are provided. The VolumePosition matrix positions each tensor in the correct location to account for voxel translation and rotation of the volume. (Scaling is already handled well in vtk ImageData.) The TensorRotationMatrix rotates each tensor into the new coordinate system.

Types of scalars that may be generated from tensors for coloring are defined in vtkDiffusionTensorMathematics.h. If the ColorMode is set to Eigenvalues, then glyphs are colored according to a function of the eigenvalues. These functions are scalar invariants of the diffusion tensor. They are selected by calling ColorGlyphsByFractionalAnisotropy, etc.

See also
vtkTensorGlyph
vtkDiffusionTensorMathematics
vtkSuperquadricTensorGlyph

Definition at line 71 of file vtkDiffusionTensorGlyph.h.

Member Typedef Documentation

◆ Superclass

typedef vtkTensorGlyph vtkDiffusionTensorGlyph::Superclass

Definition at line 74 of file vtkDiffusionTensorGlyph.h.

Constructor & Destructor Documentation

◆ vtkDiffusionTensorGlyph()

vtkDiffusionTensorGlyph::vtkDiffusionTensorGlyph ( )
protected

◆ ~vtkDiffusionTensorGlyph()

vtkDiffusionTensorGlyph::~vtkDiffusionTensorGlyph ( )
overrideprotected

Member Function Documentation

◆ ColorGlyphsBy()

void vtkDiffusionTensorGlyph::ColorGlyphsBy ( int  measure)
protected

◆ ColorGlyphsByFractionalAnisotropy()

void vtkDiffusionTensorGlyph::ColorGlyphsByFractionalAnisotropy ( )

◆ ColorGlyphsByLinearMeasure()

void vtkDiffusionTensorGlyph::ColorGlyphsByLinearMeasure ( )

TO DO: make more of these.

Output one component scalars according to scalar invariants

◆ ColorGlyphsByMaxEigenvalue()

void vtkDiffusionTensorGlyph::ColorGlyphsByMaxEigenvalue ( )

◆ ColorGlyphsByMidEigenvalue()

void vtkDiffusionTensorGlyph::ColorGlyphsByMidEigenvalue ( )

◆ ColorGlyphsByMinEigenvalue()

void vtkDiffusionTensorGlyph::ColorGlyphsByMinEigenvalue ( )

◆ ColorGlyphsByOrientation()

void vtkDiffusionTensorGlyph::ColorGlyphsByOrientation ( )


Output R,G,B scalars according to orientation of max eigenvalue

◆ ColorGlyphsByParallelDiffusivity()

void vtkDiffusionTensorGlyph::ColorGlyphsByParallelDiffusivity ( )

◆ ColorGlyphsByPerpendicularDiffusivity()

void vtkDiffusionTensorGlyph::ColorGlyphsByPerpendicularDiffusivity ( )

◆ ColorGlyphsByPlanarMeasure()

void vtkDiffusionTensorGlyph::ColorGlyphsByPlanarMeasure ( )

◆ ColorGlyphsByRelativeAnisotropy()

void vtkDiffusionTensorGlyph::ColorGlyphsByRelativeAnisotropy ( )

◆ ColorGlyphsBySphericalMeasure()

void vtkDiffusionTensorGlyph::ColorGlyphsBySphericalMeasure ( )

◆ ColorGlyphsByTrace()

void vtkDiffusionTensorGlyph::ColorGlyphsByTrace ( )

◆ GetClassName()

virtual const char* vtkDiffusionTensorGlyph::GetClassName ( )
virtual

◆ GetDimensionResolution() [1/3]

virtual void vtkDiffusionTensorGlyph::GetDimensionResolution ( int  [2])
virtual

◆ GetDimensionResolution() [2/3]

virtual int* vtkDiffusionTensorGlyph::GetDimensionResolution ( )
virtual

Resolution of the output glyphs in each dimension. It is used only if Dimensions is set > 1 . This parameter is a integer value that sets the number of tensors (points) that are skipped before a glyph is rendered. 1 is the finest level meaning that every input point a glyph is rendered.

◆ GetDimensionResolution() [3/3]

virtual void vtkDiffusionTensorGlyph::GetDimensionResolution ( int &  ,
int &   
)
virtual

◆ GetMaskGlyphs()

virtual int vtkDiffusionTensorGlyph::GetMaskGlyphs ( )
virtual

◆ GetMTime()

vtkMTimeType vtkDiffusionTensorGlyph::GetMTime ( )
override

When determining the modified time of the filter, this checks the modified time of the mask input, if it exists.

◆ GetResolution()

virtual int vtkDiffusionTensorGlyph::GetResolution ( )
virtual

◆ GetTensorRotationMatrix()

virtual vtkMatrix4x4* vtkDiffusionTensorGlyph::GetTensorRotationMatrix ( )
virtual

◆ GetVolumePositionMatrix()

virtual vtkMatrix4x4* vtkDiffusionTensorGlyph::GetVolumePositionMatrix ( )
virtual

◆ IsA()

virtual int vtkDiffusionTensorGlyph::IsA ( const char *  type)
virtual

◆ IsTypeOf()

static int vtkDiffusionTensorGlyph::IsTypeOf ( const char *  type)
static

◆ MaskGlyphsOff()

virtual void vtkDiffusionTensorGlyph::MaskGlyphsOff ( )
virtual

◆ MaskGlyphsOn()

virtual void vtkDiffusionTensorGlyph::MaskGlyphsOn ( )
virtual


If MaskGlyphs is 1 (On), Mask is used to mask tensors.

◆ New()

static vtkDiffusionTensorGlyph* vtkDiffusionTensorGlyph::New ( )
static

Description Construct object with defaults: Scaling is by eigenvalues on and scale factor is 1000. Glyphs are colored with FA scalar invariant.

◆ PrintSelf()

void vtkDiffusionTensorGlyph::PrintSelf ( ostream &  os,
vtkIndent  indent 
)
override

◆ RequestData()

int vtkDiffusionTensorGlyph::RequestData ( vtkInformation *  ,
vtkInformationVector **  ,
vtkInformationVector *   
)
overrideprotected

◆ SafeDownCast()

static vtkDiffusionTensorGlyph* vtkDiffusionTensorGlyph::SafeDownCast ( vtkObject *  o)
static

◆ SetDimensionResolution() [1/2]

void vtkDiffusionTensorGlyph::SetDimensionResolution ( int  [2])

◆ SetDimensionResolution() [2/2]

virtual void vtkDiffusionTensorGlyph::SetDimensionResolution ( int  ,
int   
)
virtual

◆ SetMask()

virtual void vtkDiffusionTensorGlyph::SetMask ( vtkImageData *  )
virtual

Input scalars are a binary mask: 0 prevents display of polydata at that point

◆ SetMaskGlyphs()

virtual void vtkDiffusionTensorGlyph::SetMaskGlyphs ( int  )
virtual

◆ SetResolution()

virtual void vtkDiffusionTensorGlyph::SetResolution ( int  )
virtual

Resolution of the output glyphs. This parameter is a integer value that sets the number of tensors (points) that are skipped before a glyph is rendered. 1 is the finest level meaning that every input point a glyph is rendered.

◆ SetTensorRotationMatrix()

virtual void vtkDiffusionTensorGlyph::SetTensorRotationMatrix ( vtkMatrix4x4 *  )
virtual

Description Transform output glyph orientations by this matrix. Example usage is as follows: 1) If tensors are to be displayed in a coordinate system that is not IJK (array-based), and the whole volume is being rotated, each tensor needs also to be rotated. First find the matrix that positions your volume. This is how the entire volume is positioned, not the matrix that positions an arbitrary reformatted slice. 2) Remove scaling and translation from this matrix; we just need to rotate each tensor. 3) Set TensorRotationMatrix to this rotation matrix.

◆ SetVolumePositionMatrix()

virtual void vtkDiffusionTensorGlyph::SetVolumePositionMatrix ( vtkMatrix4x4 *  )
virtual

Description Transform output glyph locations (not orientations!) by this matrix. Example usage is as follows: 1) Reformat a slice through a tensor volume. 2) Set VolumePositionMatrix to the reformat matrix. This is analogous to setting the actor's UserMatrix to this matrix, which only works for scalar data. 3) The output glyphs are positioned correctly without incorrectly rotating the tensors, as would be the case if positioning the scene's actor with this matrix.

Member Data Documentation

◆ DimensionResolution

int vtkDiffusionTensorGlyph::DimensionResolution[2]
protected

allows skipping some tensors for lower resolution glyphing

Definition at line 182 of file vtkDiffusionTensorGlyph.h.

◆ Mask

vtkImageData* vtkDiffusionTensorGlyph::Mask
protected

Definition at line 187 of file vtkDiffusionTensorGlyph.h.

◆ MaskGlyphs

int vtkDiffusionTensorGlyph::MaskGlyphs
protected

which function of eigenvalues to use for coloring

Definition at line 179 of file vtkDiffusionTensorGlyph.h.

◆ Resolution

int vtkDiffusionTensorGlyph::Resolution
protected

mask glyphs outside of the brain for example, using the Mask

Definition at line 180 of file vtkDiffusionTensorGlyph.h.

◆ ScalarInvariant

int vtkDiffusionTensorGlyph::ScalarInvariant
protected

Definition at line 178 of file vtkDiffusionTensorGlyph.h.

◆ TensorRotationMatrix

vtkMatrix4x4* vtkDiffusionTensorGlyph::TensorRotationMatrix
protected

Definition at line 185 of file vtkDiffusionTensorGlyph.h.

◆ VolumePositionMatrix

vtkMatrix4x4* vtkDiffusionTensorGlyph::VolumePositionMatrix
protected

Definition at line 184 of file vtkDiffusionTensorGlyph.h.


The documentation for this class was generated from the following file: