Quantcast

Confusion with direction cosines in DICOM, tag 0020|0037

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Confusion with direction cosines in DICOM, tag 0020|0037

Patrik.Br.

Hello,

I was wondering how to use the direction cosines in DICOM when contructing a
direction/rotation matrix. Should the six numbers in tag 0020|0037 represent
the first two columns or the first two rows of the matrix?

An ITK bug report suggests (i think) that they are the first two row
vectors:
http://www.cmake.org/Bug/view.php?id=7748

...but some nifti documentation seem to state the opposite (down the bottom
of the page):
http://nifti.nimh.nih.gov/nifti-1/documentation/nifti1fields/nifti1fields_pages/quatern.html

A short educational pdf-document implies they are the row vectors of the
matrix:
http://www.ae.uiuc.edu/~tbretl/ae403/handouts/06-dcm.pdf

...but wikipedia seems to state that they should be interpreted as the
column vectors of the matrix:
http://en.wikipedia.org/wiki/Rotation_representation_(mathematics)#Rotation_matrix_.28or_direction_cosine_matrix.2C_DCM.29

Can someone de-confuse me?!

Thanks in advance,

//Patrik
--
View this message in context: http://old.nabble.com/Confusion-with-direction-cosines-in-DICOM%2C-tag-0020%7C0037-tp26825252p26825252.html
Sent from the ITK - Users mailing list archive at Nabble.com.

_____________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html

Kitware offers ITK Training Courses, for more information visit:
http://www.kitware.com/products/protraining.html

Please keep messages on-topic and check the ITK FAQ at:
http://www.itk.org/Wiki/ITK_FAQ

Follow this link to subscribe/unsubscribe:
http://www.itk.org/mailman/listinfo/insight-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Confusion with direction cosines in DICOM, tag 0020|0037

luisibanez
Hi Patrik,

The direction cosine triplets from the DICOM header
are stored in the Columns of the ITK Direction matrix.

See lines: 190-203 of the file

      Insight/Code/IO/itkImageFileReader.txx

and lines 1171-1183 of the file:

      Insight/Code/IO/itkGDCMImageIO.cxx


The DICOM header only carry the first two direction
cosine vectors. The third one is computed by ITK
as the cross product of the first two.

WARNING: Before you get too focuses on
row versus column matrix notation, please
note that ITK represent Geometrical vectors
as column-vectors in a Matrix.


    Regards,



          Luis


----------------------------------------------------------------------------
On Thu, Dec 17, 2009 at 4:22 AM, Patrik.Br.
<[hidden email]> wrote:

>
> Hello,
>
> I was wondering how to use the direction cosines in DICOM when contructing a
> direction/rotation matrix. Should the six numbers in tag 0020|0037 represent
> the first two columns or the first two rows of the matrix?
>
> An ITK bug report suggests (i think) that they are the first two row
> vectors:
> http://www.cmake.org/Bug/view.php?id=7748
>
> ...but some nifti documentation seem to state the opposite (down the bottom
> of the page):
> http://nifti.nimh.nih.gov/nifti-1/documentation/nifti1fields/nifti1fields_pages/quatern.html
>
> A short educational pdf-document implies they are the row vectors of the
> matrix:
> http://www.ae.uiuc.edu/~tbretl/ae403/handouts/06-dcm.pdf
>
> ...but wikipedia seems to state that they should be interpreted as the
> column vectors of the matrix:
> http://en.wikipedia.org/wiki/Rotation_representation_(mathematics)#Rotation_matrix_.28or_direction_cosine_matrix.2C_DCM.29
>
> Can someone de-confuse me?!
>
> Thanks in advance,
>
> //Patrik
> --
> View this message in context: http://old.nabble.com/Confusion-with-direction-cosines-in-DICOM%2C-tag-0020%7C0037-tp26825252p26825252.html
> Sent from the ITK - Users mailing list archive at Nabble.com.
>
> _____________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Kitware offers ITK Training Courses, for more information visit:
> http://www.kitware.com/products/protraining.html
>
> Please keep messages on-topic and check the ITK FAQ at:
> http://www.itk.org/Wiki/ITK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.itk.org/mailman/listinfo/insight-users
>
_____________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html

Kitware offers ITK Training Courses, for more information visit:
http://www.kitware.com/products/protraining.html

Please keep messages on-topic and check the ITK FAQ at:
http://www.itk.org/Wiki/ITK_FAQ

Follow this link to subscribe/unsubscribe:
http://www.itk.org/mailman/listinfo/insight-users
Loading...