[ome-users] Large SVS file convertion problem

Melissa Linkert melissa at glencoesoftware.com
Sun Oct 28 22:57:59 GMT 2012


Hi JJ,

> Thank you so much for the quick reply! This is very helpful. I was
> able to convert SVS to OME-TIFF (w/o JPEG compression). But when I
> turn on JPEG compression, it always gave me the following exception.

This is not a problem with your file, but rather something that we need
to fix in Bio-Formats.  I have filed a ticket on our issue tracking
system:

http://trac.openmicroscopy.org.uk/ome/ticket/9806

Regards,
-Melissa

On Fri, Oct 26, 2012 at 12:53:55PM -0400, Jianjiong Gao wrote:
> Hi Melissa,
> 
> Thank you so much for the quick reply! This is very helpful. I was
> able to convert SVS to OME-TIFF (w/o JPEG compression). But when I
> turn on JPEG compression, it always gave me the following exception.
> 
> Exception in thread "main" java.awt.image.RasterFormatException: Data
> array too small (should be 65535 but is 21845 )
> 	at sun.awt.image.IntegerComponentRaster.verify(IntegerComponentRaster.java:643)
> 	at sun.awt.image.IntegerComponentRaster.<init>(IntegerComponentRaster.java:194)
> 	at sun.awt.image.IntegerInterleavedRaster.<init>(IntegerInterleavedRaster.java:111)
> 	at sun.awt.image.IntegerInterleavedRaster.<init>(IntegerInterleavedRaster.java:78)
> 	at java.awt.image.Raster.createWritableRaster(Raster.java:994)
> 	at loci.formats.gui.AWTImageTools.constructImage(AWTImageTools.java:702)
> 	at loci.formats.gui.AWTImageTools.constructImage(AWTImageTools.java:653)
> 	at loci.formats.gui.AWTImageTools.makeRGBImage(AWTImageTools.java:591)
> 	at loci.formats.gui.AWTImageTools.makeImage(AWTImageTools.java:207)
> 	at loci.formats.gui.AWTImageTools.makeImage(AWTImageTools.java:494)
> 	at loci.formats.codec.JPEGCodec.compress(JPEGCodec.java:85)
> 	at loci.formats.tiff.TiffCompression.compress(TiffCompression.java:328)
> 	at loci.formats.tiff.TiffSaver.writeImage(TiffSaver.java:371)
> 	at loci.formats.tiff.TiffSaver.writeImage(TiffSaver.java:265)
> 	at loci.formats.out.TiffWriter.saveBytes(TiffWriter.java:191)
> 	at loci.formats.out.OMETiffWriter.saveBytes(OMETiffWriter.java:197)
> 	at loci.formats.tools.ImageConverter.convertTilePlane(ImageConverter.java:569)
> 	at loci.formats.tools.ImageConverter.convertPlane(ImageConverter.java:513)
> 	at loci.formats.tools.ImageConverter.testConvert(ImageConverter.java:459)
> 	at loci.formats.tools.ImageConverter.main(ImageConverter.java:645)
> 
> An example svs file is http://goo.gl/JBZhL
> 
> Do you think it is a problem with the svs file or some potential bug
> in the tool?
> 
> Thanks again and best regards!
> -JJ
> 
> 
> 
> On Thu, Oct 25, 2012 at 7:14 PM, Melissa Linkert
> <melissa at glencoesoftware.com> wrote:
> > Hi,
> >
> >> Lately, I am using the Bio-Formats/bfconvert to convert SVS to JPEG.
> >> Some of the SVS files are really big and I got the follow exception:
> >>
> >> Exception in thread "main" loci.formats.FormatException: Image plane
> >> too large. Only 2GB of data can be extracted at one time. You can
> >> workaround the problem by opening the plane in tiles; for further
> >> details, see: http://www.openmicroscopy.org/site/support/faq/bio-formats/i-see-an-outofmemory-or-negativearraysize-error-message-when-attempting-to-open-an-svs-or-jpeg-2000-file.-what-does-this-mean
> >>
> >> Is there any easy solution for this problem? Do I have to crop a large
> >> image into smaller pieces first? Is there any way to stitch them
> >> together after converting?
> >
> > Bio-Formats does not support saving images with more than 2 GB of pixel
> > data into a single JPEG file.  You will need to save smaller tiles into
> > separate JPEG files, like this:
> >
> >   $ bfconvert -crop 0,0,4096,4096 input.svs output.jpg
> >
> > where '0,0,4096,4096' is the X coordinate, Y coordinate, width, and
> > height of the tile to be saved.
> >
> > However, you could convert to an OME-TIFF file (with or without JPEG
> > compression) instead, and then there is no need to save individual tiles or
> > stitch them back together.  This command should save the entire image
> > into a single file (with JPEG compression):
> >
> >   $ bfconvert -compression JPEG input.svs output.ome.tiff
> >
> > Regards,
> > -Melissa
> >
> > On Thu, Oct 25, 2012 at 03:26:12PM -0400, Jianjiong Gao wrote:
> >> Hello,
> >>
> >> First of all, thanks for maintaining such a great resource!
> >>
> >> Lately, I am using the Bio-Formats/bfconvert to convert SVS to JPEG.
> >> Some of the SVS files are really big and I got the follow exception:
> >>
> >> Exception in thread "main" loci.formats.FormatException: Image plane
> >> too large. Only 2GB of data can be extracted at one time. You can
> >> workaround the problem by opening the plane in tiles; for further
> >> details, see: http://www.openmicroscopy.org/site/support/faq/bio-formats/i-see-an-outofmemory-or-negativearraysize-error-message-when-attempting-to-open-an-svs-or-jpeg-2000-file.-what-does-this-mean
> >>
> >> Is there any easy solution for this problem? Do I have to crop a large
> >> image into smaller pieces first? Is there any way to stitch them
> >> together after converting?
> >>
> >> Thank you!
> >> -JJ
> >> _______________________________________________
> >> ome-users mailing list
> >> ome-users at lists.openmicroscopy.org.uk
> >> http://lists.openmicroscopy.org.uk/mailman/listinfo/ome-users



More information about the ome-users mailing list