[ImageJ-devel] [fiji-devel] reading images larger than signed int max value

Melissa Linkert melissa at glencoesoftware.com
Tue Oct 18 16:41:14 CDT 2011


Hi Albert,

> Thoughts on large files. ImageJ 1 cannot open images larger than the
> maximum signed int value, but there is no reason why ImageJ 2
> shouldn't be able to.
> 
> Are you guys planning for imglib2 on a PlanarCellContainer that
> behaves like a PlanarArrayContainer that has been internally chopped
> up into as many cells as necessary, circumventing the array size
> limit? And given the large size, extra bonus if the file is lazily
> loaded, that is, each cell is loaded on demand from the large file on
> disk.

I won't pretend to know anything about imglib, but for what it's
worth it is possible to read small tiles from images using Bio-Formats (as you
likely already know).  See this method in IFormatReader:

http://git.openmicroscopy.org/?p=bioformats.git;a=blob;f=components/bio-formats/src/loci/formats/IFormatReader.java#l236

Unless the whole image is compressed as a single stream, opening a
small tile will not cause the entire image to be read.

> From some time ago I recall having heard or read that LOCI Bioformats
> can already read ROIs from images in disk. Is that right? If you could
> point me to an example that would b appreciated.

Bio-Formats can read ROIs stored in some file formats, e.g. Zeiss LSM.
A brand new example of how to work with the parsed ROIs is available here:

http://git.openmicroscopy.org/?p=bioformats.git;a=blob;f=components/bio-formats/utils/PrintROIs.java

See also loci.plugins.util.ROIHandler, which translates ROIs read using
Bio-Formats into ImageJ ROIs:

http://git.openmicroscopy.org/?p=bioformats.git;a=blob;f=components/loci-plugins/src/loci/plugins/util/ROIHandler.java

In writing the example I remembered just how painful it is to work with
ROIs using the current API, so if either of those examples is unclear
please let me know.

Regards,
-Melissa

On Sat, Oct 15, 2011 at 12:53:14AM +0200, Albert Cardona wrote:
> Melissa, Curtis, Johannes,
> 
> Thoughts on large files. ImageJ 1 cannot open images larger than the
> maximum signed int value, but there is no reason why ImageJ 2
> shouldn't be able to.
> 
> Are you guys planning for imglib2 on a PlanarCellContainer that
> behaves like a PlanarArrayContainer that has been internally chopped
> up into as many cells as necessary, circumventing the array size
> limit? And given the large size, extra bonus if the file is lazily
> loaded, that is, each cell is loaded on demand from the large file on
> disk.
> 
> From some time ago I recall having heard or read that LOCI Bioformats
> can already read ROIs from images in disk. Is that right? If you could
> point me to an example that would b appreciated.
> 
> What motivated the above is that we are currently dealing with 32k x
> 32k 16-bit images, which we had to cut into tiles. And larger images
> are bound to come.
> 
> Albert
> 
> -- 
> http://albert.rierol.net
> http://www.ini.uzh.ch/~acardona/
> 
> -- 
> You received this message because you are subscribed to the Google Groups "Fiji-devel" group.
> To post to this group, send email to fiji-devel at googlegroups.com.
> To unsubscribe from this group, send email to fiji-devel+unsubscribe at googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/fiji-devel?hl=en.
> 




More information about the ImageJ-devel mailing list