pyapp-kit / ndv

Simple, fast-loading, n-dimensional array viewer with minimal dependencies.
BSD 3-Clause "New" or "Revised" License
40 stars 7 forks source link

BIG WIP: feat: ROI model/view #54

Open gselzer opened 1 week ago

gselzer commented 1 week ago

This PR provides a ROIModel class to maintain state about regions of interest, as well as a PRoiView protocol for views to implement when they want to react to changes in a ROIModel. This PR is by no means ready for merge, but exists for visibility and discussion about what is needed here.

For now, I'll edit mvc.py to include a (rectangular) ROI - next steps are to make it movable/resizable

Running points of discussion:

gselzer commented 1 week ago

@tlambert03 one fun bug that just popped up for me is some strange rendering behavior if you run mvc.py, but then use the roi button to create a new ROI - parts of the rectangle border do not render (and the specific ones that do changed based on the window zoom), and the handles are occluded by the rectangle...kinda?

I'd be interested to see if you can reproduce 😅

python_oE1INx9Fq4

tlambert03 commented 3 days ago

I'd be interested to see if you can reproduce 😅

nope... wasn't able to see that