-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Vectortile investigation #227
Closed
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This was just to aid the discussion at ome/design#99, not to be merged or tested yet... |
However, this doesn't work fully (at least for non-tiled images) since the resulution is always 1 in the setStyle function
will-moore
added a commit
to will-moore/omero-iviewer
that referenced
this pull request
Feb 21, 2019
will-moore
added a commit
to will-moore/omero-iviewer
that referenced
this pull request
Feb 21, 2019
Closed
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is the first steps towards support of large numbers of ROIs in iviewer.
It uses a OpenLayers
VectorTile
layer to load shapes by tile.NB: since we can't (yet) query
Polygons
by x & y coordinates, I used a hack for the DB query: I used a script (https://gist.github.com/will-moore/1255b6675b229fe799b2bb0b0f632ffc) to take each Polygon, Polyline, Retangle or Line find the centre point and create aPoint
at that location with the Polygon ID as the Shape label. This allowed me to query for Points within a tile, get the text (Shape ID) from each and to then get the Shapes within that tile. (Don't need to do this for Ellipses since they already have centre point).This allows us to browse Shapes on images with large numbers of ROIs (see screenshot).
In this case, I had 22792 Polygons (from Orbit) and I created a Point for each (45584 ROIs in total).
See limitations below...
Limitations / questions:
VectorTile
layer andTiledRegions
source instead of theVector
layer andsource/Regions
class. This means that all the shape drawing and manipulation code in thesource/Regions
class is not available, so we can't drag, edit or draw shapes. If we want to support this in future we could possibly:VectorTile
layer for showing existing shapes and add aVector layer + Regions
overlay to allow drawing new shapes.TiledRegions
source. This would probably involve splitting the existingsource/Regions
class to separate the drawing & editing code from theol.source.Vector
base class to allow reuse. Possibly a lot of refactoring!As discussed with @jburel, it's worth pursuing this work ahead of the backend DB support, in order to work out what the API needs to support.
Testing
I have imported the big svs image above and added ROIs from Obit: http://web-dev-merge.openmicroscopy.org/webclient/?show=image-160953 (user-3). Also I have created a multi-T image with lots of ROIs at http://web-dev-merge.openmicroscopy.org/webclient/?show=image-160872 (user-3) and populated it with ~17k ROIs generated by an ImageJ "Analyse Particles" script. Then I ran the
rois_to_centre_points.py
script (see link above) to create centre points for querying shapes by coordinates.<
and next>
buttons and a range slider) and reload ROIs for the chosen page.