Napari: Annotations for shape layers

Created on 14 Mar 2019  路  4Comments  路  Source: napari/napari

馃殌 Feature

I think it would be useful to be able to add annotations to the shape layers. In short, I would like to be able to associate a short block of text with a given shape that is then displayed when the user mouses over the shape.

Motivation

When collaborating on a data set, there is often a need to show a collaborator a particular observation (e.g., "this cell looks weird"). Adding an annotation to a shape that bounds a region of interest would be a great way to share such observations.

Pitch

  • This can build on top of the forthcoming shape layer (#100)
  • Initially, the annotation can be displayed as a string in the tool bar (i.e., a tool tip). In the future, it might be nice to be able to display the text in a separate window or in the console to allow for more verbose messaging.
  • Ideally, the annotations should be able to be saved and loaded with the complete viewer state (e.g., coordinates, clims settings, processing steps)

Alternatives

I think this could be achieved purely in the notebook (e.g., the notations are a parameter stored in the data object representing a given shape that can be queried), but I think this is best handled in the viewer.

@sofroniewn, this is the feature we discussed earlier today. Please let me know if anything is unclear.

feature

Most helpful comment

Wow, nice memory - I had forgotten about this issue! I agree with past Kevin 馃槢 I think it would be straightforward to add Shapes.properties in the same manner we have done for the Points layer. I haven't looked into hooking up the color properties as well, but I suspect it is doable.

I think we should focus on finishing up the changes to the Points layer described in #858 and then once we are happy with them, move them over here. Of course, I am happy to bump up the priority of an urgent need arises.

All 4 comments

@kevinyamauchi wanted to bump this issue in light of #858 and https://forum.image.sc/t/add-semantic-labels-in-napari/33484 where similar topics like a properties have been proposed for Points and Labels

Wow, nice memory - I had forgotten about this issue! I agree with past Kevin 馃槢 I think it would be straightforward to add Shapes.properties in the same manner we have done for the Points layer. I haven't looked into hooking up the color properties as well, but I suspect it is doable.

I think we should focus on finishing up the changes to the Points layer described in #858 and then once we are happy with them, move them over here. Of course, I am happy to bump up the priority of an urgent need arises.

I think we should focus on finishing up the changes to the Points layer described in #858 and then once we are happy with them, move them over here.

Agreed

Just want to put this somewhere. It would be nice if we use the properties and color by property functionality and the vispy text visual to make annotations that look something like this straightforward

https://twitter.com/jillianerowe/status/1272432996440838145

image

Was this page helpful?
0 / 5 - 0 ratings