CBICA Toolkit  1.0.0
DiffusionTensor3DReconstructionImageFilter< TReferenceImagePixelType, TGradientImagePixelType, TTensorPixelType > Class Template Reference

This class takes as input one or more reference image (acquired in the absence of diffusion sensitizing gradients) and 'n' diffusion weighted images and their gradient directions and computes an image of tensors. More...

#include <itkDiffusionTensor3DReconstructionImageFilter.h>

Inheritance diagram for DiffusionTensor3DReconstructionImageFilter< TReferenceImagePixelType, TGradientImagePixelType, TTensorPixelType >:
Collaboration diagram for DiffusionTensor3DReconstructionImageFilter< TReferenceImagePixelType, TGradientImagePixelType, TTensorPixelType >:

Public Types

typedef vnl_matrix< double > CoefficientMatrixType
 
typedef SmartPointer< const SelfConstPointer
 
typedef VectorContainer< unsigned int, GradientDirectionTypeGradientDirectionContainerType
 Container to hold gradient directions of the 'n' DW measurements.
 
typedef vnl_vector_fixed< double, 3 > GradientDirectionType
 Holds each magnetic field gradient used to acquire one DWImage.
 
typedef VectorImage< GradientPixelType, 3 > GradientImagesType
 An alternative typedef defining one (of the many) gradient images. More...
 
typedef Image< GradientPixelType, 3 > GradientImageType
 Typedef defining one (of the many) gradient images. More...
 
typedef TGradientImagePixelType GradientPixelType
 
typedef ImageMaskType::Pointer ImageMaskPointer
 
typedef SpatialObject< 3 > ImageMaskType
 Type for the mask of the fixed image. More...
 
typedef Superclass::OutputImageRegionType OutputImageRegionType
 
typedef TensorImageType OutputImageType
 
typedef SmartPointer< SelfPointer
 
typedef Superclass::InputImageType ReferenceImageType
 Reference image data, This image is acquired in the absence of a diffusion sensitizing field gradient.
 
typedef TReferenceImagePixelType ReferencePixelType
 
typedef VectorImage< GradientPixelType, 3 > ResidualImageType
 Typedef defining the residual image. More...
 
typedef ResidualImageType::PixelType ResidualPixelType
 
typedef DiffusionTensor3DReconstructionImageFilter Self
 
typedef ImageToImageFilter< Image< TReferenceImagePixelType, 3 >, Image< DiffusionTensor3D< TTensorPixelType >, 3 > > Superclass
 
typedef vnl_matrix_fixed< double, 6, 6 > TensorBasisInverseMatrixType
 
typedef vnl_matrix_fixed< double, 6, 6 > TensorBasisMatrixType
 Holds the tensor basis coefficients G_k.
 
typedef TensorPixelType::EigenValuesArrayType TensorEigenValuesType
 
typedef TensorPixelType::EigenVectorsMatrixType TensorEigenVectorsType
 
typedef Image< TensorPixelType, 3 > TensorImageType
 
typedef TensorPixelType::MatrixType TensorMatrixType
 
typedef DiffusionTensor3D< TTensorPixelType > TensorPixelType
 

Public Member Functions

void AddGradientImage (const GradientDirectionType &, const GradientImageType *image)
 Set method to add a gradient direction and its corresponding image. More...
 
virtual GradientDirectionType GetGradientDirection (unsigned int idx) const
 Return the gradient direction. More...
 
