-
Notifications
You must be signed in to change notification settings - Fork 17
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
make multicolor images #326
Comments
Thanks @mezwick for reporting this. @melonora @kevinyamauchi @Czaki does |
Just to add in case useful for others. My current workaround is to load channels into sdata objects as individual images. Though this gets cumbersome for 40 channel high-plex images |
Thanks for sharing your workaround. Maybe you'll find the code below useful. It can be used to programmatically set a colormap, and it could be extended for other settings, like contrast limits. # the 'rasterize_002um' image, and the `new_cmap` variable have been created ealier in the notebook
# below we open napari in headless-mode and preload a layer, then we programmatically set a custom colormap
from napari.utils.colormaps import Colormap
from napari_spatialdata import Interactive
napari_cmap = Colormap(new_cmap.colors, "viridis_zero_transparent")
interactive = Interactive(sdata, headless=True)
interactive.add_element(f"rasterized_002um", "global", view_element_system=True)
interactive.get_layer(f"rasterized_002um").colormap = napari_cmap
interactive.run() The code is from the Visium HD notebook (at the end). |
Thanks for all your work on spatialdata and napari viewer.
Unless i have missed it, one missing aspect i would like is the ability to make multicolor images of image elemtns in spatialdata objects, within the spatial-data napari viewer plugin. So far as i can tell, this is not possible.
Expected behaviour
Issue
Selecting a second channel, resets the whole image. Can only view one image at a time
Potential solutions
Option to load channels as individual image layers?
The text was updated successfully, but these errors were encountered: