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

How to load local zarr files through imjoy_plugin.py #174

Closed
jcaxle opened this issue Oct 19, 2023 · 1 comment
Closed

How to load local zarr files through imjoy_plugin.py #174

jcaxle opened this issue Oct 19, 2023 · 1 comment

Comments

@jcaxle
Copy link

jcaxle commented Oct 19, 2023

I saw that Vizarr support the visualization of local zarr files through its imjoy_plugin. I want to visualize the following zarr file; however, I haven't had any luck with the plugin:

─pyramid.zarr
│   │   .zgroup
│   │   METADATA.ome.xml
│   │
│   └───data.zarr
│       │   .zgroup
│       │
│       └───0
│           │   .zattrs
│           │   .zgroup
│           │
│           ├───0
│           │       .zarray
│           │       0.0.0.0.0
│           │       0.0.0.0.1
│           │       0.0.0.1.0
│           │       0.0.0.1.1
│           │       0.0.0.2.0
│           │       0.0.0.2.1
│           │       0.1.0.0.0
│           │       0.1.0.0.1
│           │       0.1.0.1.0
│           │       0.1.0.1.1
│           │       0.1.0.2.0
│           │       0.1.0.2.1
│           │
│           ├───1
│           │       .zarray
│           │       0.0.0.0.0
│           │       0.0.0.1.0
│           │       0.1.0.0.0
│           │       0.1.0.1.0
│           │
│           ├───2
│           │       .zarray
│           │       0.0.0.0.0
│           │       0.1.0.0.0
│           │
│           └───3
│                   .zarray
│                   0.0.0.0.0
│                   0.1.0.0.0

How would I be able to load this zarr file through the plugin?

@manzt
Copy link
Member

manzt commented Oct 19, 2023

Hi there, thanks for opening the issue. The imjoy plugin can be a bit combersome to get started. I've been working on an official Jupyter integration for vizarr with anywidget #176. I published a very initial version to PyPI, which you should be able to try out:

pip install vizarr
import vizarr
import zarr
import numpy as np

viewer = vizarr.Viewer()
viewer.add_image(source=zarr.open("path/to/store.zarr"), name="image")
viewer.add_image(source=np.random.randint(0, 255, (1024, 1024), dtype=np.uint8), name="noise")
viewer

Note: The API is very new and subject to change, but hopefully usable for viewing your multiscale zarr data.

cc: @joshmoore, towards a general web-based zarr viewer in Jupyter

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants