[MINC-users] possible bug in cygwin minc2 tools

Rupert Brooks rbrooks at cyberus.ca
Tue Feb 7 13:51:18 EST 2006


Hi,

I think i may have found a small bug in the Cygwin minc tools.  If
this is not the right place to report it please let me know where.

It appears to me that minctoraw is bailing out when it encounters a
byte of value 26 in a raw data file.  If its what i think it is, Ive
seen this type of thing before, and its because windows thinks of this
byte (CTRL-Z) as an end of file character.  There is some sort of
option you pass to the in/out stream (in C++ anyway) to get around it.

Anyway, to demonstrate the problem, i used the attached binary file,
and the following command line.  The numbers dont matter, i cut and
pasted it from something.  Anyway, this works great on the attached
binary file, on unix, but fails on WinXP with the following message 
(the attached binary is just the following bytes 0 26 0 26 0 26 0 26)

rawtominc: Premature end of file.

I am using the Windows binaries for MINC2 contributed by Leila
Baghdadi linked from the following page.
http://www.bic.mni.mcgill.ca/software/minc/ I do not know whether this
problem afflicts other MINC compilations.

Rupert

rawtominc -zyx -byte -unsigned -clobber -input 8bytes.raw -xstep 0.30664 -ystep
0.492 -zstep 0.30664 -origin -54.388 -66.8634 -43.9706
-xdircos 0.9965045488 -0.0338332 -0.0763806179
-ydircos 0.0280853 0.996779 -0.0751118973
-zdircos 0.0786759 0.0727041732 0.9942455 8bytes.mnc 2 2 2





--
--------------------------------------------------------------
Rupert Brooks
McGill Centre for Intelligent Machines (www.cim.mcgill.ca)
Ph.D Program in Intelligent Systems
http://www.cyberus.ca/~rbrooks


More information about the MINC-users mailing list