[MINC-users] z-y-x to x-y-z via mincreshape, orientation not preserved...
Andrew Janke
Andrew Janke <a.janke@gmail.com>
Tue May 3 09:06:04 2005
On 5/3/05, Michel Audette <m.audette@aist.go.jp> wrote:
> I am working with minc volumes that are originally z-y-x, but some of the
> processing software that I use, developped by one of my collaborators
> (Maxime Descoteaux), seems to depend on x-y-z orientation (or do "better"
> with thus oriented data), so I use "mincreshape -dimorder xspace, yspace,
> zspace +xdirection +ydirection +zdirection" to produce x-y-z volumes.
If you really do want to flip all directions to positive remember to
also use -dimsize xspace=-1 or the likes for the image directions
(see man mincreshape for an explanation)
> Later on, I would like to use both the input and this processed volume, and
> to this effect, I resample my own input to also be x-y-z. However, I find
> that some of the volumes that I create in my own processing, using
> copy_volume_definition from my x-y-z input, does not preserve this x-y-z
> input and reverts to z-y-x. Is there a way of copying or opening that
> preserves x-y-z orientation input, even if the very original patient data
> was z-y-x?
copy_volume_definition will just copy attributes, not the dimension
order, that depends on the inital volume creation IIRC. The easiest
way I can think of to do this is just use open_volume on the volume
you want to copy and then use output_modified_volume with the new
filename.
Somewhat dodgy I guess but it should copy all the associated data...
a
> Just wondering...
>
> Michel
>
> Michel Audette, Ph.D.,
> Research Fellow, Surgical Simulation,
> Surgical Assist Technology Group,
> AIST,
> Namiki 1-2,
> Tsukuba, Japan,
> 305-8564.
> --------------------------------------------------------
> "If you think you can do it, you're right.
> If you think you can't do it, you're still right."
> - Henry Ford
>
> _______________________________________________
> MINC-users@bic.mni.mcgill.ca
> http://www.bic.mni.mcgill.ca/mailman/listinfo/minc-users
>
--
Andrew Janke (a.janke@gmail.com || www.cmr.uq.edu.au/~rotor)
Australia->Brisbane H: +61 7 3390 6332 || M: +61 4 2138 8581