bauerdavid / napari-bbox

BSD 3-Clause "New" or "Revised" License
5 stars 2 forks source link

Error after deleting all bounding boxes #15

Closed grahamross123 closed 7 months ago

grahamross123 commented 7 months ago

Hi, I am getting an error IndexError: index 0 is out of bounds for axis 0 with size 0 which is triggered from the BoundingBoxList.inside() method. This happens when I have an empty bounding box layer after deleting a bounding box. I think napari tries to see if the mouse is inside a bounding box but since there are no bounding boxes it throws this error every time the mouse coords update.

I'm using napari-bbox version 0.0.7 and napari version 0.4.18.

Napari info: napari: 0.4.18 Platform: macOS-14.3-x86_64-i386-64bit System: MacOS 14.3 Python: 3.9.17 (main, Jun 20 2023, 17:03:39) [Clang 13.0.0 (clang-1300.0.29.30)] Qt: 5.15.2 PyQt5: 5.15.6 NumPy: 1.26.4 SciPy: 1.12.0 Dask: 2022.04.0 VisPy: 0.12.2 magicgui: 0.4.0 superqt: 0.6.2 in-n-out: 0.1.9 app-model: 0.2.4 npe2: 0.7.4

OpenGL:

bauerdavid commented 7 months ago

Hey @grahamross123, I think this is the same issue as #12. This was already solved, but a new release wasn't created yet. If you would like to try it, install the plugin from Github. If you need any help with that, just let me know!

Cheers, David

grahamross123 commented 7 months ago

Hi @bauerdavid, You're right, I missed that - got it working now!

Thanks, Graham