Open melonora opened 2 weeks ago
@isabela-pf Maybe if you have some ideas about UX:)
Note that you can zoom while drawing, but not pan. This is tricky with the drag based tools, rather than click to place vertex. In the later option 3 would be perfect. Place a vertex, spacebar to pan/zoom, place vertex, continue. But the line, ellipse, rectangle, and lasso are click-n-drag so hard to envision how they would work -- could switch them to click to start click to finish.
Edit: I just checked and the napari behavior is largely similar to QuPath. Can't draw out side of field-of-view and spacebar -- which also toggles pan -- kills drawing shapes, but zoom works. Oh and brush lets you brush out of field of view/out of viewer just like napari elipse/rectangle 🤣 The brush tool is easy to restart after a pan though, so it's less of an issue.
🚀 Feature
When drawing rois for large regions using the Shapes layer, if you are zoomed in and the region extends beyond the canvas shift the camera when the cursor gets close to the canvas edge.
Motivation
Pathologist can annotate large regions in whole slide imaging and still want to be annotating the regions accurately (meaning the regions do not have regularly shaped boundaries, for example anatomical regions). This would mean that they are zooming in and part of the image data would extend beyond the canvas. It can be that a region to be annotated in this case also extends beyond the canvas. Currently panning / zooming while drawing is not supported, making it not possible to draw rois this way.
Pitch
I would have 3 proposals to make the shift of the camera happen while drawing rois.
Personally, I think approach 2, 3 (3 has preference) might be easier to implement, but I would welcome any input before investigating this.
Note: this work is possibly a motivator for a refactor to reuse the tooling across different layers (shapes and labels).