[Insight-developers] ImageIO image orientations

Stephen R. Aylward aylward at unc.edu
Thu Jul 29 11:33:00 EDT 2004


Hi,

This is becoming an issue for us as well.

The problem is that different medical imaging systems produce images 
with different orientations.

Instead of reorienting the data, I think the orientation of the body in 
the image needs to be recorded in the fileformat.

In MetaImage we are switching to the RL/IS/AP encoding - That is, each 
dimension is given a letter to indicate the direction of the body along 
that axis.   If the x-axis goes right to left across a patient, the y 
goes anterior to posterior, and the z goes inferior to superior - the 
orientation is called RAI.  These values can be automatically determined 
from dicom images.   This encoding is common in radOnc - we didn't come 
up with it.

Using this encoding, an application can determine how to display an 
image.  In particular, only for VERY rare cases would an image be 
displayed such that a patient's posterior is above the patient's 
anterior (i.e., patients aren't oftened scanned while lying on their 
stomachs - and physicians don't often want to see an image that depicts 
the patient lying on their stomachs).   We propose that such display 
decisions are made at the application level - the default orientation 
should be RAI, but this could be changed.

Sorry for the long email,
Stephen



Miller, James V (Research) wrote:
> I just entered a bug into the bug tracker wrt to the ImageIO objects and 
> image orientation.
>  
> http://www.itk.org/Bug/bug.php?op=show&bugid=1013&pos=3 
> <http://www.itk.org/Bug/bug.php?op=show&bugid=1013&pos=3>
>  
> The issue is that if you load an image in one file format, write it in 
> another file format, the output image may appear "flipped".  
>  
> DICOM, JPEG, and PNG specify the first pixel in an image as the upper 
> left corner of the image.
>  
> Analyze and VTK specify the first pixel in an image as the lower 
> left corner of the image.
>  
> I am not sure what the other formats specify.
>  
> As it currently stands, all the ImageIO objects (seem to) make the image 
> in memory mirror the order of the image on disk and make the image on 
> disk mirror the order of the image in memory.  In other words, the first 
> pixel in the ITK image will be whatever the first pixel is in the image 
> format (which may be the upper left or the lower left).
>  
> If your program reads and writes images in the same format, this doesn't 
> matter.  But if you read an image in one format and write it in another, 
> the image may be implictly flipped. In other words, if you read a DICOM 
> image and write it out in Analyze format, then you load the output image 
> into Analyze, it will appear upside down. 
>  
> Do we
> 
>    1. want to adopt a convention that ITK images in memory always have
>       the first pixel as the upper left pixel?
>    2. want to modify the ImageIO objects that need to flip the data
>       before the 1.8 release?
> 
>  
> 
> *Jim Miller*
> */_____________________________________/*
> /Visualization & Computer Vision//
> /GE Research/
> /Bldg. KW, Room C218B/
> /P.O. Box 8, Schenectady NY 12301/
> 
> //_millerjv at research.ge.com <mailto:millerjv at research.ge.com>_/
> 
> /_james.miller at research.ge.com_/
> /(518) 387-4005, Dial Comm: 8*833-4005, /
> /Cell: (518) 505-7065, Fax: (518) 387-6981/
> 
>  
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Insight-developers mailing list
> Insight-developers at itk.org
> http://www.itk.org/mailman/listinfo/insight-developers

-- 
===========================================================
Dr. Stephen R. Aylward
Associate Professor of Radiology
Adjunct Associate Professor of Computer Science and Surgery
http://caddlab.rad.unc.edu
aylward at unc.edu
(919) 966-9695


More information about the Insight-developers mailing list