virtual ReferenceImageTypeGetReferenceImage ()
 Get reference image.
 
 itkGetConstObjectMacro (ImageMask, ImageMaskType)
 
 itkGetConstObjectMacro (ResidualImage, ResidualImageType)
 Get the Residual image . More...
 
 itkGetConstReferenceMacro (BValue, TTensorPixelType)
 
 itkGetMacro (Threshold, ReferencePixelType)
 
 itkGetMacro (CalculateResidualImage, bool)
 
 itkNewMacro (Self)
 Method for creation through the object factory. More...
 
 itkSetMacro (Threshold, ReferencePixelType)
 Threshold on the reference image data. More...
 
 itkSetMacro (CalculateResidualImage, bool)
 Get/set compute residuals flag. More...
 
 itkSetMacro (BValue, TTensorPixelType)
 The BValue $ (s/mm^2) $ value used in normalizing the tensors to physically meaningful units. More...
 
 itkSetObjectMacro (ImageMask, ImageMaskType)
 Set/Get the image mask. More...
 
 itkTypeMacro (DiffusionTensor3DReconstructionImageFilter, ImageToImageFilter)
 Runtime information support. More...
 
void SetGradientImage (GradientDirectionContainerType *, const GradientImagesType *image)
 Another set method to add a gradient directions and its corresponding image. More...
 
void SetReferenceImage (ReferenceImageType *referenceImage)
 Set method to set the reference image. More...
 

Protected Types

enum  GradientImageTypeEnumeration { GradientIsInASingleImage = 1, GradientIsInManyImages, Else }
 enum to indicate if the gradient image is specified as a single multi- component image or as several separate images
 

Protected Member Functions

void BeforeThreadedGenerateData ()
 
ResidualPixelType ComputeResidual (vnl_vector< double >, TensorPixelType, double)
 
void ComputeTensorBasis ()
 
void PrintSelf (std::ostream &os, Indent indent) const
 
void ThreadedGenerateData (const OutputImageRegionType &outputRegionForThread, int)
 

Detailed Description

template<class TReferenceImagePixelType, class TGradientImagePixelType = TReferenceImagePixelType, class TTensorPixelType = double>
class itk::DiffusionTensor3DReconstructionImageFilter< TReferenceImagePixelType, TGradientImagePixelType, TTensorPixelType >

This class takes as input one or more reference image (acquired in the absence of diffusion sensitizing gradients) and 'n' diffusion weighted images and their gradient directions and computes an image of tensors.

(with DiffusionTensor3D as the pixel type). Once that is done, you can apply filters on this tensor image to compute FA, ADC, RGB weighted maps etc.

sbia additions to itk DiffusionTensor3DRecon Filter added a spatial Object as a mask. added cludge to fix nonSPD tensors. at the moment only this just takes abs of any negative eigenvalues. Posible future direction is to include spd constrain when this occurs.

Inputs and Usage
There are two ways to use this class. When you have one reference image and n gradient images, you would use the class as
filter->SetReferenceImage( image0 );
filter->AddGradientImage( direction1, image1 );
filter->AddGradientImage( direction2, image2 );
...
When you have the 'n' gradient and one or more reference images in a single multi-component image (VectorImage), you can specify the images simply as
filter->SetGradientImage( directionsContainer, vectorImage );
Note that this method is used to specify both the reference and gradient images. This is convenient when the DWI images are read in using the NRRD format. Like the Nrrd format, the reference images are those components of the vectorImage whose gradient direction is (0,0,0). If more than one reference image is present, they are averaged prior to applying the Stejskal-Tanner equations.
Outputs
The output image is an image of Tensors:
Image< DiffusionTensor3D< TTensorPixelType >, 3 >
Parameters
  • Threshold - Threshold on the reference image data. The output tensor will be a null tensor for pixels in the reference image that have a value less than this.
  • BValue - See the documentation of SetBValue().
  • At least 6 gradient images must be specified for the filter to be able to run.
Template parameters
The class is templated over the pixel type of the reference and gradient images (expected to be scalar data types) and the internal representation of the DiffusionTensor3D pixel (double, float etc).
References:
  • [1] C.F.Westin, S.E.Maier, H.Mamata, A.Nabavi, F.A.Jolesz, R.Kikinis, "Processing and visualization for Diffusion tensor MRI", Medical image Analysis, 2002, pp 93-108.
  • [2] A Dual Tensor Basis Solution to the Stejskal-Tanner Equations for DT-MRI
