>
Hi Nicolas,
Thanks for building such a great visualization tool for python!
I have been trying to use (napari version
0.2.10+7.g47af135) the.to_labelsfunctionality on an image stack and not getting the behavior I expected. For example, if I add the lineprint(np.unique(labels))at line number 36 of the nD_shapes.py example, expecting this to reflect the labels of all unique shapes, the output that I get isarray([0]), indicating no labels present.If I change line 34 to read:
labels = layer.to_labels(labels_shape=(128, 128))
I get an index for all 128 shapes, but of course they are now compressed into one image plane, but if line 34 reads:
labels = layer.to_labels()
I again get only zeros (but with shape(127,128,128)).It does seem that
to_labelsis meant to be compatible with n-dimensional images, am I expecting the wrong behavior, or otherwise misusing this functionality?_Originally posted by @miketaormina in https://github.com/napari/napari-tutorials/issues/46#issuecomment-578882563_
Sounds like a bug, I can look into it
@kevinyamauchi if you have time and are interested can you take this one too? Will force you into the Shapes layer a bit :-) :-)
No problem. On it!