[ome-devel] [ImageJ-devel] [icy] Re: .MRXS files in ICY
Melissa Linkert
melissa at glencoesoftware.com
Thu May 2 18:51:18 BST 2013
Hi Stephane,
> Thanks for your reply, so internally NPDI is jpeg based which
> explain why we can't open very large NDPI image for the moment.
> We have many large NDPI dataset (> 2^31 pixels) here and we had some
> hopes to open them with this method:
>
> byte[] openBytes(int no, byte[] buf, int x, int y, int w, int h)
>
> Do you think that will be possible in future ? I guess that is
> linked to the JPEG reader being able to read only sub part of whole
> image.
You can do that now using the develop branch of
http://github.com/openmicroscopy/bioformats, which corresponds to the
trunk builds:
http://hudson.openmicroscopy.org.uk/view/Bio-Formats/job/BIOFORMATS-trunk/
> By the way what is the limit of JPEG image with the LOCI reader ? We
> tried to load a 39816x29800 jpeg image and we obtain the following
> error :
>
> java.lang.IllegalArgumentException: Array size > Integer.MAX_VALUE!
> at javax.imageio.ImageTypeSpecifier.createBufferedImage(ImageTypeSpecifier.java:1064)
> at javax.imageio.ImageReader.getDestination(ImageReader.java:2879)
> at com.sun.imageio.plugins.jpeg.JPEGImageReader.readInternal(JPEGImageReader.java:980)
> at com.sun.imageio.plugins.jpeg.JPEGImageReader.read(JPEGImageReader.java:948)
> at javax.imageio.ImageIO.read(ImageIO.java:1422)
> at javax.imageio.ImageIO.read(ImageIO.java:1326)
> at loci.formats.in.ImageIOReader.initFile(ImageIOReader.java:118)
> at loci.formats.FormatReader.setId(FormatReader.java:1183)
> at loci.formats.DelegateReader.setId(DelegateReader.java:259)
> at loci.formats.in.JPEGReader.setId(JPEGReader.java:85)
> ...
> java.lang.IllegalArgumentException: Array size > Integer.MAX_VALUE!
>
> Which is surprising as pixel number is below 2^31 and we can open it
> with other software (as default windows preview tool).
> Thanks again for your help.
If there are 3 channels, then the array size would ~3.3 GB, which is
greater than 2^31. The maximum value of X * Y * (bytes per pixel) needs to be
less than (2^31 / getRGBChannelCount()), or ImageIO (which is what Bio-Formats
uses to open JPEG images) will throw an exception.
Regards,
-Melissa
On Thu, May 02, 2013 at 05:31:57PM +0200, Stéphane Dallongeville wrote:
> Hi Melissa,
>
> Thanks for your reply, so internally NPDI is jpeg based which
> explain why we can't open very large NDPI image for the moment.
> We have many large NDPI dataset (> 2^31 pixels) here and we had some
> hopes to open them with this method:
>
> byte[] openBytes(int no, byte[] buf, int x, int y, int w, int h)
>
> Do you think that will be possible in future ? I guess that is
> linked to the JPEG reader being able to read only sub part of whole
> image.
> By the way what is the limit of JPEG image with the LOCI reader ? We
> tried to load a 39816x29800 jpeg image and we obtain the following
> error :
>
> java.lang.IllegalArgumentException: Array size > Integer.MAX_VALUE!
> at javax.imageio.ImageTypeSpecifier.createBufferedImage(ImageTypeSpecifier.java:1064)
> at javax.imageio.ImageReader.getDestination(ImageReader.java:2879)
> at com.sun.imageio.plugins.jpeg.JPEGImageReader.readInternal(JPEGImageReader.java:980)
> at com.sun.imageio.plugins.jpeg.JPEGImageReader.read(JPEGImageReader.java:948)
> at javax.imageio.ImageIO.read(ImageIO.java:1422)
> at javax.imageio.ImageIO.read(ImageIO.java:1326)
> at loci.formats.in.ImageIOReader.initFile(ImageIOReader.java:118)
> at loci.formats.FormatReader.setId(FormatReader.java:1183)
> at loci.formats.DelegateReader.setId(DelegateReader.java:259)
> at loci.formats.in.JPEGReader.setId(JPEGReader.java:85)
> ...
> java.lang.IllegalArgumentException: Array size > Integer.MAX_VALUE!
>
> Which is surprising as pixel number is below 2^31 and we can open it
> with other software (as default windows preview tool).
> Thanks again for your help.
>
> Regards,
>
> - Stephane
>
>
>
> Le 02/05/2013 00:25, Melissa Linkert a écrit :
> >Hi Stephane,
> >
> >Your best bet is to ask on ome-devel and/or look at the open tickets:
> >
> >http://trac.openmicroscopy.org.uk/ome/query?status=accepted&status=new&status=reopened&component=Bio-Formats&col=id&col=summary&col=status&col=type&col=priority&col=milestone&col=component&order=priority
> >
> >In general, pretty much everything except for JPEG-based formats (JPEG,
> >NDPI, Hamamatsu VMS) will work in the latest stable version; for very
> >large images those won't work because the entire image needs to be
> >decoded in order to get a tile. Support for NDPI and VMS is much better on
> >the develop branch (i.e. trunk builds), but opening tiles from a JPEG still
> >requires that the entire image be decoded first.
> >
> >Regards,
> >-Melissa
> >
> >On Mon, Apr 29, 2013 at 09:09:37AM -0700, Stephane wrote:
> >>Hi Curtis,
> >>
> >>Thanks for the information.
> >>We are currently testing the following method to open image tile by tile:
> >> byte[] openBytes(int no, byte[] buf, int x, int y, int w, int h)
> >>
> >>but it appears that all reader do not support it very well, we tested both
> >>on JPEG and NDPI reader and obtained errors in both case. Is there any way
> >>to know how much this method is supported ?
> >>
> >>Glad to hear about the IJ2 work on smart image disk caching, i am impatient
> >>to see that in action :)
> >>
> >>Cheers,
> >>
> >>- Stephane
> >>
> >>
> >>Le lundi 29 avril 2013 17:40:21 UTC+2, Curtis Rueden a écrit :
> >>>Hi Stephane & everyone,
> >>>
> >>>>We are also developing a plugin which may be used to split very large
> >>>>images in tiles but again we are very dependant to what the
> >>>>Bio-Formats library is able to do so it could be limited in some way.
> >>>Bio-Formats provides an API for opening very large image planes in tiles:
> >>>
> >>> byte[] openBytes(int no, int x, int y, int w, int h)
> >>> byte[] openBytes(int no, byte[] buf, int x, int y, int w, int h)
> >>>
> >>>Any valid tile width and height should behave correctly, but for optimal
> >>>performance you can ask for the data's ideal tile size using:
> >>>
> >>> int getOptimalTileWidth()
> >>> int getOptimalTileHeight()
> >>>
> >>>So hopefully it would not be too difficult for Icy to provide a "crop
> >>>image on import" sort of feature -- and maybe eventually a tile-based image
> >>>viewer. Please let us know if you have any trouble with it!
> >>>
> >>>Regards,
> >>>Curtis
> >>>
> >>>P.S. This week, the ImageJ2 team will be working on the underpinnings in
> >>>ImgLib2 for a SCIFIO-driven CellImg with intelligent disk caching. Once
> >>>this work is ready, and if Icy becomes capable of using ImgLib2 data
> >>>structures at the interface level, you could potentially harness this
> >>>feature for tile-based image support.
> >>>
> >>>
> >>>On Mon, Apr 29, 2013 at 9:59 AM, Stephane <stephane.da... at pasteur.fr<javascript:>
> >>>>wrote:
> >>>>Hi,
> >>>>
> >>>>Generally that type of microscope generate multi series image (with
> >>>>different resolution) so even if Icy can't open the full resolution, you
> >>>>should be able to open a sub resolution of the image.
> >>>>We are also developing a plugin which may be used to split very large
> >>>>images in tiles but again we are very dependant to what the Bio-Formats
> >>>>library is able to do so it could be limited in some way. Did you try to re
> >>>>open your image with the last version of Bio-Format ? you should have
> >>>>received an automatic update last friday.
> >>>>
> >>>>Cheers,
> >>>>
> >>>>- Stephane
> >>>>
> >>>>
> >>>>Le lundi 29 avril 2013 13:56:45 UTC+2, henrik aamodt a écrit :
> >>>>> Hi again, thank You for Your reply. Is there a quick way to reduce the
> >>>>>X/Y in images, or has that to be done *before* importing them to ICY or
> >>>>>maybe even when the slides are beeing scanned?
> >>>>>
> >>>>>sincerly
> >>>>>Henrik Aamodt
> >>>>>Oslo University Hospital
> >>>>>Norway
> >>>>>
> >>>>>Den 29.04.13 13:15, skrev Stephane:
> >>>>>
> >>>>>Hi,
> >>>>>
> >>>>>4 or 5 GB is really huge image, if the X/Y dimension is too large (>
> >>>>>32000x32000) then you may experience problems to open them.
> >>>>>
> >>>>>Le vendredi 26 avril 2013 22:00:16 UTC+2, Henrik Aamodt a écrit :
> >>>>>> hi, thanks for Your reply. we will be able to scan to .tiff soon,
> >>>>>>that should resolve the issue. FYI the mirax files are aprox 4.5-5 GB, dont
> >>>>>>have the x/y
> >>>>>>
> >>>>>> henrik aamodt
> >>>>>>norway
> >>>>>>
> >>>>>>Den 26. apr. 2013 kl. 21:38 skrev Stephane <stephane.da... at pasteur.fr>:
> >>>>>>
> >>>>>> Hello,
> >>>>>>
> >>>>>>Sorry for the delay !
> >>>>>>Actually mirax format is not yet supported by Bio-Formats (the library
> >>>>>>we use to open image files) :
> >>>>>>
> >>>>>>http://www.openmicroscopy.org/**site/support/bio-formats/**
> >>>>>>supported-formats.html<http://www.openmicroscopy.org/site/support/bio-formats/supported-formats.html>
> >>>>>>http://trac.openmicroscopy.**org.uk/ome/ticket/4121<http://trac.openmicroscopy.org.uk/ome/ticket/4121>
> >>>>>>
> >>>>>>But at some point they will add support for it.
> >>>>>> From the error message we counld think your image is too big to be
> >>>>>>laoded, do you know the size (X / Y dimension) of your image ?
> >>>>>>
> >>>>>>- Stephane
> >>>>>>
> >>>>>>Le lundi 22 avril 2013 19:38:00 UTC+2, hen... at broadpark.no a écrit :
> >>>>>>>Hi, anyone know a way to import .MRXS image files to ICY? I tried but
> >>>>>>>got "image plane too large".
> >>>>>>>
> >>>>>>> thanks
> >>>>>>>
> >>>>>>--
> >>>>>>You received this message because you are subscribed to a topic in the
> >>>>>>Google Groups "Icy imaging" group.
> >>>>>>To unsubscribe from this topic, visit https://groups.google.com/d/**
> >>>>>>topic/icy-software/**utQCSLMvr1Y/unsubscribe?hl=en<https://groups.google.com/d/topic/icy-software/utQCSLMvr1Y/unsubscribe?hl=en>
> >>>>>>.
> >>>>>>To unsubscribe from this group and all its topics, send an email to
> >>>>>>icy-software... at googlegroups.**com.
> >>>>>>To post to this group, send email to icy-so... at googlegroups.com.
> >>>>>>To view this discussion on the web visit https://groups.google.com/d/**
> >>>>>>msg/icy-software/-/**CrqZqyNHJAgJ<https://groups.google.com/d/msg/icy-software/-/CrqZqyNHJAgJ>
> >>>>>>.
> >>>>>>For more options, visit https://groups.google.com/**groups/opt_out<https://groups.google.com/groups/opt_out>
> >>>>>>.
> >>>>>> --
> >>>>>You received this message because you are subscribed to a topic in the
> >>>>>Google Groups "Icy imaging" group.
> >>>>>To unsubscribe from this topic, visit https://groups.google.com/d/**
> >>>>>topic/icy-software/**utQCSLMvr1Y/unsubscribe?hl=en<https://groups.google.com/d/topic/icy-software/utQCSLMvr1Y/unsubscribe?hl=en>
> >>>>>.
> >>>>>To unsubscribe from this group and all its topics, send an email to
> >>>>>icy-software...@**googlegroups.com.
> >>>>>To post to this group, send email to icy-so... at googlegroups.com.
> >>>>>To view this discussion on the web visit https://groups.google.com/d/**
> >>>>>msg/icy-software/-/2YDns-**bhefAJ<https://groups.google.com/d/msg/icy-software/-/2YDns-bhefAJ>
> >>>>>.
> >>>>>For more options, visit https://groups.google.com/**groups/opt_out<https://groups.google.com/groups/opt_out>
> >>>>>.
> >>>>>
> >>>>> --
> >>>>You received this message because you are subscribed to the Google Groups
> >>>>"Icy imaging" group.
> >>>>To unsubscribe from this group and stop receiving emails from it, send an
> >>>>email to icy-software... at googlegroups.com <javascript:>.
> >>>>To post to this group, send email to icy-so... at googlegroups.com<javascript:>
> >>>>.
> >>>>To view this discussion on the web visit
> >>>>https://groups.google.com/d/msg/icy-software/-/l-yO979eP_MJ.
> >>>>
> >>>>For more options, visit https://groups.google.com/groups/opt_out.
> >>>>
> >>>
> >>_______________________________________________
> >>ImageJ-devel mailing list
> >>ImageJ-devel at imagej.net
> >>http://imagej.net/mailman/listinfo/imagej-devel
>
More information about the ome-devel
mailing list