Error while segmenting

Hello,

I’m trying to segment a ct scan, while segmenting I get this error -

Slicer has caught an application error, please save your work and restart.

If you have a repeatable sequence of steps that causes this message, please report the issue following instructions available at https://slicer.org

The message detail is:

Exception thrown in event: vector

Please test with the latest Slicer Preview Release. If you still experience any errors then provide screen capture video or step-by-step instructions (every click you make) that we can use to reproduce what you see.

Tested it with 5.5, was using 5.4 before and the error remains. Here is the click by click -

Open Slicer - drag a mrml file into slicer and the scan loads up - click on segment editor - click on paint - click on one of the segments - click on the scan on axial view to paint - error pops up.

Is this clear enough? If not I can make a screen recording.

I cannot reproduce the problem by following the steps you described. No error for me.

Can you share the .mrml file? (upload somewhere and post the link here; make sure there is no patient information in it)

Almost same error occurred to me.
Is there any solution?

Found a fix, I just had to go back to slicer version 5.2.1 which solved it for me. 5.4 and 5.5 didnt work.

1 Like

Could not reproduce this in 5.5 neither, with multiple saved scenes.

Older Slicer versions do not get any feature updates or fixes, so going back is not a solution. There are so many updates and news features and so many more coming that you really don’t want to miss those.

All you need is to provide us information that allows us to reproduce the problem.

Most likely the issue is related to the content of the saved scene, so you could send us the scene files (upload somewhere and post the link here). We can also set up a meeting with you (with screen sharing) to see what you do and what the scene contains that may cause problems.

I got this problem too. Exact the same thing. I solved it by changing header data in nrrd file from float32 to int32 and it’s fixed.

Please report the exact steps to reproduce the issue if the workflow was contained within Slicer. Or if there was another program that generated a nrrd file with inconsistent header data please report to the maintainers of that program so the issue can be resolved.

I’m not sure where the mask is generated. But I change the segmentation matrix element dtype from float32 to int32 and it’s solved. I didn’t change the header. I think some python package generate the classification label matrix by float32 but not int32 and that is the problem.

is everyone having this issue running on Mac? I am getting the same issue and the only clue I can seem to find is that it happens when the volume and the segmentation are in different types (float/short) and the sizes are different, however on windows, slicer seems to have no problem with the same files that crash on Mac - also worth noting is the issue happens only in the brush tool, not in the erase or other paint based tools for me

As an update, a colleague has found converting the segmentation node to a binary label map, then back to a segmentation node seems to fix the issue

This came up again recently and it seems there’s a floating point exception generated on the arm64 (apple silicon) when editing float segmentations. It wasn’t the case with intel macs. For now yes, converting to an integer format via the workaround suggested by @da5ideber sounds like a good option.

1 Like

Using floating-point types for storing binary labelmaps is bad for performance and may result in additional complications. Therefore, never use float or double type for storing labelmaps and if you get data sets like this from somewhere then report it as an issue to the developers of that software.

Unfortunately, we cannot rely on other software producing valid output, so Slicer needs to detect and report this error (maybe even do an automatic conversion to a suitable integer type). We already have an issue for this:

1 Like