[MINC-users] conversion to analyze problem

Walker, Lindsay (NIH/NICHD) [V] walkerlin at mail.nih.gov
Mon Sep 10 11:32:53 EDT 2007


Andrew,

I can answer some of these questions.  Yes, I am using the -analyze
flag, as I need to have my data in analyze format for a software
pipeline that I use.

In fact, mnc2nii converts the data correctly to nifti format (no issues
with orientation), but when I add the -analyze flag it flips the x-axis.

This axis is flipped when viewed in mipav, medx and fslview - so it is
not just one software package that is handling the data incorrectly.

The version of mnc2nii that I am using is:

mnc2nii -version
program: 1.5.1
libminc: 1.5.1
netcdf : "3.6.2"

Lindsay.

-----Original Message-----
From: Andrew Janke [mailto:a.janke at gmail.com] 
Sent: Sunday, September 09, 2007 7:52 AM
To: MINC users mailing list
Subject: Re: [MINC-users] conversion to analyze problem

> Although I am sympathetic to systemic problems and possible
> ambiguities of the MINC <-> ANALYZE format conversions, I am as yet
> not convinced that we are not looking at a bug; nor that the behaviour
> of mnc2nii/nii2mnc can/should not be improved to "work" for users in
> 95% of the cases instead of 5% (if that). Reasons being:

Okie doke...

> 1. I am yet to encounter the first case where flipping was not
> necessary (and I have done my fair share - probably more - of these
> types of conversions)

OK.  (has not been my experience?  I will check with the XNAT guys and
see what their experience is).

> 2. If I take a MINC volume (without funky directions cosines and etc),
> run mnc2nii (-analyze) followed by nii2mnc, the x-axis comes out
> flipped.

oh?  not so for me?  Although I questions why you are adding the
-analyze flag. This will cause mnc2nii to write an old style (non
oriented) analyze file as opposed to a Nifti 2-file format which I
suspect is what you want.  My test:

   $ mincreshape -dimrange xspace=0,100 \
      icbm_avg_152_t1_tal_lin.mnc /tmp/out.mnc

   $ mnc2nii out.mnc out.hdr
   $ nii2mnc out.hdr two.mnc

   $ register out.mnc two.mnc

Beyond image scaling issues, this is fine?  What versions are you
running?  myself:

gordon:tmp$ nii2mnc -version
program: 2.0.09
libminc: 2.0.09
netcdf : 3.6.1 of Mar  5 2007 07:16:16 $

> 3. In the case that Lindsay reports, at least 3 different analyze
> viewers agree that the x-axis is flipped (which I understand not to be
> an issue of viewer/radiological/neurological convention, as evidenced
> by a physical marker in the image).

Is this when using a -analyze flag?

> So notwithstanding MINC's conceptual superiority w/respect to
> coordinate space handling and etc, it still makes no sense to me that
> this conversion appears to not *ever* work correctly, nor that the
> conversion on 'simple' files is not bijective when using the
> conversion tools provided by MINC itself. Something just smells wrong
> here...

Myself I prefer to code to the spec and then add kludges later on for
specific cases if needs be.  Meaning I dont think there would be a
problem to write a quick and dirty conversion (shell) script called
mnc2fsl for example.

> Where does one actually find the formal specifications of
> ANALYZE/NIFTi? For ANALYZE I keep stumbling on the same pdf describing
> the ANALYZE 7.5 file format, but that is less than informative.

The old analyze spec used to be on the Mayo site. But I just went
looking for it an found nothing.  There is always the old .h file that
went with it.  As for nifti, the best site is the sourceforge page.

   http://niftilib.sourceforge.net/

In any case, if what you describe above really is a bug I am more than
happy to fix it.


-- 
Andrew Janke   (a.janke at gmail.com || http://a.janke.googlepages.com/)
Canberra->Australia    +61 (402) 700 883
_______________________________________________
MINC-users at bic.mni.mcgill.ca
http://www.bic.mni.mcgill.ca/mailman/listinfo/minc-users



More information about the MINC-users mailing list