Slicer caught an application error

I am working these two files:

and its segmentation

When I load them both into the scene, switch to Segment editor and create a new segment and try to paint, I am getting this error.

[Qt] "Slicer has caught an application error, please save your work and restart.\n\nIf you have a repeatable sequence of steps that causes this message, please report the issue following instructions available at\n\n\nThe message detail is:\n\nException thrown in event: vector"

After this point paint tool doesnt work anymore. This on a Mac (intel) with 5.6.1 and seems to happen with the preview (Feb 7th) on the same computer. There is nothing else in the log files…

This is moet likely because voxel type of the segmentation is float or double. This does not make sense, index values must be stored in integer type for numerical stability and space efficiency. Please check the file and if this is indeed the case then report the issue to the developers of the software that produced thile file.

Still, we cannot prevent unknowing users attempting to load flawed segmentations files, therefore we are adding automatic conversion at segmentation loading:

1 Like

We have generated that segmentation, but I think the issue is segment editor defaults to the data type of the master volume (or at least I though it did), and in this case, these were indeed float volumes (intensity normalized).

Slicer should always create integer segmentations, but of course it is possible that we missed something. How did you create the segmentation ‐ using the GUI (using which module, how?) or by Python script (can you send a link to the code)?