ITK Working Group DTI: Difference between revisions
From KitwarePublic
Jump to navigationJump to search
(New page: = Motivation = This page is intended to list proposals for changes to ITK to improve the processing of diffusion weighted and diffusion tensor images. {{ITK/Template/Footer}}) |
No edit summary |
||
Line 2: | Line 2: | ||
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 = | |||
# neither itkDiffusionTensor3D or itkSymmetricSecondRankTensor have full numericTraits. DiffusionTensor3D doesn't have any. | |||
# static_cast< DT > doesn't work. incorporating constructors like | |||
template < typename TCoordRepB > | |||
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] | |||
the product of a symmetric matrix and a matrix is not symmetric. A possible solution may be this. | |||
add to itkSymmetricSecondRankTensor | |||
Self PreMultiply( const Self & m ) const; | |||
this is ok because a sym matrix times a sym matrix is still symmetric. | |||
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 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. | |||
= Feature Requests = | |||
# 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> | |||
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) ); | |||
} | |||
# adds support for the log-euclidean metric for dti. | |||
## 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 | |||
## add a naryMeanImagefilter that uses the log-euc metric to compute the means. | |||
# Add tests for everything. | |||
{{ITK/Template/Footer}} | {{ITK/Template/Footer}} |
Revision as of 22:17, 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.
Bugs
- neither itkDiffusionTensor3D or itkSymmetricSecondRankTensor have full numericTraits. DiffusionTensor3D doesn't have any.
- static_cast< DT > doesn't work. incorporating constructors like
template < typename TCoordRepB > 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 bug0008574
the product of a symmetric matrix and a matrix is not symmetric. A possible solution may be this. add to itkSymmetricSecondRankTensor
Self PreMultiply( const Self & m ) const;
this is ok because a sym matrix times a sym matrix is still symmetric. 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 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.
Feature Requests
- 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) ); }
- adds support for the log-euclidean metric for dti.
- 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
- add a naryMeanImagefilter that uses the log-euc metric to compute the means.
- Add tests for everything.