Skip to content
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

Barebone annotate #233

Open
wants to merge 62 commits into
base: main
Choose a base branch
from
Open

Barebone annotate #233

wants to merge 62 commits into from

Conversation

melonora
Copy link
Collaborator

@melonora melonora commented Apr 9, 2024

This PR serves to provide a barebone annotation widget. At the moment only shape annotations are supported but I am to extend this to points and perhaps labels as well. Furthermore, at a later stage also a table widget will be provided.

Currently, the user can annotate using and also reload shape annotations. The description column at the moment serves no purpose but this will come with the table widget.

@LucaMarconato maybe before putting this in we need to discuss a little bit about UI experience.

@LucaMarconato LucaMarconato mentioned this pull request Apr 10, 2024
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@LucaMarconato
Copy link
Member

LucaMarconato commented May 28, 2024

Open points from the test together (these are all mac specific):

  • bug with lasso (to replicate: open the annotation widgret, create a shapes layer, rename it, then use the lasso). If the layer is linked, the lasso works again.
  • (tiny) after modifying the class text it feels natural to use to clear focus
  • general bug with radio selection and colors
  • color selection (with the color widget) doesn't update the colors in the "layer controls" widget
  • works on Wouter's Mac but not on Luca's one: switching between layers doesn't update the list of classes.

Non mac specific

  • luca: mergecheckout incremental io and test the saving

@LucaMarconato
Copy link
Member

LucaMarconato commented May 30, 2024

Small comment:

  • please document the code inside on_mouse_move() in _view.py.

@LucaMarconato
Copy link
Member

LucaMarconato commented May 30, 2024

Bug:

  • _on_inserted() is not called when a shapes layer is created before opening the annotation widget. A consequence of this is that, after setting the annotation on shape and after deselecting the shape, hovering the mouse on the shape will not show the text that has been saved. This because the callback for on_mouse_move() is set in _on_insterted(), which is never called.

@LucaMarconato
Copy link
Member

LucaMarconato commented May 30, 2024

I tested the saving (on the incremental io branch). I found some bugs:

  • when saving an element, the View widget is not updated. Workaround: from the element widget add the element, and delete it; now the View widget is updated an it works.
  • The colors of the annotation widget do not correspond to the colors used for plotting, easy fix.
  • The "Annotation table" dropdown combobox does not update the color classes.

Saving and overwriting work!

@LucaMarconato
Copy link
Member

LucaMarconato commented May 30, 2024

Bug that I probably introduced here (I was working on performance in order to avoid copies) https://github.com/scverse/napari-spatialdata/pull/239/files in _model.py:

  • when trying to plot instance_key an error is raised. The user playing around with the annotation widget may encounter this bug because the table created has only a few columns, so it's likely to try to plot instance_id.

@melonora
Copy link
Collaborator Author

melonora commented Jun 6, 2024

I tested the saving (on the incremental io branch). I found some bugs:

  • when saving an element, the View widget is not updated. Workaround: from the element widget add the element, and delete it; now the View widget is updated an it works.
  • The colors of the annotation widget do not correspond to the colors used for plotting, easy fix.
  • The "Annotation table" dropdown combobox does not update the color classes.

Saving and overwriting work!

not certain what you mean with the last point

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants