[Insight-developers] Coordinate system semantics of ImageIOBase?

Gordon Kindlmann gk at bwh.harvard.edu
Wed Dec 31 12:16:00 EST 2008


Hello,

I just wanted to chime in on the orientation question...

On Dec 29, 2008, at 2:17 PM, Steve M. Robbins wrote:

>>>
>>> What should one assume about the world space coordinates?  I believe
>>> it is safe to assume a right-handed coordinate system.  Do we assume
>>> they should be LPS (as in DICOM)?  If so, do we convert incoming
>>> coordinates (MINC uses the RAS convention)?  I would assume not as
>>> I've read about folks using ITK for non-medical images like in
>>> astronomy.  But if no conversion is done, how does an application
>>> handle loading from multiple formats; e.g. DICOM and MINC?
>>>
>>
>>
>>       This is a delicate point.
>>
>>       The standard in ITK is to use LPS.
>
> So what happens if your image is not of a person?  Is the stance of
> ITK that:
>
>   1. ITK is only used for medical data, so there is always a
>      patient-centric world reference frame.
> or
>
>   2. ITK specifically uses LPS for medical data.  Other image sources
>      are free to choose their own world reference frame.

There is already some precedent for RAS-to-LPS conversions in ITK;  
the NRRD format allows the world-space to be explicitly identified  
(such as RAS, or LPS, or something else).  Currently Insight/Code/IO/ 
itkNrrdImageIO.cxx (around line 450) will perform sign flips on some  
of the direction cosine coefficients to implement the RAS-to-LPS  
conversion, in keeping with the LPS semantics of ITK for 3D medical  
data.

On the other hand, this automagic conversion of orientation  
information at the time of file read has been deemed a problem by at  
least one user; see this:

http://www.cmake.org/pipermail/insight-users/2008-October/027608.html

and the subsequent messages in the thread.  I'm interested in  
learning more about your future experience in implementing the RAS-to- 
LPS conversion and any possible controls on when and where it happens.

Gordon



More information about the Insight-developers mailing list