Skip to content

Commit

Permalink
ENH: Support passing zarr stores in directly
Browse files Browse the repository at this point in the history
  • Loading branch information
bnmajor committed Dec 8, 2023
1 parent a01054f commit 49c8b7c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions itkwidgets/integrations/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,9 @@ def _get_viewer_image(image, label=False):
to_ngff_zarr(store, image, chunk_store=chunk_store)
return store

if isinstance(image, zarr.storage.Store):
return image

if HAVE_MULTISCALE_SPATIAL_IMAGE:
from multiscale_spatial_image import MultiscaleSpatialImage
if isinstance(image, MultiscaleSpatialImage):
Expand Down Expand Up @@ -185,6 +188,8 @@ def _detect_render_type(data, input_type) -> RenderType:
return RenderType.POINT_SET
else:
return RenderType.IMAGE
elif isinstance(data, zarr.storage.Store):
return RenderType.IMAGE
elif HAVE_ITK:
import itk
if isinstance(data, itk.Image):
Expand Down

0 comments on commit 49c8b7c

Please sign in to comment.