https://public.kitware.com/Wiki/api.php?action=feedcontributions&user=Lbloy&feedformat=atomKitwarePublic - User contributions [en]2024-03-28T21:35:27ZUser contributionsMediaWiki 1.38.6https://public.kitware.com/Wiki/index.php?title=ITK_Working_Group_DTI&diff=15109ITK Working Group DTI2009-04-24T22:45:28Z<p>Lbloy: </p>
<hr />
<div>= Motivation =<br />
<br />
This page is intended to list proposals for changes to ITK to improve the processing of diffusion weighted and diffusion tensor images.<br />
<br />
== casting support ==<br />
neither itkDiffusionTensor3D or itkSymmetricSecondRankTensor have full numericTraits. DiffusionTensor3D doesn't have any.<br />
<br />
static_cast< diffusionTensor3d > doesn't work. incorporating constructors like the following to both classes would enable casting.<br />
template < typename TCoordRepB ><br />
SymmetricSecondRankTensor( const SymmetricSecondRankTensor<TCoordRepB,NDimension> & pa ): BaseArray(pa) { };<br />
<br />
== Pre/Post Multiply ==<br />
the pre/post multiply methods in itkSymmetricSecondRankTensor have the wrong api [http://www.itk.org/Bug/view.php?id=8574 bug0008574]<br />
the product of a symmetric matrix and a matrix is not symmetric.<br />
<br />
A possible solution may be to add a method like<br />
Self PreMultiply( const Self & m ) const;<br />
which is ok because a sym matrix times a sym matrix is still symmetric. and then to modify<br />
Self PreMultiply( const MatrixType & m ) const;<br />
to check if m is symmetric, if it is then call Premultiply( static_cast<Self> m) if m isn't throw an exception.<br />
<br />
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.<br />
<br />
== Rotation ==<br />
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.<br />
template<typename TMatrixValueType><br />
Self Rotate( const Matrix<TMatrixValueType, NDimension, NDimension> & m);<br />
template<typename TMatrixValueType><br />
Self Rotate( const vnl_matrix_fixed<TMatrixValueType, NDimension, NDimension> & m)<br />
{<br />
return this->Rotate( static_cast<Matrix<TMatrixValueType, NDimension, NDimension> >(m) );<br />
}<br />
template<typename TMatrixValueType><br />
Self Rotate( const vnl_matrix<TMatrixValueType> & m)<br />
{<br />
return this->Rotate( static_cast<Matrix<TMatrixValueType> >(m) );<br />
}<br />
<br />
additionally the application of a transform to dti images necesitates the computation of the spatial jacobian at the points of interest.<br />
[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.<br />
<br />
== log-euclidean metric ==<br />
2 methods are needed to implement the log-euclidean metic<br />
# add GetMatrixExp( ) to SymmetricSecondRankTensor which computes the matrix exponential and returns a SymmetricSecondRankTensor<br />
# add GetMatrixLog() to DiffusionTensor3D, which computes the matrix log and returns a SymmetricSecondRankTensor<br />
<br />
<br />
{{ITK/Template/Footer}}</div>Lbloyhttps://public.kitware.com/Wiki/index.php?title=ITK_Working_Group_DTI&diff=15107ITK Working Group DTI2009-04-24T22:17:33Z<p>Lbloy: </p>
<hr />
<div>= Motivation =<br />
<br />
This page is intended to list proposals for changes to ITK to improve the processing of diffusion weighted and diffusion tensor images.<br />
<br />
= Bugs =<br />
# neither itkDiffusionTensor3D or itkSymmetricSecondRankTensor have full numericTraits. DiffusionTensor3D doesn't have any.<br />
# static_cast< DT > doesn't work. incorporating constructors like<br />
template < typename TCoordRepB ><br />
SymmetricSecondRankTensor( const SymmetricSecondRankTensor<TCoordRepB,NDimension> & pa ): BaseArray(pa) { };<br />
would allow this type of casting<br />
# the pre/post multiply methods in itkSymmetricSecondRankTensor have the wrong api [http://www.itk.org/Bug/view.php?id=8574 bug0008574]<br />
the product of a symmetric matrix and a matrix is not symmetric. A possible solution may be this.<br />
add to itkSymmetricSecondRankTensor<br />
Self PreMultiply( const Self & m ) const;<br />
this is ok because a sym matrix times a sym matrix is still symmetric.<br />
modify<br />
Self PreMultiply( const MatrixType & m ) const;<br />
to check if m is symmetric, if it is then call Premultiply( static_cast<Self> m) if m isn't throw an exception.<br />
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.<br />
<br />
= Feature Requests =<br />
# 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.<br />
template<typename TMatrixValueType><br />
Self Rotate( const Matrix<TMatrixValueType, NDimension, NDimension> & m);<br />
template<typename TMatrixValueType><br />
Self Rotate( const vnl_matrix_fixed<TMatrixValueType, NDimension, NDimension> & m)<br />
{<br />
return this->Rotate( static_cast<Matrix<TMatrixValueType, NDimension, NDimension> >(m) );<br />
}<br />
template<typename TMatrixValueType><br />
Self Rotate( const vnl_matrix<TMatrixValueType> & m)<br />
{<br />
return this->Rotate( static_cast<Matrix<TMatrixValueType> >(m) );<br />
}<br />
# adds support for the log-euclidean metric for dti.<br />
## add GetMatrixExp( ) to SymmetricSecondRankTensor which computes the matrix exponential and returns a SymmetricSecondRankTensor<br />
## add GetMatrixLog() to DiffusionTensor3D, which computes the matrix log and returns a SymmetricSecondRankTensor<br />
## add a naryMeanImagefilter that uses the log-euc metric to compute the means.<br />
# Add tests for everything.<br />
<br />
<br />
{{ITK/Template/Footer}}</div>Lbloy