[MINC-users] Reading minc format DTI data
Vladimir FONOV
vladimir.fonov at gmail.com
Mon Jun 21 18:46:54 EDT 2010
Hello,
Yonas T. wrote:
> Here is what I found however:
>
> minctoraw -normalize dti.mnc > ImageData.raw
> Result: ImageData.raw file with size = 227,288,499 bytes (about 216MB)
>
> minctoraw -normalize -short dti.mnc > ImageData_Short.raw
> Result: ImageData_Short.raw file with size = 227,288,499 bytes (about
> 216MB)
>
> mincextract dti.mnc > ImageDataWithExtract.raw
> Result: ImageDataWithExtract.raw file with size = 2,141,244,230 bytes
> (about 2GB)
>
> mincextract -normalize -short dti.mnc > ImageDataWithExtract_Short.raw
> Result: ImageDataWithExtract_Short.raw file with size = 225,473,844 bytes
> (about 215MB)
my experiment:
> mincinfo test_dti.mnc
file: test_dti.mnc
image: signed__ short 0 to 4095
image dimensions: time zspace yspace xspace
dimension name length step start
-------------- ------ ---- -----
time 32 1 0
zspace 40 1.2 -16.894
yspace 128 -1.21875 80.1687
xspace 128 -1.21875 77.9898
32*40*128*128*4=83886080
> minctoraw -normalize -float test_dti.mnc > test1.raw
> mincextract -float test_dti.mnc > test2.raw
> ls -l test1.raw test2.raw
-rw-r--r-- 1 vfonov pet 83886080 Jun 21 18:41 test1.raw
-rw-r--r-- 1 vfonov pet 83886080 Jun 21 18:41 test2.raw
> cmp test1.raw test2.raw
(no messages, meaning files are identical)
> So my questions,
>
> 1. As you can see from the result, I am baffled by these strangely different
> results when using minctoraw versus mincextract calls. Worse, none of these
> file sizes matches what I expected. That is the file size is LARGER than
> what I expected (mincextract -normalize -short dti.mnc >
> ImageDataWithExtract_Short.raw gives 225,473,844 bytes although I expected
> 225,017,856 bytes). Any idea, please?
>
> 2. I also found emma matlab toolbox that can read minc format images. Going
> through line by line of the reading routines, I can see that this tool does
> nothing but uses mincextract to read the minc file to a temporary file and
> then takes the first N bytes (where N is the expected size) from the
> temporary file and returns. That is although the temporary file is bigger,
> what emma does is simply discard the extra bytes. My questions here is: does
> this emma knows the extra bytes are at the end of the raw file read? Is
> there any documentation for this?
As far as I know emma is unsupported now.
>
> 3. Does the result of mincinfo seem meaningful? I am a bit surprised by "image:
> signed__ short 0 to 4095" because I would think unsigned short would make
> more sense to say range 0 - 4095.
2**12=4096 - so scanner have got 12bit ADC I suppose ?
> Any ideas please? Or any better way to read minc format image to save it as
> raw file?
You can try to use niak: http://code.google.com/p/niak/ , it uses
mincextract internally as well.
--
Best regards,
Vladimir S. FONOV ~ v.s.fonov <at> ilmarin.info
More information about the MINC-users
mailing list