ome / design

OME Design proposals
http://ome.github.io/design/
1 stars 15 forks source link

iviewer many ROIs #99

Open will-moore opened 5 years ago

will-moore commented 5 years ago

We need to be able to handle & browse (and edit?) larger numbers of ROIs in iviewer.

Limitations on large numbers are:

Currently we don't support pagination so we are limited to the max for a single page specified by $ bin/omero config set omero.web.api.max_limit which is 500 by default (see https://docs.openmicroscopy.org/omero/5.4.9/developers/json-api.html).

We could add pagination support to load more ROIs, but we probably want to keep all loaded ROIs in hand as much as possible instead of a single page at a time. This is similar to thumbnails on left panel - we load 10 at a time but don't discard any so it's possible to load ALL eventually.

What does GS do with Pathviewer?

cc @jburel @joshmoore

will-moore commented 5 years ago

Do we have any way to query ROIs / shapes and filter by coordinates? Easy enough for e.g. Points and Rectangles (unless they have a crazy transform on them) but what about Polygons & Polylines? Without that it's impossible to load shapes for a region.

Clustering (example: https://openlayers.org/en/latest/examples/cluster.html) is nice but we still need all the shapes loaded in the browser. It might be possible to load a clustered ROI summary from the server for a particular zoom level (like loading tiles for low resolutions) but this would still require a DB query based on coordinates.

manics commented 5 years ago

Polygons/polylines are stored as a single strings of coordinates so the only way to query them would be to parse them all... not very efficient. Masks have a bounding box (though that's defined by the user so can include empty space), maybe this could be added to the DB for polygons/polylines?

pwalczysko commented 5 years ago

Actually, there was an externally coming RFE, which requested that iviewer would show the ROIs whilst hovering with the mouse over the image. The person coming up with the RFE was struggling to find the ROI in the image (large image, small ROIs). Although it is not directly what is being discussed here, it gives a perspective about how the user wants to work with ROIs (and their loading) -> image centric, not table centric (see your second bullet point in "how to request next page" @will-moore )

joshmoore commented 5 years ago

maybe this could be added to the DB for polygons/polylines?

A previously discussed alternative was to make use of postgis for these look ups.

will-moore commented 5 years ago

See https://github.com/ome/omero-iviewer/pull/227 for an investigation of loading shapes by tile for big images.

will-moore commented 5 years ago

After discussing https://github.com/ome/omero-iviewer/pull/227 with @jburel, we considered various stages of support for lots of ROIs:

will-moore commented 5 years ago

After thinking about this a bit more, I think we can get a long way by:

This means that you can still edit ROIs and Shapes and you can still find Shapes on the image via loading them in the table first. Limitations with pagination:

mtbc commented 5 years ago

It's good you're pushing the client side: if need be we could even consider a bulk-ROI microservice that would maintain a consistent API for clients while we figure out server-side indexed storage like PostGIS.

will-moore commented 5 years ago

Following the demo of Tiled ROIs https://github.com/ome/omero-iviewer/pull/242 at the team meeting yesterday, I have added the current API query I'm making to the Trello card at https://trello.com/c/Tsv0yVe1/97-query-shapes-by-geometry

will-moore commented 5 years ago

From @chris-allan: see example at https://openlayers.org/en/master/examples/icon-sprite-webgl.html which loads 80k points. Could use this approach to show the centre-point for a similar number of shapes on an image.

chris-allan commented 5 years ago

See also:

/cc @knabar

jburel commented 5 years ago

Harald looks at clustering a while back so it might be worth resurrecting some of the investigations work