[MINC-users] Rawtominc problems

Soren Christensen sorench at gmail.com
Fri Jul 10 22:10:09 EDT 2009


Both register and Display re-discretize your values to byte range so you
will often see discrepancies to your in-file real values. This is just when
viewing, will not affect any analysis using the other tools. This has been
discussed previously on the list and you should be able to find info there
as well.
single precision Float is 32 bit (See wiki). Do ls -l to get size or right
click an see file properties using your OS gui.

Soren


On Thu, Jul 9, 2009 at 3:27 AM, Michael Alexander Yee <
michael.a.yee at vanderbilt.edu> wrote:

> Furthermore,
>
> When converting other images from rawtominc, I have successfully created
> int
> 16 bit images that can be viewed on register.exe in .mnc format and look
> like the original .img files, but the voxel readings are not only wrong,
> but
> they are not integers.
>
> I used:
>
> cat baseline.img | rawtominc -short -oshort -swap_bytes -scan_range -xstep
> -2 -ystep 2 -zstep 2 -xstart 46  -ystart 64  -zstart 37  baseline.mnc 91
> 109
> 91 -clobber -osigned
>
> Any suggestions on why the readings are wrong but the image looks right?
>
> Michael
>
> On Wed, Jul 8, 2009 at 9:59 AM, Michael Alexander Yee <
> michael.a.yee at vanderbilt.edu> wrote:
>
> > To Soren:
> > Thanks for responding, but how do I check the file size, and is ofloat 32
> > bits?
> >
> > To Andrew:
> > Thank you also for replying, but could you explain the $ nii2mnc command,
> > it does not seem to work with the minc software I am using - "command not
> > found."
> >
> > I still do not understand why my command of:
> >
> > cat name.img | rawtominc -float -ofloat -scan_range  -xstep 2 -ystep 2
> > -zstep 2 -xstart 46  -ystart 64  -zstart 37  name.mnc 91 109 91 -clobber
> >
> > Gives me a "premature end of file" message.
> >
> > Origin (x,y,z) 46,64,37
> > Dimensions (x,y,z) 91,109,91
> > Voxel resolution 2,2,2
> > Data type - 32 bit real
> >
> > Thanks,
> >
> > Michael
> >
> >
> >
> > On Tue, Jul 7, 2009 at 8:03 PM, Andrew Janke <a.janke at gmail.com> wrote:
> >
> >> Hi Michael,
> >>
> >> On Wed, Jul 8, 2009 at 02:58, Michael Alexander
> >> Yee<michael.a.yee at vanderbilt.edu> wrote:
> >> > I am trying to convert .img files (float) to .mnc using rawtominc, but
> I
> >> > keep getting a "premature end of file" message and mincheader shows
> that
> >> > several slices do not have a corresponding min/max.
> >> >
> >> > I have written:
> >> >
> >> > cat name.img | rawtominc -float -ofloat -scan_range -xstep 2 -ystep 2
> >> -zstep
> >> > 2 -xstart 46  -ystart 64  -zstart 37  name.mnc 91 109 91 -clobber
> >> -osigned
> >>
> >> As Soren has already pointed out the -osigned argument will have no
> >> effect for float values. My question is if these are ANALYZE? volumes
> >> why not just use nii2mnc?
> >>
> >>   $ nii2mnc name.hdr out.mnc
> >>
> >> This will take care of all the various datatype issues that you might be
> >> having.
> >>
> >>
> >> --
> >> Andrew Janke
> >> (a.janke at gmail.com || http://a.janke.googlepages.com/)
> >> Canberra->Australia    +61 (402) 700 883
> >>
> >> _______________________________________________
> >> MINC-users at bic.mni.mcgill.ca
> >> http://www2.bic.mni.mcgill.ca/mailman/listinfo/minc-users
> >>
> >
> >
> _______________________________________________
> MINC-users at bic.mni.mcgill.ca
> http://www2.bic.mni.mcgill.ca/mailman/listinfo/minc-users
>


More information about the MINC-users mailing list