-
-
Notifications
You must be signed in to change notification settings - Fork 411
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
Again fix translate of overlays (this time with tests) #6927
Conversation
@psobolewskiPhD @brisvag During fixing this I hit multiple walls (before I decided to use corner pixels). Could you please try to play with yours datasets and validate if it looks correctly? @napari/core-devs testing this is not trivial, but looks really required. Maybe one of you will have idea how to improve tests. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #6927 +/- ##
==========================================
- Coverage 92.82% 92.76% -0.07%
==========================================
Files 613 613
Lines 55640 55681 +41
==========================================
+ Hits 51647 51651 +4
- Misses 3993 4030 +37 ☔ View full report in Codecov by Sentry. |
Sorry, I missed the earlier discussions — can you tell me what a "child node" is in the context of multiscales? Are they tiles? Or...? |
Adding docstrings to the tests would be really handy. "Issue #6897 showed that we were offsetting overlays for multiscale layers incorrectly because [...]. This test checks against that by creating a multiscale layer then [...], which previously would have done [...] but now does [...]." |
Not sure if it's helpful, but in general, I like the vispy integration tests like the ones you wrote. They exercise a critical large integration of napari's code, without bringing in the whole viewer. So I think a little complexity/maintenance is worth it. Will try to take a more detailed look later today or tomorrow! |
Child nodes are overlays at this moment. I'm not familiar with async rendering. |
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.
Possible followup: I think the "nice" way to solve this would be to have multiscale layers be an custom empty node in the vispy scenegraph with overloaded bounds
, so that from the outside it looks like the full normal-sized image. Then, the tiles should be children of this.
Maybe even have |
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.
Sorry, I missed the earlier discussions — can you tell me what a "child node" is in the context of multiscales? Are they tiles? Or...?
@jni, child_node
here always refers to vispy nodes that are children of the actual "data" node, i.e: overlays. In the case of multiscale, the data node is the tile. The child is still an overlay. The reason why this needs special treatment is that overlays like bounding box and transform box are relying on the parent node's transforms and bounds()
method to know "how big" the data is, and in the case of multiscale this needs to basically undo the tiling step, IIRC.
Co-authored-by: Lorenzo Gaifas <brisvag@gmail.com>
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.
References and relevant issues
closes #6897
fix again bug from #6633
Description
This PR is fixing again problems with transforms of overlays, this time it contains basic tests.