ome / omero-server

Gradle project containing main server logic for OMERO
https://www.openmicroscopy.org/omero
GNU General Public License v2.0
5 stars 14 forks source link

Thumbnail generation fails for BDV images #121

Open dominikl opened 3 years ago

dominikl commented 3 years ago

Import BDV image from https://downloads.openmicroscopy.org/images/BDV/samples/ . No error on import, the image can be viewed too. But no thumbnail is generated. From the blitz.log:

2021-01-19 10:01:45,190 INFO  [                ome.io.nio.PixelsService] (.Server-12) Creating BfPixelBuffer: /home/omero/omero-server-data/ManagedRepository/user-3_454/Blitz-0-Ice.ThreadPool.Server-12/2021-01/19/09-48-14.591/HisYFP-SPIM.xml Series: 8
2021-01-19 10:01:45,192 INFO  [             omeis.providers.re.Renderer] (.Server-12) Enabling alphaless rendering.
2021-01-19 10:01:45,192 INFO  [             omeis.providers.re.Renderer] (.Server-12) Disabling PriColor rendering, channel color not primary.
2021-01-19 10:01:45,192 INFO  [             omeis.providers.re.Renderer] (.Server-12) Using: 'omeis.providers.re.GreyScaleStrategy' rendering strategy.
2021-01-19 10:01:45,193 INFO  [                 org.perf4j.TimingLogger] (.Server-12) start[1611050505119] time[74] tag[omero.call.exception]
2021-01-19 10:01:45,195 WARN  [        ome.services.util.ServiceHandler] (.Server-12) Unknown exception thrown.

java.lang.RuntimeException: ome.io.nio.DimensionsOutOfBoundsException: Z '160' greater than sizeZ '80'.
    at omeis.providers.re.data.PlaneFactory.createPlane(PlaneFactory.java:225) ~[omero-renderer.jar:5.5.8-SNAPSHOT]
    at omeis.providers.re.GreyScaleStrategy.renderAsPackedInt(GreyScaleStrategy.java:153) ~[omero-renderer.jar:5.5.8-SNAPSHOT]
    at omeis.providers.re.Renderer.renderAsPackedInt(Renderer.java:558) ~[omero-renderer.jar:5.5.8-SNAPSHOT]
    at ome.services.ThumbnailBean.createScaledImage(ThumbnailBean.java:648) ~[omero-server.jar:5.6.2-SNAPSHOT]
    at ome.services.ThumbnailBean.retrieveThumbnail(ThumbnailBean.java:1255) ~[omero-server.jar:5.6.2-SNAPSHOT]
    at ome.services.ThumbnailBean.getThumbnailWithoutDefault(ThumbnailBean.java:1127) ~[omero-server.jar:5.6.2-SNAPSHOT]
    at sun.reflect.GeneratedMethodAccessor2183.invoke(Unknown Source) ~[na:na]
...

Screen Shot 2021-01-19 at 10 10 15

Surprisingly the preview works in Insight but not in Web although afaik both are based on the thumbnail. Screen Shot 2021-01-19 at 09 37 06

imagesc-bot commented 3 years ago

This issue has been mentioned on Image.sc Forum. There might be relevant details there:

https://forum.image.sc/t/import-hdf5-h5-files-to-omero/41770/8

sbesson commented 3 years ago

Cross-linking to https://github.com/ome/bioformats/pull/3151#pullrequestreview-236716575 where this problem had originally been described

The root of the issue is that the BigDataViewer format alongside others like Imaris IMS supports image downsampling alongisde the Z dimension while both OMERO clients and the OMERO server currently assume that Z is constant across resolutions of each image. Depending on the way thumbnails are calculated, the server might thus request a plane for a Z index that does not exist at a given resolution.