From 004641bf5f5ed67cf8aeb315a66a41d2343a6143 Mon Sep 17 00:00:00 2001 From: jmoore Date: Wed, 4 May 2022 11:02:28 +0200 Subject: [PATCH] Store metadata for use in napari --- src/ome_zarr_metadata/spec.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/ome_zarr_metadata/spec.py b/src/ome_zarr_metadata/spec.py index cda67fc..d6dc297 100644 --- a/src/ome_zarr_metadata/spec.py +++ b/src/ome_zarr_metadata/spec.py @@ -39,7 +39,9 @@ def __init__(self, node: Node) -> None: series = node.zarr.create(str(idx)) assert series.exists(), f"{series} is missing" _logger.info(f"found {series}") - node.add(series) + subnode = node.add(series) + subnode.metadata["ome-xml:index"] = idx + subnode.metadata["ome-xml:image"] = image node.metadata["ome-xml"] = data except Exception as e: _logger.error(f"failed to parse metadata: {e}")