Adding operations to Segment Editor's Scissors tool

Greetings Slicers,

I was thinking about combining some operations with the Scissors tool. It would be really useful in some of my scans to be able to do island removal in a certain area, for example - draw a symmetric slice cut that defines a small volume that then has island removal performed in it, preferably in a single operation.

I’m pretty sure this can be done “manually” in python, but I was wondering how doable/acceptable it would be to add another operation to the Scissors module. I’m happy to investigate this and implement it, I’m not asking for someone else to do it! I’m mostly wondering if it would be generally useful to anybody but me.

Thanks!!!

-Hollister

It would be enough to update Islands effect to use masking. You would then:

  • create a new segment: YourMaskSegment
  • fill it using Scissors effect, using Mode: Fill inside, enable overlap with existing segments (Masking / Overwrite other segments: None)
  • use the new segment as mask (Masking / Editable area: Inside Segment YourMaskSegment)
  • use Islands effect to remove small islands (only masked region would be affected)

Making Island effect use masking settings would be nice for other use cases as well, so it would be great if you could work on it. The change may be as simple as using modifySelectedSegmentByLabelmap instead of SetBinaryLabelmapToSegment (see SegmentEditorLogicalEffect as an example).

1 Like

I will take a look. Thanks for the pointers on getting started!

1 Like