[MINC-users] rawtominc difficulties
Andrew Janke
a.janke at gmail.com
Tue Jul 31 11:39:03 EDT 2007
Also, be careful of imagemagick, it can be compiled with either 8 or
16 bit quanta on different machines. Meaning that you get either a
short or a float. Have dig in the perl guts of mincpik for an idea of
what is going on. (the same as what jason has given below).
I think man convert will tell you which it has been compiled with. (IIRC!)
a
On 8/1/07, Jason Lerch <jason at bic.mni.mcgill.ca> wrote:
> Try something like the following:
>
> convert -depth 8 tifffile.tif rawfile.gray
> cat rawfile.gray | rawtominc -clobber output.mnc 489 366 340
>
> (the -depth in convert is often key)
>
> Jason
>
> Audette, Michel wrote:
> > Dear all,
> >
> > when I try to perform a rawtominc, with any slice number larger than 1, I get rawtominc: Premature end of file.
> > See below:
> >
> > maudette at icaw164201:~/data/ENTdata> rawtominc -clobber HumanS16885_Stack.mnc 489 366 1 -input HumanS16885_Stack.raw
> > maudette at icaw164201:~/data/ENTdata> rawtominc -clobber HumanS16885_Stack.mnc 489 366 2 -input HumanS16885_Stack.raw
> > rawtominc: Premature end of file.
> >
> > maudette at icaw164201:~/data/ENTdata> rawtominc -clobber HumanS16885_Stack.mnc 1 489 366 -input HumanS16885_Stack.raw
> > maudette at icaw164201:~/data/ENTdata> rawtominc -clobber HumanS16885_Stack.mnc 2 489 366 -input HumanS16885_Stack.raw
> > rawtominc: Premature end of file.
> >
> > The following is my tiffinfo result, for the tiff file that produced the raw file.
> >
> > maudette at icaw164201:~/data/ENTdata> !tiff
> > tiffinfo HumanS16885_Stack.tiff
> > TIFFReadDirectory: Warning, HumanS16885_Stack.tiff: unknown field with tag 43314 (0xa932) encountered.
> > TIFF Directory at offset 0x8
> > Subfile Type: (0 = 0x0)
> > Image Width: 489 Image Length: 366
> > Bits/Sample: 8
> > Compression Scheme: None
> > Photometric Interpretation: min-is-white
> > Samples/Pixel: 1
> > Rows/Strip: 366
> > Planar Configuration: single image plane
> > Tag 43314: 18768,18755,18765,16711,366,489,162,768,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,65535,0,0,0,65535,0,0,0,65535,65535,65535,0,0,65535,65535,65535,0,65535,0,255,0,0,0,0,0,0,0,14,0,0,255,255,0,2,16605,15543,42740,56988,49245,30630,62686,39891,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,100,150,16256,0,340,0,0,4,0,0,16256,0,0,255,256,65535,65535,65535,0,0,0,3,0,1392,27000,25964,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
> > TIFFReadDirectory: Warning, HumanS16885_Stack.tiff: TIFF directory is missing required "StripByteCounts" field, calculating from imagelength.
> > TIFF Directory at offset 0x3a086d8
> > Subfile Type: (0 = 0x0)
> > Image Width: 489 Image Length: 366
> > Bits/Sample: 8
> >
> > When I did a tiff2pdf I saw that the pdf file looked fine, and had 340 pages.
> >
> > Can anyone suggest how to proceed? Is there a way of checking that my raw file was properly converted from tiff, to begin with?
> >
> > Thanks for your kind consideration.
> >
> > Cheers,
> >
> > Michel
> >
> > Michel Audette, Ph.D.
> > Innovation Center Computer Assisted Surgery (ICCAS)
> > Philipp-Rosenthal-Strasse 55
> > Leipzig, Germany
> > Phone: ++49 (0) 341 / 97 - 1 20 13
> > Fax: ++49 (0) 341 / 97 - 1 20 09
> >
> >
> >
> > _______________________________________________
> > MINC-users at bic.mni.mcgill.ca
> > http://www.bic.mni.mcgill.ca/mailman/listinfo/minc-users
> >
>
> _______________________________________________
> MINC-users at bic.mni.mcgill.ca
> http://www.bic.mni.mcgill.ca/mailman/listinfo/minc-users
>
--
Andrew Janke (a.janke at gmail.com || http://a.janke.googlepages.com/)
Canberra->Australia +61 (402) 700 883
More information about the MINC-users
mailing list