Open Zarr File on M1
- Create a
condaenvironment with the required dependencies - Run the example below
from zarr.storage import FSStore
from itkwidgets import view
import zarr
fsstore = FSStore('https://dandiarchive.s3.amazonaws.com/zarr/7723d02f-1f71-4553-a7b0-47bda1ae8b42')
brainstem = zarr.open_group(fsstore, mode='r')
view(brainstem)
- The following message pops up.
The git command requires the command line developer toolsThe tools is not installed.
Hi @jburel, thanks for the report!
Currently, itkwidgets 1.X pre-releases provide M1 support. The 1.X refactor is architected on top of NGFF-Zarr.
The example notebook needed a slight update to install fsspec[http] with zsh in #553 .
The 1.X pre-releases are currently only available on PyPI. However, please try this environment.yml, which worked on my M1:
name: itkwidgets-zarr-demo
channels:
- conda-forge
dependencies:
- python
- jupyterlab
- pip
- fsspec[http]
- pip:
- itkwidgets[lab]>=1.0a15
Hi @thewtex - thanks for that.
I tried with that environment.yml and the image at https://uk1s3.embassy.ebi.ac.uk/idr/zarr/v0.4/idr0062A/6001240.zarr
but didn't get anything to show up, using your demo at https://github.com/ome/ngff/pull/139#issuecomment-1273619930 as an example:

Maybe OME-NGFF images aren't yet supported directly by itkwidgets?
Hi @will-moore , thanks for testing!
There is a tweak required in your case -- itkwidgets[lab] -> itkwidgets[notebook] for Jupyter Lab vs Jupyter Notebook.
Here is what results (note -- the data does take a while to load from the USA at least -- and we are working on better feedback in the viewer that data is loading).
Untitled_ Oct 13, 2022 10_08 AM.webm
Maybe OME-NGFF images aren't yet supported directly by itkwidgets?
itkwidgets is built around OME-NGFF and will load it directly! :sparkler: If the data is not OME-NGFF, it is dynamically generated on the fly. Details:
https://github.com/InsightSoftwareConsortium/itkwidgets/blob/339b0eef0733675cfb5beb5e307649fa4468680f/itkwidgets/integrations/init.py#L41-L129
Thanks - that works great!
I also tried a v0.3 OME-NGFF as part of filling out the growing table at https://github.com/will-moore/ngff/blob/ngff_tools_table/ngff-tools.md
https://hms-dbmi.github.io/vizarr/?source=https://uk1s3.embassy.ebi.ac.uk/idr/zarr/v0.3/idr0079A/9836998.zarr
I got some strange behaviour (don't know if this is v0.3-specific or not)..
To start with I got a low resolution view of the whole image, but as I was viewing it (just rotating and panning, no other settings changed) the higher resolution levels loaded but only showed a cropped part of the image...




Just another thought... I wonder if it would be possible to configure a page like with vizarr above so that I can open an image directly in itkwidgets without needing to run a notebook etc? It would make testing easier and we could then link from all our samples at https://idr.github.io/ome-ngff-samples/ directly to view in itkwidgets!
Hi @will-moore
I'm helping with this project. Your right, not a great experience with datasets that the viewer does not find scale metadata for. Higher resolution images grow in size as each voxel is 1 unit and the camera does not reset to encompass the new resolution. Then it takes a while to build the portion of the image in view of the camera. Appreciate any advice you have.
I like your link idea. Satisfaction: https://kitware.github.io/itk-vtk-viewer/app/?rotate=false&fileToLoad=https://uk1s3.embassy.ebi.ac.uk/idr/zarr/v0.4/idr0062A/6001240.zarr
Thanks @PaulHax that's great. I opened a PR to add itk-vtk-viewer links to all the v0.4 Images in https://idr.github.io/ome-ngff-samples/
Sorry for not responding earlier, I was on annual leave. I will adjust some of my notebooks cc @will-moore
@PaulHax @thewtex we are having our community meeting over the next few weeks [1] We have sessions on the 10 of November going over the viewers currently opening zarr files. We will encourage people developing viewers to present their tools (~10mins) and discuss what's needed from the specification point of views. Will you interested to join us? The meeting is free
[1] https://www.openmicroscopy.org/events/ome-community-meeting-2022/
@jburel that's fantastic! We are excited to participate!
Great. Registration closes on Friday 04/11. We will send zoom link and info to the participants