diff --git a/src/napari_label_focus/_widget.py b/src/napari_label_focus/_widget.py index 480884e..93b992b 100644 --- a/src/napari_label_focus/_widget.py +++ b/src/napari_label_focus/_widget.py @@ -31,7 +31,8 @@ def _on_layer_change(self, e): self.cb.clear() for x in self.viewer.layers: if isinstance(x, napari.layers.Labels): - self.cb.addItem(x.name, x.data) + if len(x.data.shape) in [2, 3]: # Only 2D and 3D data are supported. + self.cb.addItem(x.name, x.data) def _on_cb_change(self, selection: str): if selection == '':