[MINC-users] RE: ana2mnc - resampling images

Catherine Ogilvie cogilvie@ualberta.ca
Wed Jan 26 15:20:04 2005


--sorry if this goes out twice.

Hi Robert, thanks for offering to help.
I've been working on this all day now using mincresample.
I'm trying to change the original axial oriented images into sagittal and/or
coronal orientations.

The original file formats were in .hdr .img pairs. I converted them to minc
using ana2mnc and this was the mincinfo:

image: signed__ short 0 to 32767
image dimensions: zspace yspace xspace
    dimension name         length         step        start
    --------------         ------         ----        -----
    zspace                     64      2.72727     -87.2727
    yspace                    256     0.859375         -110
    xspace                    256    -0.859375          110

This file worked fine but was optimized to axial orientation.

I had our collaborators in London (who were sending me the files) convert to
sagittal orientation in .hdr .img format. Then I converted that to minc format
with ana2mnc on my computer. The mincinfo on that file was:

image: signed__ float -1.6814541463787951101e+38 to 3.3836776830158255673e+38
image dimensions: zspace yspace xspace
    dimension name         length         step        start
    --------------         ------         ----        -----
    zspace                    256     0.859375         -110
    yspace                    256     0.859375         -110
    xspace                    256    -0.859375          110

But this file didn't work - just random pixels.
So... I tried to use mincresample to resample/reorient the original axial
oriented image to all of these different dimensions - changing the -nelements,
-step, -start for the file to:

(All) image: signed__ short 0 to 32767

    dimension name         length         step        start
    --------------         ------         ----        -----
    zspace                    256     0.859375         -110
    yspace                    256     0.859375         -110
    xspace                    256    -0.859375          110

    dimension name         length         step        start
    --------------         ------         ----        -----
    zspace                    256     0.859375         -110
    yspace                     64      2.72727     -87.2727
    xspace                    256    -0.859375          110

    dimension name         length         step        start
    --------------         ------         ----        -----
    zspace                    256     0.859375         -110
    yspace                    256     0.859375         -110
    xspace                     64     -2.72727      87.2727

But none of these worked.
Clearly I don't have a good understanding of the program?

Any advice you can offer would be greatly appreciated!

Thanks again.
Catherine.


>Message: 2
>Date: Mon, 24 Jan 2005 13:56:54 -0500
>From: Robert VINCENT <bert@bic.mni.mcgill.ca>
>To: Catherine Ogilvie <cogilvie@ualberta.ca>
>cc: Andrew Janke <andrew_janke@iinet.net.au>,
>   The MINC mailing list <minc-users@bic.mni.mcgill.ca>
>Subject: RE: [MINC-users] ana2mnc problem
>
>Hi Catherine,
>
>The revised (sagittal) files seem to be in floating-point format, whereas
>the originals were in short integer format.  Ana2mnc calls rawtominc,
>which doesn't deal with byte-swapping floating-point datatypes.
>
>What was the difficulty in reorienting the MINC files?  That should have
>been pretty straightforward.  I'll be happy to help if you're willing to
>give that approach another try.
>
>	-bert
>
>On Mon, 24 Jan 2005, Catherine Ogilvie wrote:
>
>> Andrew, the new ana2mnc program you sent me worked wonderfully.
>>
>> However, I then needed the images transformed into sagittal orientation. I
>> tried to use the minc programs suggested by everyone on minc-users, but
when I
>> had a lot of difficulty I had them transformed into sagittal while in .hdr
>> .img format by the group sending them to me. Now when I run the dimension
>> transformed .hdr .img files on the ana2mnc program it does not turn out a
>> readable format, with the repeated warning output:
>>
>> Warning: you specified -swap_bytes, but I can't swap this type if input
>>
>> I'm not sure what's happening.
>>
>> When I convert to minc, the dimensions of the images in original axial form
>> are:
>>
>> image: signed__ short 0 to 32767
>> image dimensions: zspace yspace xspace
>>     dimension name         length         step        start
>>     --------------         ------         ----        -----
>>     zspace                     64      2.72727     -87.2727
>>     yspace                    256     0.859375         -110
>>     xspace                    256    -0.859375          110
>>
>> The dimensions in transformed sagittal form, when converted to minc, are:
>>
>> image: signed__ float -1.6814541463787951101e+38 to
3.3836776830158255673e+38
>> image dimensions: zspace yspace xspace
>>     dimension name         length         step        start
>>     --------------         ------         ----        -----
>>     zspace                    256     0.859375         -110
>>     yspace                    256     0.859375         -110
>>     xspace                    256    -0.859375          110
>>
>> not sure if this makes a difference, but this is the one that's giving me
the
>> errors and pixelated output.
>>
>> Thanks for your help.
>> Catherine Ogilvie
>>
>>
>> >===== Original Message From Andrew Janke <andrew_janke@iinet.net.au> =====
>> >On Wed, 8 Dec 2004, Catherine Ogilvie wrote:
>> >
>> >> Hi. I'm trying to use ana2mnc for the first time. I have had a .img and
>> .hdr
>> >> pair sent to me from another lab which uses analyze. When I run ana2mnc
I
>> get
>> >> this:
>> >>
>> >> ana2mnc: sizeof header: 1543569408
>> >> ana2mnc: Hrm, attempting byte-swapping on ANATcw.24_02_03_2.fid_001.hdr
>> >> ana2mnc: No x origin info found, guessing..
>> >> ana2mnc: No y origin info found, guessing..
>> >> ana2mnc: No z origin info found, guessing..
>> >>
>> >> and a very strangely pixelated output.
>> >
>> >I'm guessing that when you tranferred the data, the header was byte
swapped
>> and
>> >the data wasn't.
>> >
>> >Try this version of ana2mnc
>> >
>> >    http://www.bic.mni.mcgill.ca/~rotor/distro/ana2mnc-1.3c
>> >
>> >using the -swap_data option.
>> >
>> >If this works, I'll add this feature into the next release of ana2mnc
>> >
>> >
>> >--
>> >Andrew Janke (andrew_janke@iinet.net DOT au || www.cmr.uq.edu.au/~rotor)
>> >Australia->Brisbane            H: +61 7 3390 6332  || M: +61 4 2138 8581
>>
>> _______________________________________________
>> MINC-users@bic.mni.mcgill.ca
>> http://www.bic.mni.mcgill.ca/mailman/listinfo/minc-users
>>
>
>
>
>--__--__--
>
>_______________________________________________
>MINC-users mailing list
>MINC-users@bic.mni.mcgill.ca
>http://www.bic.mni.mcgill.ca/mailman/listinfo/minc-users
>
>
>End of MINC-users Digest