ome / omero-figure

An OMERO.web app for creating Figures from images in OMERO
http://figure.openmicroscopy.org
GNU Affero General Public License v3.0
15 stars 31 forks source link

Use thumbnail if scaled region too large #471

Closed will-moore closed 1 year ago

will-moore commented 2 years ago

Fixes #449 Also fixes #453.

To test:

imagesc-bot commented 2 years ago

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

https://forum.image.sc/t/omero-figure-memory-usage-when-loading-slidescans/58322/10

will-moore commented 2 years ago

Current blocker on testing is the import of 2.5 GB file from https://forum.image.sc/t/omero-figure-memory-usage-when-loading-slidescans/58322/11 into merge-ci. Transfer takes over 2 hours (importing from local machine via CLI from within UoD) and ends up failing due to connection loss.

pwalczysko commented 2 years ago

@will-moore https://merge-ci.openmicroscopy.org/web/webclient/?show=dataset-58919 user-3

pwalczysko commented 2 years ago

First testing shows a problem:

  1. Open figure https://merge-ci.openmicroscopy.org/web/figure/new/?image=243715 (user-3).
  2. Observe that the panel is zoomed out fully, do not change this.
  3. Change some rendering settings in the Preview pane, either switch a channel off or slide a Min/Max slider.
  4. Observe that there is a placeholder for couple of seconds (two arrows chasing each other) on the panel.
  5. After the placeholder is gone, the panel is white -> not expected, the expected behaviour is that the rnd settings do not change, as they should be the ones taken from OMERO.
  6. The inspector in FF is showing that the thumbnail is returned as expected, but the experience as described in Ad 5. is not good, suggesting that the returned thumbnail is not being displayed.
  7. Do not zoom in, or change rnd settings now, but drag the panel to make it bigger.
  8. Observe that the dragging in Ad. 7 fixed the problem in Ad 5. -> the panel is no more white, but the thumbnail is displayed, and the rnd settings are the same as in OMERO.
  9. Zoom in and change rnd settings -> observe that the experience is as expected, as long as you zoomed in sufficiently (i.e. zoomed in enough to pass the region where the thumbnail is displayed, and instead, the first subresolution is displayed)
will-moore commented 2 years ago

@pwalczysko it seems those issues are limited to Firefox which doesn't handle a big images very well. That last commit should improve things.

pwalczysko commented 2 years ago

This works fine now on FF. Lgtm.

will-moore commented 2 years ago

For testing the config, I have added to merge-ci:

$ omero config set omero.web.figure.max_rendered_region 1000000

This means that at the smallest pyramid level, if the rendered region is above 1000 x 1000 pixels, then use the thumbnail. The default (tested above) is 5000 x 5000. So with this config, you expect to have to zoom in a bit further before the thumbnail is replaced by the lowest resolution of the pyramid...

pwalczysko commented 2 years ago

In FF, on MacOS, I have a 504 on the Figure in the description. See the url below which does not return:

https://merge-ci.openmicroscopy.org/web/figure/render_scaled_region/243715/0/0/?c=1|0:183$FF0000,2|0:255$00FF00,3|0:255$0000FF&maps=[{%22reverse%22:{%22enabled%22:false}},{%22reverse%22:{%22enabled%22:false}},{%22reverse%22:{%22enabled%22:false}}]&region=92730,38650,1034,1034&m=c

Workflow:

will-moore commented 1 year ago

This is conflicting with #477 so closing for now...