scverse / scverse/napari-spatialdata
The channel slider works only for a single channel image.
Open
Nobody has claimed this yet.
macos
- Dominant language
- Python
- Stars
- 90
- Forks
- 25
- Avg merge
- 22m
- Merged PRs (30d)
- 1
Description
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:
- add
image0, the slider in the bottom of the interface works - add
image1(which is now in focus), the slide will not work - delete
image0, the slider will work again, onimage1.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by running the provided Python reproduction with Interactive and two Image2DModel images, then trace how the channel slider handles the focused image when both image0 and image1 are present. Done means the slider changes channels for image1 without requiring image0 to be deleted, while preserving the existing single-image behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- data-visualization
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100