[MINC-users] minc tool to correct orientation

Robert VINCENT bert@bic.mni.mcgill.ca
Thu Sep 30 12:13:05 2004


Yves,

Depending on the exact nature of the error and the coordinate system, it
could be as simple as changing the sign of the Z coordinate axis.

Suppose you have the following situation:

oberon 807% mincinfo bert_20030424_mri.mnc
file: bert_20030424_mri.mnc
image: signed__ short 0 to 4095
image dimensions: xspace zspace yspace
    dimension name         length         step        start
    --------------         ------         ----        -----
    xspace                     88            2     -88.2412
    zspace                    256           -1        109.8
    yspace                    256           -1      167.235

To "flip" the Z axis in this case, I just need to change the step and
start values as follows:

step(2) = -step(1)
start(2) = start(1)-((zlength-1)*step(1))

So in this case the fix becomes:

minc_modify_header -dinsert zspace:step=1 -dinsert zspace:start=-145.2

This will exactly invert the sense of the Z direction without actually
flipping the data.

	-bert

On Thu, 30 Sep 2004, Roy Yves wrote:

> Hi:
>
> I have 4D minc images of functional runs and the head appears upside down (after a dicom to minc conversion with dcm2mnc).
>
> Which minc tool can I run on these 4D images to correct the situation (i.e. to flip the head downside up) ?
>
> Many thanks
> Yves
>
> _______________________________________________
> MINC-users@bic.mni.mcgill.ca
> http://www.bic.mni.mcgill.ca/mailman/listinfo/minc-users
>