ITK Working Group DTI: Difference between revisions

From KitwarePublic
Jump to navigationJump to search
No edit summary
No edit summary
 
Line 3: Line 3:
This page is intended to list proposals for changes to ITK to improve the processing of diffusion weighted and diffusion tensor images.
This page is intended to list proposals for changes to ITK to improve the processing of diffusion weighted and diffusion tensor images.


= Bugs =
== casting support ==
# neither itkDiffusionTensor3D or itkSymmetricSecondRankTensor have full numericTraits. DiffusionTensor3D doesn't have any.
neither itkDiffusionTensor3D or itkSymmetricSecondRankTensor have full numericTraits. DiffusionTensor3D doesn't have any.
# static_cast< DT > doesn't work. incorporating constructors like
 
static_cast< diffusionTensor3d > doesn't work. incorporating constructors like the following to both classes would enable casting.
  template < typename TCoordRepB >
  template < typename TCoordRepB >
  SymmetricSecondRankTensor( const SymmetricSecondRankTensor<TCoordRepB,NDimension> & pa ): BaseArray(pa) { };
  SymmetricSecondRankTensor( const SymmetricSecondRankTensor<TCoordRepB,NDimension> & pa ): BaseArray(pa) { };
would allow this type of casting
 
# the pre/post multiply methods in itkSymmetricSecondRankTensor have the wrong api [http://www.itk.org/Bug/view.php?id=8574 bug0008574]
== Pre/Post Multiply ==
the product of a symmetric matrix and a matrix is not symmetric. A possible solution may be this.
the pre/post multiply methods in itkSymmetricSecondRankTensor have the wrong api [http://www.itk.org/Bug/view.php?id=8574 bug0008574]
add to itkSymmetricSecondRankTensor
the product of a symmetric matrix and a matrix is not symmetric.
 
A possible solution may be to add a method like
  Self PreMultiply( const Self & m ) const;
  Self PreMultiply( const Self & m ) const;
this is ok because a sym matrix times a sym matrix is still symmetric.
which is ok because a sym matrix times a sym matrix is still symmetric. and then to modify
modify
  Self PreMultiply( const MatrixType & m ) const;
  Self PreMultiply( const MatrixType & m ) const;
to check if m is symmetric, if it is then call Premultiply( static_cast<Self> m) if m isn't throw an exception.
to check if m is symmetric, if it is then call Premultiply( static_cast<Self> m) if m isn't throw an exception.
Granted this might break existing code, however it will only break code that was giving incorrect results. I think that is preferable to maintaining the status quo.
 
Granted this will break existing code, however it will only break code that was giving incorrect results. I think that is preferable to maintaining the status quo.
   
   
= Feature Requests =
== Rotation ==
# A rotate method should be implemented [http://www.itk.org/Bug/view.php?id=8574 bug0008574] in itkSymmetricSecondRankTensor. I propose the following signatures to enable some generality.
A rotate method should be implemented [http://www.itk.org/Bug/view.php?id=8574 bug0008574] in itkSymmetricSecondRankTensor. I propose the following signatures to enable some generality.
   template<typename TMatrixValueType>
   template<typename TMatrixValueType>
   Self Rotate( const Matrix<TMatrixValueType, NDimension, NDimension> & m);
   Self Rotate( const Matrix<TMatrixValueType, NDimension, NDimension> & m);
Line 33: Line 36:
     return this->Rotate( static_cast<Matrix<TMatrixValueType> >(m) );
     return this->Rotate( static_cast<Matrix<TMatrixValueType> >(m) );
   }
   }
# adds support for the log-euclidean metric for dti.
 
## add GetMatrixExp( ) to SymmetricSecondRankTensor which computes the matrix exponential and returns a SymmetricSecondRankTensor
additionally the application of a transform to dti images necesitates the computation of the spatial jacobian at the points of interest.
## add GetMatrixLog()  to DiffusionTensor3D, which computes the matrix log and returns a SymmetricSecondRankTensor
[http://www.itk.org/Bug/view.php?id=8786 bug0008786]. This bug proposed putting a numeric version of this computation in itkTransform, and to allow specific classes to override this method with analytical solutions.
## add a naryMeanImagefilter that uses the log-euc metric to compute the means.
 
# Add tests for everything.
== log-euclidean metric ==
2 methods are needed to implement the log-euclidean metic
# add GetMatrixExp( ) to SymmetricSecondRankTensor which computes the matrix exponential and returns a SymmetricSecondRankTensor
# add GetMatrixLog()  to DiffusionTensor3D, which computes the matrix log and returns a SymmetricSecondRankTensor




{{ITK/Template/Footer}}
{{ITK/Template/Footer}}

Latest revision as of 22:45, 24 April 2009

Motivation

This page is intended to list proposals for changes to ITK to improve the processing of diffusion weighted and diffusion tensor images.

casting support

neither itkDiffusionTensor3D or itkSymmetricSecondRankTensor have full numericTraits. DiffusionTensor3D doesn't have any.

static_cast< diffusionTensor3d > doesn't work. incorporating constructors like the following to both classes would enable casting.

template < typename TCoordRepB >
SymmetricSecondRankTensor( const SymmetricSecondRankTensor<TCoordRepB,NDimension> & pa ): BaseArray(pa) { };

Pre/Post Multiply

the pre/post multiply methods in itkSymmetricSecondRankTensor have the wrong api bug0008574 the product of a symmetric matrix and a matrix is not symmetric.

A possible solution may be to add a method like

Self PreMultiply( const Self & m ) const;

which is ok because a sym matrix times a sym matrix is still symmetric. and then to modify

Self PreMultiply( const MatrixType & m ) const;

to check if m is symmetric, if it is then call Premultiply( static_cast<Self> m) if m isn't throw an exception.

Granted this will break existing code, however it will only break code that was giving incorrect results. I think that is preferable to maintaining the status quo.

Rotation

A rotate method should be implemented bug0008574 in itkSymmetricSecondRankTensor. I propose the following signatures to enable some generality.

 template<typename TMatrixValueType>
 Self Rotate( const Matrix<TMatrixValueType, NDimension, NDimension> & m);
 template<typename TMatrixValueType>
 Self Rotate( const vnl_matrix_fixed<TMatrixValueType, NDimension, NDimension> & m)
 {
   return this->Rotate( static_cast<Matrix<TMatrixValueType, NDimension, NDimension> >(m) );
 }
 template<typename TMatrixValueType>
 Self Rotate( const vnl_matrix<TMatrixValueType> & m)
 {
   return this->Rotate( static_cast<Matrix<TMatrixValueType> >(m) );
 }

additionally the application of a transform to dti images necesitates the computation of the spatial jacobian at the points of interest. bug0008786. This bug proposed putting a numeric version of this computation in itkTransform, and to allow specific classes to override this method with analytical solutions.

log-euclidean metric

2 methods are needed to implement the log-euclidean metic

  1. add GetMatrixExp( ) to SymmetricSecondRankTensor which computes the matrix exponential and returns a SymmetricSecondRankTensor
  2. add GetMatrixLog() to DiffusionTensor3D, which computes the matrix log and returns a SymmetricSecondRankTensor




ITK: [Welcome | Site Map]