# Is there any way to programmatically change scissor operation in segment editor?

**URL:** <https://discourse.slicer.org/t/is-there-any-way-to-programmatically-change-scissor-operation-in-segment-editor/19360>\
**Category:** Development\
**Tags:** segmentation, python\
**Created:** [August 25, 2021, 4:46pm UTC](https://discourse.slicer.org/t/is-there-any-way-to-programmatically-change-scissor-operation-in-segment-editor/19360 "2021-08-25T16:46:41Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![akshay\_pillai](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/akshay_pillai/32/8301_2.png) [@akshay\_pillai](https://discourse.slicer.org/u/akshay_pillai)\
**Post date:** [August 25, 2021, 4:46pm UTC](https://discourse.slicer.org/t/is-there-any-way-to-programmatically-change-scissor-operation-in-segment-editor/19360/1 "2021-08-25T16:46:41Z")

</div>

Is there any way to programmatically change the scissor operation in segment editor? As of right now the scissor operation removes everything in the enclosed area if it is selected in the segments list of the segment editor. I want to change this to also delete or remove another segment attached to the current selected segment if it is enclosed in the area of the scissor. How can I do this? I hope its clear what I am asking.

---

<div class="post-metadata">

**Author:** ![jamesobutler](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/jamesobutler/32/7511_2.png) [@jamesobutler](https://discourse.slicer.org/u/jamesobutler)\
**Post date:** [August 25, 2021, 5:01pm UTC](https://discourse.slicer.org/t/is-there-any-way-to-programmatically-change-scissor-operation-in-segment-editor/19360/2 "2021-08-25T17:01:58Z")

</div>

I was using latest Slicer Preview and there is a “Apply to all segments” option to erase inside for any segments inside the region.  
 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/9/e/9e1c94ab1a1e23e4bfd76dc6cfebd9d92dfb14e7.png)  
 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/7/0/70bdb9650c6177c67f4cbf4c43402790c9f23725.png)

---

<div class="post-metadata">

**Author:** ![akshay\_pillai](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/akshay_pillai/32/8301_2.png) [@akshay\_pillai](https://discourse.slicer.org/u/akshay_pillai)\
**Post date:** [August 25, 2021, 5:11pm UTC](https://discourse.slicer.org/t/is-there-any-way-to-programmatically-change-scissor-operation-in-segment-editor/19360/3 "2021-08-25T17:11:10Z")

</div>

Ok, sounds good, ill try using the latest preview then.

---

<div class="post-metadata">

**Author:** ![akshay\_pillai](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/akshay_pillai/32/8301_2.png) [@akshay\_pillai](https://discourse.slicer.org/u/akshay_pillai)\
**Post date:** [August 25, 2021, 5:44pm UTC](https://discourse.slicer.org/t/is-there-any-way-to-programmatically-change-scissor-operation-in-segment-editor/19360/4 "2021-08-25T17:44:25Z")

</div>

@jamesobutler can you confirm the slicer version that you are using. I just downloaded the latest preview and I don’t see the “Apply to all segments” option. I was previously using 4.11.20200930 and the preview I just now downloaded is 4.13.0-2021-02-24/

---

<div class="post-metadata">

**Author:** ![jamesobutler](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/jamesobutler/32/7511_2.png) [@jamesobutler](https://discourse.slicer.org/u/jamesobutler)\
**Post date:** [August 25, 2021, 6:08pm UTC](https://discourse.slicer.org/t/is-there-any-way-to-programmatically-change-scissor-operation-in-segment-editor/19360/5 "2021-08-25T18:08:10Z")

</div>

The latest preview build I tried is 4.13.0-2021-08-24 corresponding to today’s date. It looks like the version you are using is exactly 6 months old?

---

<div class="post-metadata">

**Author:** ![rbumm](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/rbumm/32/9404_2.png) [@rbumm](https://discourse.slicer.org/u/rbumm)\
**Post date:** [August 31, 2021, 8:30pm UTC](https://discourse.slicer.org/t/is-there-any-way-to-programmatically-change-scissor-operation-in-segment-editor/19360/6 "2021-08-31T20:30:08Z")

</div>

I have 4.13.0-2021-08-24.exe here and  
“Apply to all segments” is - as previously implemented - in several segment editor functions.  
I can find it in “scissors” too.

 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/3/f/3f62145771024f013df1960ca9a18c7d2ac1b864.png)