WARNING:
Although this filter has been written to support multiple threads, please set the number of threads to 1.
filter->SetNumberOfThreads(1);
This is due to buggy code in netlib/dsvdc, that is called by vnl_svd. (used to compute the psudo-inverse to find the dual tensor basis).
Author
Thanks to Xiaodong Tao, GE, for contributing parts of this class. Also thanks to Casey Goodlet, UNC for patches to support multiple baseline images and other improvements.
Note
This work is part of the National Alliance for Medical image Computing (NAMIC), funded by the National Institutes of Health through the NIH Roadmap for Medical Research, Grant U54 EB005149.
Examples and Datasets
See Examples/Filtering/DiffusionTensor3DReconstructionImageFilter.cxx Sample DTI datasets may be obtained from \begin verbatim ftp://public.kitware.com/pub/namic/DTI/Data/dwi.nhdr ftp://public.kitware.com/pub/namic/DTI/Data/dwi.img.gz ( gunzip this ) \end verbatim
See also
DiffusionTensor3D SymmetricSecondRankTensor

Member Typedef Documentation

◆ GradientImagesType

typedef VectorImage< GradientPixelType, 3 > GradientImagesType

An alternative typedef defining one (of the many) gradient images.

It will be assumed that the vectorImage has the same dimension as the Reference image and a vector length parameter of n (number of gradient directions)

◆ GradientImageType

typedef Image< GradientPixelType, 3 > GradientImageType

Typedef defining one (of the many) gradient images.

◆ ImageMaskType

typedef SpatialObject< 3 > ImageMaskType

Type for the mask of the fixed image.

Only pixels that are "inside" this mask will be considered for the computation of the metric

◆ ResidualImageType

typedef VectorImage< GradientPixelType, 3 > ResidualImageType

Typedef defining the residual image.

Member Function Documentation

◆ AddGradientImage()

void AddGradientImage ( const GradientDirectionType ,
const GradientImageType image 
)

Set method to add a gradient direction and its corresponding image.

◆ GetGradientDirection()

virtual GradientDirectionType GetGradientDirection ( unsigned int  idx) const
inlinevirtual

Return the gradient direction.

idx is 0 based

◆ itkGetConstObjectMacro()

itkGetConstObjectMacro ( ResidualImage  ,
ResidualImageType   
)

Get the Residual image .

◆ itkNewMacro()

itkNewMacro ( Self  )

Method for creation through the object factory.

◆ itkSetMacro() [1/3]

itkSetMacro ( Threshold  ,
ReferencePixelType   
)

Threshold on the reference image data.

The output tensor will be a null tensor for pixels in the reference image that have a value less than this threshold.

◆ itkSetMacro() [2/3]

itkSetMacro ( CalculateResidualImage  ,
bool   
)

Get/set compute residuals flag.

◆ itkSetMacro() [3/3]

itkSetMacro ( BValue  ,
TTensorPixelType   
)

The BValue $ (s/mm^2) $ value used in normalizing the tensors to physically meaningful units.

See equation (24) of the first reference for a description of how this is applied to the tensor estimation. Equation (1) of the same reference describes the physical significance.

◆ itkSetObjectMacro()

itkSetObjectMacro ( ImageMask  ,
ImageMaskType   
)

Set/Get the image mask.

◆ itkTypeMacro()

itkTypeMacro ( DiffusionTensor3DReconstructionImageFilter< TReferenceImagePixelType, TGradientImagePixelType, TTensorPixelType >  ,
ImageToImageFilter   
)

Runtime information support.

◆ SetGradientImage()

void SetGradientImage ( GradientDirectionContainerType ,
const GradientImagesType image 
)

Another set method to add a gradient directions and its corresponding image.

The image here is a VectorImage. The user is expected to pass the gradient directions in a container. The ith element of the container corresponds to the gradient direction of the ith component image the VectorImage. For the baseline image, a vector of all zeros should be set.

◆ SetReferenceImage()

void SetReferenceImage ( ReferenceImageType referenceImage)
inline

Set method to set the reference image.


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