bauerdavid/napari-nD-annotator

Previous labels get object id: 0

Closed this issue · 0 comments

Describe the bug
When I import previous objects 'From labels', all of the object get id=0, so when I create a new object, it gets id=1 (then id=2 and so on), but it's a problem, because like this, we use a colour for annotation that was already used before.

To Reproduce

  • Open napari
  • Go to File -> Open File(s) then open the image and the label file that contains the previous annotation
  • Open from Plugins -> napari-nD-annotator the Annotation toolbox and the Object list
  • Click in the Object list panel the 'From labels'.

Expected behavior
Read the 'n' previous labels with correct ids from 1 to n, and then when I create a new bounding box, continue the numbering from n+1.

Screenshots
kép

napari info
napari: 0.4.15
Platform: Windows-10-10.0.19043-SP0
Python: 3.9.12 (tags/v3.9.12:b28265d, Mar 23 2022, 23:52:46) [MSC v.1929 64 bit (AMD64)]
Qt: 5.15.2
PyQt5: 5.15.7
NumPy: 1.22.4
SciPy: 1.8.1
Dask: 2022.6.0
VisPy: 0.9.6

OpenGL:

  • GL version: 4.6.14830 Compatibility Profile Context 21.10.20.05 27.20.21020.5007
  • MAX_TEXTURE_SIZE: 16384

Screens:

  • screen 1: resolution 1920x1080, scale 1.0

Plugins:

  • console: 0.0.4
  • scikit-image: 0.4.16
  • svg: 0.1.6