Skip to content
Snippets Groups Projects
Commit 067ae94a authored by Andrey Aristov's avatar Andrey Aristov
Browse files

fix tabulation

parent b2883e73
Branches
Tags
No related merge requests found
...@@ -48,16 +48,23 @@ def napari_get_reader(path): ...@@ -48,16 +48,23 @@ def napari_get_reader(path):
def read_zarr(path): def read_zarr(path):
print(f"reading {path}") print(f"read_zarr {path}")
try: try:
attrs = json.load(open(os.path.join(path, ".zattrs"))) attrs = json.load(open(os.path.join(path, ".zattrs")))
info = attrs["multiscales"]["multiscales"][0] info = attrs["multiscales"]["multiscales"][0]
except Exception as e:
raise e
dataset_paths = [os.path.join(path, d["path"]) for d in info["datasets"]]
datasets = [dask.array.from_zarr(p) for p in dataset_paths]
try:
channel_axis = info["channel_axis"] channel_axis = info["channel_axis"]
print(f"found channel axis {channel_axis}") print(f"found channel axis {channel_axis}")
dataset_paths = [ except KeyError:
os.path.join(path, d["path"]) for d in info["datasets"] channel_axis = None
]
datasets = [dask.array.from_zarr(p) for p in dataset_paths]
except Exception as e: except Exception as e:
raise e raise e
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment