Closed fabricesenger closed 1 year ago
Hey @fabricesenger, I checked it, and it seems that the error occurs on deleting a layer, and it might be related to hiding layers from the layer list (there's a brief summary on what might cause it in the end). Currently I don't know what would be the best option to fix this issue. So in order to get around it, you shouldn't delete layers when some of them are hidden. This can be done two ways:
<hidden>
in their name.)Please check if these solutions work for you!
So the explanation: Napari doesn't have a built-in functionality for hiding layers from the layer list, but there are some layers which should not be touched by the user (they are there to show some intermediate results/information). So I implemented this functionality based on this comment. Unfortunately this involves accessing directly the GUI framework (Qt), and I guess this is what napari cannot handle. I'm sorry to say that there's no easy solution to this problem. Until napari doesn't provide built-in functionality to hide layers from the list, this is the best we can do. Another option is to expose the auxiliary layers and hope that users don't (accidentally) alter them.
Hi there,
thank you for that quick reply. I think I will open an issue as well for napari, to have some feedback about layer management. I will try what you suggested. In the end closing napari between two annotations isn't that annoying, I was just wondering if there was not a more elegant way.
Thanks again,
Fabrice.
Hey @fabricesenger, in the new version of the plugin (from 0.1.0) utility layers are not hidden from the layer list. This change solves the problem which caused napari to crash when deleting layers. So you don't need to close napari between annotating images. Try it out, and contact me if any error occurs!
Best wishes, David
I do annotations with the minimal contour tool. Everything works fine for the annotation of a single image. Now it is not possible to save all layers simultaneously, so I save each layer separatly (the original image, the labels and the anchors) Next I would like to load a new image, to do so I close the image and the label layer and then napari crashes.
Besides that, for the time being, I just restart napari, and I love this tool.