-
Notifications
You must be signed in to change notification settings - Fork 48
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
Enhancement: Local SpatialData object with remotely accessed pyramidal OME-ZARR image #831
Comments
Hi, thanks for sharing! The problem here is that Here the approach would be to use To enable this we can add support for reading a I agree that this constitutes an important use case, so we will try to prioritize working on this. We need first to enable partial reading (which is a subtask of this #521), and then extend that for remote data also. |
@edoumazane as a workaround you could do interactive = Interactive(sdata)
interactive.viewer # add WSI layers using napari APIs
interactive.run() |
Thank you @LucaMarconato the workaround works fine! # open local sdata and display in GUI
sdata = sd.read_zarr(local_path)
interactive = Interactive(sdata)
# open the distant pyramid
store = zarr.open(distant_uri, "r")
multiscale_data = [da.from_zarr(store[key]) for key in store.array_keys()]
multiscale_data = [da.swapaxes(data, 0, -1) for data in multiscale_data]
# add the distant pyramid to the GUI
interactive._viewer.add_image(multiscale_data, name="full_res", rgb=True) |
Happy to hear that the workaround works for you! For fixing the coordinate transformations I suggest to call get_transformation_between_coordinate_systems() followed by a call of |
WSIs can account for > 90% of a Spatial Transcriptomics experiment.
This can limit the number of datasets i can host and open on my laptop or workstation
Describe the solution you'd like
I'd like to leave the WSIs (saved as pyramidal ZARR files) on a S3 bucket or on a distant SSH server, and work with SpatialData "as if" the WSI was local.
Describe alternatives you've considered
I can open a multiscale image in
napari
, overlay a label layer (with coarser pixels) for an annotation tasks.Zoom in and out is very smooth.
Below is the code for display the image and 2 screenshots of the usecase.
(EDIT: scalebar is wrong, obviously 🙄)
Loading is fast (10-20s). Zooming in is smooth enough in my opinion for typical tasks.
It would be very nice to be able to do the same in the
napari-spatialdata
context.What i tried
It takes > 1 min, probably loading all image (then zooming is fast).
Each time layer visibility is toggled, it takes another minute
The text was updated successfully, but these errors were encountered: