It was first posted in image.sc forum. The layer bounding box shows the required effect in 2D viewing mode. However, as soon as we switch to 3D mode, the bounding box goes to the default color [red] and default thickness.
Furthermore, if we specify n_display=3 either when initializing viewer as viewer = napari.Viewer(ndisplay=3) or later by keeping viewer.dims.ndisplay = 3 line before img_layer.bounding_box.line_color = 'magenta' line, we can see the desired effect at the first time. But if we switch to 2D mode and then to 3D mode, the bounding_box will regain its default color and thickness.
π‘ Steps to Reproduce
Please run the aboA simple code to generate this effect is shown below.
π Bug Report
It was first posted in image.sc forum. The layer bounding box shows the required effect in 2D viewing mode. However, as soon as we switch to 3D mode, the bounding box goes to the default color [red] and default thickness.
Furthermore, if we specify
n_display=3
either when initializing viewer asviewer = napari.Viewer(ndisplay=3)
or later by keepingviewer.dims.ndisplay = 3
line beforeimg_layer.bounding_box.line_color = 'magenta'
line, we can see the desired effect at the first time. But if we switch to 2D mode and then to 3D mode, the bounding_box will regain its default color and thickness.π‘ Steps to Reproduce
Please run the aboA simple code to generate this effect is shown below.
Expected behavior in 2D viewing mode
Unexpected behavior in 2D viewing mode
π‘ Expected Behavior
No response
π Environment
napari: 0.4.19.post1 Platform: Windows-10-10.0.22631-SP0 Python: 3.10.11 (tags/v3.10.11:7d4cc5a, Apr 5 2023, 00:38:17) [MSC v.1929 64 bit (AMD64)] Qt: 5.15.2 PyQt5: 5.15.10 NumPy: 1.24.3 SciPy: 1.10.1 Dask: 2024.3.1 VisPy: 0.14.2 magicgui: 0.8.2 superqt: 0.6.2 in-n-out: 0.2.0 app-model: 0.2.5 npe2: 0.7.4
OpenGL:
Screens:
Settings path:
π‘ Additional Context
No response