[MINC-users] Re: [BIC-users] minc basics

Andrew Janke minc-users@bic.mni.mcgill.ca
Thu, 4 Sep 2003 10:11:15 +1000


On Tue, 2 Sep 2003, Natasa Kovacevic wrote:

> Given a minc file with who-knows-which order of spatial dimensions and
> who-knows-what start and steps , I would like to produce a minc file
> that contains the same data with the same coordinate system, but:
> dimension ordering is z,y,x (from slowest to fastest) and
> all steps have positive directions
>
> I thought that something like :
>
> mincreshape +direction -dimorder zspace,yspace,xspace IN.mnc OUT.mnc
>
> would do the trick, but it doesn't (dimension order is o.k, but if some
> step in IN.mnc is negative, it is the same in OUT.mnc)

This would seem sensible, however there is a slight trick to this, 'man
mincreshape' goes into this in more detail but suffice to say here is an all
encompasing command that I use that should work in your case:

   $ mincreshape +direction -dimorder zspace,yspace,xspace \
      -dimsize xspace=-1 -dimsize yspace=-1 -dimsize zspace=-1 \
      infile.mnc outfile.mnc


--
Andrew Janke   ( rotor@cmr.uq.edu.au || www.cmr.uq.edu.au/~rotor )
Australia->University of Queensland->Centre for Magnetic Resonance
W: +61 7 3365 4100  ||  H: +61 7 3800 4042  ||  M: +61 4 2138 8581