From b2125bcc104b35fcc9a99846582e8a68cff5603d Mon Sep 17 00:00:00 2001 From: William Moore Date: Wed, 20 Oct 2021 17:19:24 +0100 Subject: [PATCH 1/2] Rename label metadata key to color --- napari_ome_zarr/_reader.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/napari_ome_zarr/_reader.py b/napari_ome_zarr/_reader.py index 9c01933..b747ee0 100644 --- a/napari_ome_zarr/_reader.py +++ b/napari_ome_zarr/_reader.py @@ -28,7 +28,7 @@ def napari_hook_implementation( LOGGER = logging.getLogger("napari_ome_zarr.reader") -METADATA_KEYS = ("name", "visible", "contrast_limits", "colormap", +METADATA_KEYS = ("name", "visible", "contrast_limits", "color", "metadata") @napari_hook_implementation From 78a57e01ecb721c9e6d9b8c61c67c71f12295cb5 Mon Sep 17 00:00:00 2001 From: William Moore Date: Thu, 21 Oct 2021 14:49:11 +0100 Subject: [PATCH 2/2] Keep both color and colormap keys --- napari_ome_zarr/_reader.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/napari_ome_zarr/_reader.py b/napari_ome_zarr/_reader.py index b747ee0..73e0602 100644 --- a/napari_ome_zarr/_reader.py +++ b/napari_ome_zarr/_reader.py @@ -28,8 +28,9 @@ def napari_hook_implementation( LOGGER = logging.getLogger("napari_ome_zarr.reader") -METADATA_KEYS = ("name", "visible", "contrast_limits", "color", - "metadata") +# NB: color for labels, colormap for images +METADATA_KEYS = ("name", "visible", "contrast_limits", "colormap", + "color", "metadata") @napari_hook_implementation def napari_get_reader(path: PathLike) -> Optional[ReaderFunction]: