Reading Tiff files saved by ImageJ

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Reading Tiff files saved by ImageJ

Laurentius Henricus Holtzer
Dear all,

I have some very large TIFF-files (for example 8 Gb) which I save with ImageJ. However, after this I would like to read them with Matlab and this does not seem to work. Both imread (built-in function of Matlab) or tiffread seem to have problems because of the large size of the TIFF-file. The first image is read normally, but then these Matlab-functions seem to be unable to find the next IFD entry.

I found out that ImageJ places all IFD entries (except the ones from the first image) at the end of the TIFF file. Normally the position of the IFD entries for the next image are stored as a 32-bit value in an IFD entry for the current image. In my case a 64-bit value is needed and it doesn't work. However, imageJ seems to be able to open these TIFF-files without any problem. Can anyone explain me how it does this?

Thank you very much.

Laurent
Reply | Threaded
Open this post in threaded view
|

Re: Reading Tiff files saved by ImageJ

Rasband, Wayne (NIH/NIMH) [E]
On Nov 30, 2010, at 10:12 AM, Laurent Holtzer wrote:

> Dear all,
>
> I have some very large TIFF-files (for example 8 Gb) which I save with ImageJ. However, after this I would like to read them with Matlab and this does not seem to work. Both imread (built-in function of Matlab) or tiffread seem to have problems because of the large size of the TIFF-file. The first image is read normally, but then these Matlab-functions seem to be unable to find the next IFD entry.
>
> I found out that ImageJ places all IFD entries (except the ones from the first image) at the end of the TIFF file. Normally the position of the IFD entries for the next image are stored as a 32-bit value in an IFD entry for the current image. In my case a 64-bit value is needed and it doesn't work. However, imageJ seems to be able to open these TIFF-files without any problem. Can anyone explain me how it does this?

ImageJ only writes the first IFD for TIFF files larger than 4GB. It is able to read such files because it sees "images=n" in the ImageDescription tag and realizes it needs to open n images. You should be able to open such files in Matlab as raw data. Open the file in ImageJ in debugging mode to get the offset to the first image.

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

Re: Reading Tiff files saved by ImageJ

Antoinette
This post has NOT been accepted by the mailing list yet.
Here, I wanna focus one of the function of tiff document reading, that is tiff page or tiff pages extracting. We know, tiff is a multi-page image document file, sometimes, we need to view and processing one or more of the pages, so, what kind of tiff pages extracting tool can be used to export tiff pages?