[Insight-developers] experiences with writing Analyze and MetaIO images and orientation with ITK 3.2.0

Kris Thielemans kris.thielemans at csc.mrc.ac.uk
Wed Sep 5 10:13:30 EDT 2007


Thanks Hans,
that's helpful.

This doesn't seem to be documented anywhere. It would be good to put
this info in the doxygen (or at least the file). What's the name of the
#define variable? (I can't really see it in the code) and how would I
enable it with cmake?

I had to use analyze 7.5 file format because of the application reading
the data, but I agree that it should be avoided if possible as the
header really doesn't contain enough info. 

I've solved my particular problems by forcing an orientation (using
OrientImageFilter) before writing the image.

thanks again

Kris



On Wed, 2007-09-05 at 07:25 -0500, Hans J. Johnson wrote:
> Kris,
> 
> I wanted to add a bit of clarification to your statements about the
> Analyze7.5 reader.  The Analyze 7.5 reader implementation in ITK was one of
> the first image file readers that was committed even before ITK had the
> concept of orientation.  As such the original developers of the Analyze75 IO
> (my colleagues and I at Iowa) were lax in the original implementation, and
> now we are stuck with maintaining backwards compatibility with a sub-optimal
> solution.  
> 
> Analyze 7.5 in ITK only records 3 of the 48 possible orthogonal orientations
> of a 3D image properly.  The other 45 orientations are all lumped into the
> CORONAL orientation.
> 
> It is very easy to get right left swapping in medical images, so be very
> careful when using Analyze75 because it will often write improperly oriented
> images.  There is a compile-time #define to force Analyze75 to throw an
> error when orientation is not going to be written properly, I would suggest
> using that if you are working on medical image processing.
> 
> In our lab, we could not afford R/L swapping errors, and have moved
> completely over to the NIFTI file format.   It supports orientation much
> more consistently.
> 
> I hope these comments help.
> 
> Hans
> 



More information about the Insight-developers mailing list