Skip to content

Commit

Permalink
Merge pull request #15 from fractal-napari-plugins-collection/14_4D_l…
Browse files Browse the repository at this point in the history
…abel_img

Add catch for 4D label images
  • Loading branch information
jluethi authored Sep 16, 2024
2 parents f78dfe1 + 5409de6 commit 391ad91
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/napari_ome_zarr_navigator/ome_zarr_image.py
Original file line number Diff line number Diff line change
Expand Up @@ -422,13 +422,19 @@ def load_label_roi(
img_multiscale=self.image_meta.multiscale,
)

# Hacky way to address
# https://github.com/fractal-napari-plugins-collection/napari-ome-zarr-navigator/issues/14
# Handle 4D label arrays
subset = 0 if label_multiscale.axes[0].name == "c" else None

return self.load_zarr_array_index_based(
zarr_url=zarr_url_label,
roi_table=roi_table,
roi_index=roi_index,
multiscale=label_multiscale,
level_path=level_path,
as_np=as_np,
subset=subset,
)

def get_omero_metadata(self, channel_name: str):
Expand Down

0 comments on commit 391ad91

Please sign in to comment.