[Insight-developers] ImageIO image orientations
Vincent A. Magnotta
vincent-magnotta at uiowa.edu
Thu Jul 29 11:40:35 EDT 2004
Jim and Bill,
It had always been my understanding that ImageOI should occur as Jim
described:
'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).'
and it was up to the user to handle the orientation issues.
There may be an additional complexity with Analyze images (maybe others)
where some default orientation must be used if one is not specified. For
example if a load an coronal image and then write out the image it will
be an axial image according to the analyze header. We did spend some
time to add the MetaDataDictionary to the Analyze format and added the
itkOrientImageFilter to handle some of these issues. Another solution
would be to add the the MetaDataDictionary to other ImageIO formats and
let the programmer handle the orientation using the orientation filter.
Vince
On Thu, 2004-07-29 at 10:15, Lorensen, William E (Research) wrote:
> I vote for 1). I don't see how we could possible change this now. I
> thought we resolved this a long time ago... I think the Analyze
> problem may be unrelated.
>
> -----Original Message-----
> From: Miller, James V (Research) [mailto:millerjv at crd.ge.com]
> Sent: Thursday, July 29, 2004 11:10 AM
> To: Insight-developers (E-mail)
> Subject: [Insight-developers] ImageIO image orientations
>
>
> 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
>
> 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
>
> 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
--
Assistant Professor
Department of Radiology
0437 JCP
E-mail: vincent-magnotta at uiowa.edu
Phone: 319-356-8255
Fax: 319-353-6275
Website: http://www.radiology.uiowa.edu
More information about the Insight-developers
mailing list