informatics-isi-edu / openseadragon-viewer

2D viewer with openseadragon
Apache License 2.0
5 stars 2 forks source link

Customize the displayed tooltips for annotations #95

Open RFSH opened 2 years ago

RFSH commented 2 years ago

Currently while saving annotation files, we're attaching id in the format of <anatomy-vocab-id-col-value>,<anatomy-vocab-name-col-value> to the SVG files in chaise. Then osd-viewer will use this format to create the tooltips that are displayed for each annotation with the following format: <anatomy-vocab-name-col-value> (<anatomy-vocab-name-id-value>).

This is not the desired behavior in all deployments, and we should consider allowing the customization of this behavior. In Facebase, we would like to:

Given that this is different from what GUDMAP requires, we should either allow full customization or just options to choose between the two. This requires more thought and discussion

Regarding the second bullet, the main issue with always showing the anatomy terms on the image is positioning. Given that you can draw a free-form path, it's hard to develop a heuristic to position the term properly that doesn't block anything else. Because of this, if we were always to show the label, we would have to allow you to move them around as well (which will be new functionality. Currently, each drawing is "finalized," and you cannot move your drawings).

To solve this, we could show the anatomy terms in a legend format in the corner of the viewport. But that's assuming the annotations are appropriately colored, and the user is not using the same color for multiple anatomies. Also, showing an arrow might be useful.