Skip to content
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

The channel slider works only for a single channel image. #273

Open
LucaMarconato opened this issue Jul 14, 2024 · 2 comments
Open

The channel slider works only for a single channel image. #273

LucaMarconato opened this issue Jul 14, 2024 · 2 comments
Labels
macos Suspected macOS-specific behavior

Comments

@LucaMarconato
Copy link
Member

When adding two images, the channel slider (bottom of the interface) doesn't work on the second image; to fix one needs to first delete the first image.

To reproduce, run the code:

from spatialdata import SpatialData
from spatialdata.models import Image2DModel
from napari_spatialdata import Interactive
from numpy.random import default_rng

RNG = default_rng(0)
image0 = Image2DModel.parse(RNG.random((5, 100, 100)))
image1 = Image2DModel.parse(RNG.random((5, 100, 100)))

sdata = SpatialData.init_from_elements({'image0': image0, 'image1': image1})

Interactive(sdata)

and then:

  1. add image0, the slider in the bottom of the interface works
  2. add image1 (which is now in focus), the slide will not work
  3. delete image0, the slider will work again, on image1.
@melonora
Copy link
Collaborator

so for me this does seem to work, I tested this by rendering image0 not visible and I still do see Image1 changing. However, for me the thumbnail of Image1 is not being updated while for Image0 it is. Might check together in person regarding this, but this could be a bug in napari core.

@LucaMarconato
Copy link
Member Author

Thanks for checking! I'll add a tag "macos" 😅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
macos Suspected macOS-specific behavior
Projects
None yet
Development

No branches or pull requests

2 participants