Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions ome_zarr/classes/image.py
Original file line number Diff line number Diff line change
Expand Up @@ -372,12 +372,12 @@ def from_ome_zarr(
is_label = False

# Handle loading based on version
if version in ("0.1", "0.2", "0.3"):
if version.startswith(("0.1", "0.2", "0.3")):
metadata = cls._read_legacy_metadata(group, version)
if "image-label" in group.attrs:
is_label = True

elif version == "0.4":
elif version.startswith("0.4"):
from ome_zarr_models.v04.multiscales import Multiscale as Multiscalev04

metadata_json = cast(dict, group.attrs.get("multiscales", [None])[0])
Expand All @@ -394,7 +394,7 @@ def from_ome_zarr(
if "image-label" in group.attrs:
is_label = True

elif version == "0.5":
elif version.startswith("0.5"):
from ome_zarr_models.v05.multiscales import Multiscale as Multiscalev05

ome_attrs = cast(dict[str, Any], group.attrs.get("ome", {}))
Expand Down