Problem opening a TIFF stack > 2GB

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Problem opening a TIFF stack > 2GB

aweitz
I have a ~3GB 16-bit TIFF file that I'm trying to open as a stack.  I'm using Vista x64, and I have 4 GB of RAM.  My max memory for ImageJ is set to 3500 MB.  I'm using version 1.42q.

My image has 6000 slices, but only the first 4260 slices are loaded.  It turns out that these 4260 stacks constitute 2GB of image data.  (I know this because the title about the loaded image stack says "2GB".)  For some reason, all the slices after #4260 are being ignored.

I have also tried loading the image as a TIFF Virtual Stack, but I run into the same problem.

Does anyone know why this is happening?  Thanks!!!
Reply | Threaded
Open this post in threaded view
|

Re: Problem opening a TIFF stack > 2GB

aweitz
I've further diagnosed the problem, but I'm not sure where to go from here:
In the TiffDecoder getTiffInfo() function, ifdOffset is an int.  Once the slice number reaches 4260, ifdOffset becomes greater than the max value for an int.  This is the cause of my problem.  Does anyone have suggestions?  Is this a bug in TiffDecoder?

aweitz wrote
I have a ~3GB 16-bit TIFF file that I'm trying to open as a stack.  I'm using Vista x64, and I have 4 GB of RAM.  My max memory for ImageJ is set to 3500 MB.  I'm using version 1.42q.

My image has 6000 slices, but only the first 4260 slices are loaded.  It turns out that these 4260 stacks constitute 2GB of image data.  (I know this because the title about the loaded image stack says "2GB".)  For some reason, all the slices after #4260 are being ignored.

I have also tried loading the image as a TIFF Virtual Stack, but I run into the same problem.

Does anyone know why this is happening?  Thanks!!!
Reply | Threaded
Open this post in threaded view
|

Re: Problem opening a TIFF stack > 2GB

Wayne Rasband
In reply to this post by aweitz
On Jun 18, 2009, at 12:12 AM, aweitz wrote:

> I have a ~3GB 16-bit TIFF file that I'm trying to open as a stack.  
> I'm using
> Vista x64, and I have 4 GB of RAM.  My max memory for ImageJ is set to
> 3500
> MB.  I'm using version 1.42q.
>
> My image has 6000 slices, but only the first 4260 slices are loaded.  
> It
> turns out that these 4260 stacks constitute 2GB of image data.  (I
> know this
> because the title about the loaded image stack says "2GB".)  For some
> reason, all the slices after #4260 are being ignored.
>
> I have also tried loading the image as a TIFF Virtual Stack, but I run
> into
> the same problem.
>
> Does anyone know why this is happening?  Thanks!!!

This bug is fixed in the v1.43a daily build.

-wayne
Reply | Threaded
Open this post in threaded view
|

Re: Problem opening a TIFF stack > 2GB

aweitz
Thanks, Wayne!!!

Wayne Rasband wrote
On Jun 18, 2009, at 12:12 AM, aweitz wrote:

> I have a ~3GB 16-bit TIFF file that I'm trying to open as a stack.  
> I'm using
> Vista x64, and I have 4 GB of RAM.  My max memory for ImageJ is set to
> 3500
> MB.  I'm using version 1.42q.
>
> My image has 6000 slices, but only the first 4260 slices are loaded.  
> It
> turns out that these 4260 stacks constitute 2GB of image data.  (I
> know this
> because the title about the loaded image stack says "2GB".)  For some
> reason, all the slices after #4260 are being ignored.
>
> I have also tried loading the image as a TIFF Virtual Stack, but I run
> into
> the same problem.
>
> Does anyone know why this is happening?  Thanks!!!

This bug is fixed in the v1.43a daily build.

-wayne