-
Notifications
You must be signed in to change notification settings - Fork 43
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
Prototype for annotator plugins #304
Conversation
Need to update |
I have now ported all annotation tools to the new plugin design and everything is working! Next steps:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This class based creation of dock widgets is a bit more heavy duty that the approach I tried (involving a magicgui container stuffed with the existing widgets). I hope/think that will make it more robust.
I'm broadly supportive of this design. Note that I've mostly looked at the code, and haven't spent time playing with it in the GUI, eg: to check things like whether the embeddings don't get recomputed unnecessarily, or that computing embeddings, then changing the selected input image produces something sensible, etc.
We've discussed this previously, and I still agree that refactoring to reduce duplication (eg: combining the 2D and 3D annotation widgets, etc.) is a good long term goal. Not in this PR, but something later. I think that structure you've made with this design will probably help with that long term goal. It seems a little easier to understand how the pieces fit together here.
Co-authored-by: Genevieve Buckley <[email protected]>
Thanks for the review @GenevieveBuckley !
I have tried each tool a couple of times and everything seems to work. Of course there might still be some more subtle bugs or issue (e.g. that everything is set correctly when updating the image etc.).
Yes, there's probably some more room to combine functionality here in follow up work. Regarding your more in-detail review and next steps:
|
That's great! 😄 Yes, of course unexpected issues can always pop up later. It sounds like this is a good balance between doing enough real world testing to catch any obvious problems, but not too much that holds the project back. |
I see this PR is now out of draft state. I don't have any substantive new comments to add since our last discussion. |
Thanks @GenevieveBuckley. I moved this out of draft because I have merged |
Minimal prototype for annotator plugin.
This is an attempt to refactor the current implementations of annotation tools into proper napari plugins.
It contains a minimal working example for the 2d annotation tool (not yet all features added).
Design
sam_annotator._annotator._AnnotatorBase
initializes all shared functionality for the annotation plugins.sam_annotator.annotator.Annotator2d
._widgets.py
, and some more clean up.This would address #200 and #206.