Open andy-sweet opened 3 weeks ago
Also note that toggling the visibility of the node or taking several other actions seems to fix this, so this may not be directly related to tile2data after all, and instead may be related to the bounding box transform being updated at the right time.
Thanks for opening this, I've run into it before "live" while doing something and then forgotten to track it down because it wasn't consistent.
🐛 Bug Report
When showing the bounding box for a multi-scale image at some resolution other than its highest (i.e. other than level 0), it is too large.
💡 Steps to Reproduce
One way to reproduce this issue is to show a multi-scale image in 3D since that always uses the lowest resolution image.
There are ways to write tests with non-public APIs to force similar behavior for 2D. Or you can force the multi-scale image slicing code to use a specific
level
to see the effect in 2D.💡 Expected Behavior
I expect the bounding-box to always show the correct extent of the image, regardless of the scale being viewed.
🌎 Environment
napari: 0.4.17rc4.dev804+g1bcbbf885.d20240625 Platform: macOS-14.5-arm64-arm-64bit System: MacOS 14.5 Python: 3.10.14 | packaged by conda-forge | (main, Mar 20 2024, 12:51:49) [Clang 16.0.6 ] Qt: 5.15.11 PyQt5: 5.15.10 NumPy: 1.26.4 SciPy: 1.13.1 Dask: 2024.5.1 VisPy: 0.14.2 magicgui: 0.8.2 superqt: 0.6.6 in-n-out: 0.2.1 app-model: 0.2.7 npe2: 0.7.5
OpenGL:
Screens:
Optional:
Settings path:
💡 Additional Context
This issue comes from a similar fix: https://github.com/napari/napari/pull/6319#issuecomment-2192432547
I think this can be fixed by modifying the child transform so that it also factors in the scale component of
tile2data
, not just the offsets.