[MINC-development] me, I'm stumped

Jason Lerch minc-development@bic.mni.mcgill.ca
30 Apr 2003 16:23:05 -0400


Hi all,

OK, I'm officially stumped:

I'm trying to create a large minc file with the following dimensions:
470*2800*2400

The source is 470 images, each with the dimensions of 2800*2400. So,
naturally, I'm using a 64-bit compiled version of rawtominc. This is the
call:

cat *.raw |
/home/bic/jason/seconddir/minc64/src/minc/progs/rawtominc/rawtominc
-clobber -yzx -xstep -0.01 -ystep 0.1 -zstep -0.01 test.mnc 470 2400
2800

This, however, crashes with the following message:

ncendef: ncid 3: Invalid argument

At the time of the crash, the file has the following size:

2147450880

If I resize the input files so that the final output is less than that
magical 2GB limit (and adjust the size options for rawtominc
accordingly), it works just fine. So this appears to be something to do
with files over the 2GB limit. The point of the crash in rawtominc is
here:

   (void) miattputstr(cdfid, imgid, MIsigntype, osign);
   if (ovrange_set) 
      (void) miset_valid_range(cdfid, imgid, ovalid_range);

   /* End definition mode */
   (void) ncendef(cdfid);

It gets to the ncendef call, but does not progress past it.

I've spent a good part of today trying to figure out why this would be
the case, but have come up with nothing obvious (and certainly no fix).
So any help/suggestions would be greatly appreciated!

Jason

P.S. I also tried the 64-bit version of rawtominc that John sent to the
geeks list a few months ago, but with the same results.

P.P.S If anybody wants the input files to play with, look here:

/data/rome/temp/jason/histo

the files there are in raw byte format, as generated by convert file.png
GRAY:file.raw