ome / napari-ome-zarr

A napari plugin for zarr backed OME-NGFF images

Home Page:https://www.napari-hub.org/plugins/napari-ome-zarr

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

IndexError: index 144 is out of bounds for axis 1 with size 26

joshmoore opened this issue · comments

With origin/main, I still see the error from #6: TypeError: len() of unsized object

With this PR, the image & label layers load.

I note that I see a separate error when viewing the labels in 3D:

/usr/local/anaconda3/envs/z/lib/python3.9/site-packages/napari/layers/labels/labels.py in _get_value_ray(self=<Labels layer '0'>, start_point=<class 'numpy.ndarray'> (3,) float64, end_point=<class 'numpy.ndarray'> (3,) float64, dims_displayed=[2, 3, 4])
    972                 sample_points, self._display_bounding_box(dims_displayed)
    973             ).astype(int)
--> 974             values = im_slice[tuple(clamped.T)]
        values = undefined
        im_slice = <class 'numpy.ndarray'> (257, 26, 31) int64
        global tuple = undefined
        clamped.T = <class 'numpy.ndarray'> (3, 504) int64
    975             nonzero_indices = np.flatnonzero(values)
    976             if len(nonzero_indices > 0):

IndexError: index 144 is out of bounds for axis 1 with size 26

Originally posted by @joshmoore in #12 (comment)

cc: @jni