SlicerNNInteractive: segmenting one structure erases part of an adjacent, already-completed segment

Hi everyone,

The new version of nninteractive in 3D slicer is huge !!! I’m using it on local on my desktop PC but I’ve now an issue that I hadn’t before where several structures are directly adjacent (e.g., bladder and rectum).

Issue: When I finish segmenting structure A, then start prompting on adjacent structure B, any voxels where B’s segmentation slightly overlaps A get erased from A — with no way to recover them via Ctrl+Z (which only undoes the last nnInteractive prompt, not the erasure of the other segment).

my Segment Editor masking settings are “Modify other segments” → “Allow overlap”

Neither prevented the overlap-erase behavior. This suggests nnInteractive writes directly to the shared labelmap layer rather than going through Slicer’s standard masking pipeline ? The only solution I’ve find for the moment is to create a new segmentation to segment the other structure…

But sometimes, I succeed to get an overlap, and I doesn’t know why !

Is this expected behavior, or a bug? Is there a recommended workflow for segmenting adjacent structures without risking overwriting completed work ? Can I freeze one segment so it dosent change ?

my setup Slicer 5.12.2, Windows, RTX 5080

Thanks!

I am not familiar with the implementation of this effect, but this sounds like a bug that it does not respect the masking settings (I suppose it outputs a normal labelmap without overlaps and inserts it to the layer in the segmentation).

Until this is fixed I’d probably do the following: clone the segmentation just before starting using NNInteractive, create the new segment, then drag&drop that segment into your original segmentation, finally delete the clone.

I agree that this is a subtle bug (that should not be too difficult to fix). Please let the developers know by submitting an issue to Issues · coendevente/SlicerNNInteractive · GitHub

To get latest updates, you need to use the latest Slicer Stable Release (currently Slicer-5.12.3).