[Insight-developers] GDCM Dicom Series Reader

Mathieu Malaterre mathieu.malaterre at kitware.com
Fri Jul 29 09:43:50 EDT 2005


Bill,

	If you have a minute, we recently merged in gdcm CVS some code from 
Theralys (french startup) into gdcm who also had some problem with 
orientation. There is also a discussion in wether or not to provide 
'standart' Orientation since for example dentist and radiologist have 
different notion of left and right :)

http://cvs.creatis.insa-lyon.fr/viewcvs/viewcvs.cgi/gdcm/src/gdcmOrientation.cxx?annotate=1.3

//--------------------------------------------------------------------
//  THERALYS Algorithm to determine the most similar basic orientation
//
//  Transliterated from original Python code.
//  Kept as close as possible to the original code
//  in order to speed up any further modif of Python code :-(
//-----------------------------------------------------------------------

/**
  * \brief  THERALYS' Algorithm to determine the most similar basic 
orientation
  *           (Axial, Coronal, Sagital) of the image
  * \note Should be run on the first gdcm::File of a 'coherent' Serie
  * @return orientation code
  *   #   0 :   Not Applicable (neither 0020,0037 Image Orientation Patient
  *   #                         nor     0020,0032Image Position     found )
  *   #   1 :   Axial
  *   #  -1 :   Axial invert
  *   #   2 :   Coronal
  *   #  -2 :   Coronal invert
  *   #   3 :   Sagital
  *   #  -3 :   Sagital invert
  *   #   4 :   Heart Axial
  *   #  -4 :   Heart Axial invert
  *   #   5 :   Heart Coronal
  *   #  -5 :   Heart Coronal invert
  *   #   6 :   Heart Sagital
  *   #  -6 :   Heart Sagital invert
  */


I believe we should be going in the same direction, could someone takes 
notes from the TCon as I won't be available, but I'd love to read the 
discussion.

Thanks
Mathieu

Lorensen, William E (Research) wrote:
> This could very well be. I did the current implementation and I was somewhat confused by the dicom standard.
> 
> Let's try to resolve this at today's t-con.
> 
> Bill
> 
> -----Original Message-----
> From: insight-developers-bounces+lorensen=crd.ge.com at itk.org
> [mailto:insight-developers-bounces+lorensen=crd.ge.com at itk.org]On Behalf
> Of Vincent Magnotta
> Sent: Friday, July 29, 2005 8:59 AM
> To: insight-developers at itk.org
> Subject: [Insight-developers] GDCM Dicom Series Reader
> 
> 
> I have been looking at the output of the GDCM series reader. I believe 
> that there is a bug in the setting of the origin in the resulting image. 
> I collected a set of images that were prescribed as Axial, Sagittal, and 
> Coronal. Here is the result of the origin setting from the image series 
> reader:
> 
> 0002: (2D Axial T1)
> 
> ============ ITK Output ============
> Origin: [-120, -128.475, -82.7712]
> Image Position Patient = -120.00000002461\-128.47457597179\50.228813171387
> Image Orientation (Patient) = 1\-2.0510349e-010\0\2.051034897e-010\1\0
> 
> ===== Image Positions from DICOM Header ====
> -120.00000002461 -128.47457597179 50.228813171387 
> -120.00000002461 -128.47457597179 43.228813171387 
> -120.00000002461 -128.47457597179 36.228813171387 
> -120.00000002461 -128.47457597179 29.228813171387 
> -120.00000002461 -128.47457597179 22.228813171387 
> -120.00000002461 -128.47457597179 15.228813171387 
> -120.00000002461 -128.47457597179 8.2288131713867 
> -120.00000002461 -128.47457597179 1.2288135290146 
> -120.00000002461 -128.47457597179 -5.7711863517761 
> -120.00000002461 -128.47457597179 -12.771186828613 
> -120.00000002461 -128.47457597179 -19.771186828613 
> -120.00000002461 -128.47457597179 -26.771186828613 
> -120.00000002461 -128.47457597179 -33.771186828613 
> -120.00000002461 -128.47457597179 -40.771186828613 
> -120.00000002461 -128.47457597179 -47.771186828613 
> -120.00000002461 -128.47457597179 -54.771186828613 
> -120.00000002461 -128.47457597179 -61.771186828613 
> -120.00000002461 -128.47457597179 -68.771186828613 
> -120.00000002461 -128.47457597179 -75.771186828613 
> -120.00000002461 -128.47457597179 -82.771186828613 
> 
> 
> 
> 
> 0003: (2D Coronal T1)
> ============ ITK Output ============
> Origin: [-120, -68.0847, 104.407]
> Image Position Patient = -120\57.915252685547\104.40677928925
> Image Orientation (Patient) = 1\0\0\0\0\-1
> 
> ===== Image Positions from DICOM Header ====
> -120 57.915252685547 104.40677928925 
> -120 50.915252685547 104.40677928925 
> -120 43.915252685547 104.40677928925 
> -120 36.915252685547 104.40677928925 
> -120 29.915254592896 104.40677928925 
> -120 22.915254592896 104.40677928925 
> -120 15.915254592896 104.40677928925 
> -120 8.9152545928955 104.40677928925 
> -120 1.9152542352676 104.40677928925 
> -120 -5.0847458839417 104.40677928925 
> -120 -12.084745407104 104.40677928925 
> -120 -19.084745407104 104.40677928925 
> -120 -26.084745407104 104.40677928925 
> -120 -33.084747314453 104.40677928925 
> -120 -40.084747314453 104.40677928925 
> -120 -47.084747314453 104.40677928925 
> -120 -54.084747314453 104.40677928925 
> -120 -61.084747314453 104.40677928925 
> -120 -68.084747314453 104.40677928925 
> 
> 0004: (2D Sagittal T1)
> ============ ITK Output ============
> Origin: [47.0763, -122.373, 104.407]
> Image Position Patient = -57.923728942871\-122.37288141251\104.40677928925
> Image Orientation (Patient) = 0\1\0\0\0\-1
> 
> 
> ===== Image Positions from DICOM Header ====
> 
> -57.923728942871 -122.37288141251 104.40677928925 
> -50.923728942871 -122.37288141251 104.40677928925 
> -43.923728942871 -122.37288141251 104.40677928925 
> -36.923728942871 -122.37288141251 104.40677928925 
> -29.923728942871 -122.37288141251 104.40677928925 
> -22.923728942871 -122.37288141251 104.40677928925 
> -15.923728942871 -122.37288141251 104.40677928925 
> -8.9237289428711 -122.37288141251 104.40677928925 
> -1.9237288236618 -122.37288141251 104.40677928925 
> 5.0762710571289 -122.37288141251 104.40677928925 
> 12.076271057129 -122.37288141251 104.40677928925 
> 19.076271057129 -122.37288141251 104.40677928925 
> 26.076271057129 -122.37288141251 104.40677928925 
> 33.076271057129 -122.37288141251 104.40677928925 
> 40.076271057129 -122.37288141251 104.40677928925 
> 47.076271057129 -122.37288141251 104.40677928925 
> 
> 
> 
>  Based on this data, it suggests the Axial image is correct. The 
> Sagittal and Coronal images are not correct. The origin is always being 
> set based on the scanner coordinate systm (x,y,z) and not that of the 
> images. I am going to try to make the Tcon to discuss this further if 
> there is time.
> 
> Vince
> 
> 
> 



More information about the Insight-developers mailing list