From bff3cde8c8e516e21422f98cc05a1a492380d485 Mon Sep 17 00:00:00 2001 From: David Stansby Date: Thu, 21 Nov 2024 15:44:59 +0100 Subject: [PATCH 1/3] Try viewing zarr arr --- docs/tutorial.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/tutorial.py b/docs/tutorial.py index a32da28..8773461 100644 --- a/docs/tutorial.py +++ b/docs/tutorial.py @@ -3,6 +3,7 @@ from rich.pretty import pprint +from itkwidgets import view import gcsfs import zarr import zarr.storage @@ -74,11 +75,10 @@ # # Although these models do not handle reading or writing data, they do expose the zarr arrays. -zarr_arr = ome_zarr_image.group[multiscales_meta[0].datasets[0].path] +zarr_arr = ome_zarr_image.group[multiscales_meta[0].datasets[-1].path] pprint(zarr_arr) +view(zarr_arr) # ## Not using validation # # If you want to create models that are not validated against the OME-zarr specifciation, you can use the ``model_construct`` method on the models. - - From 5330846e9ee9e150e393db52a5a723c2e84007cb Mon Sep 17 00:00:00 2001 From: David Stansby Date: Thu, 21 Nov 2024 15:46:32 +0100 Subject: [PATCH 2/3] Add dependency --- pyproject.toml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index e0846e7..6fad104 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -15,6 +15,7 @@ docs = [ "gcsfs", "rich", "zarr<3", + "itkwidgets", ] pydantic = ["pydantic"] @@ -34,6 +35,7 @@ docs = [ "gcsfs", "rich", "zarr<3", + "itkwidgets", ] dev = [ "jupyter[notebook]>=1.1.1", From d66dfeaa4ce845bf47f067204f59de040e546b58 Mon Sep 17 00:00:00 2001 From: David Stansby Date: Thu, 21 Nov 2024 15:50:04 +0100 Subject: [PATCH 3/3] View first channel --- docs/tutorial.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/tutorial.py b/docs/tutorial.py index 8773461..86237b4 100644 --- a/docs/tutorial.py +++ b/docs/tutorial.py @@ -77,7 +77,7 @@ zarr_arr = ome_zarr_image.group[multiscales_meta[0].datasets[-1].path] pprint(zarr_arr) -view(zarr_arr) +view(zarr_arr[0, :, :, :]) # ## Not using validation #