# Merge 2 segments

**URL:** <https://discourse.slicer.org/t/merge-2-segments/7702>\
**Category:** Support\
**Tags:** segmentation\
**Created:** [July 21, 2019, 3:46pm UTC](https://discourse.slicer.org/t/merge-2-segments/7702 "2019-07-21T15:46:23Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jmarcs](https://avatars.discourse-cdn.com/v4/letter/j/43a26b/32.png) [@Jmarcs](https://discourse.slicer.org/u/Jmarcs)\
**Post date:** [July 21, 2019, 3:46pm UTC](https://discourse.slicer.org/t/merge-2-segments/7702/1 "2019-07-21T15:46:23Z")

</div>

I msorry about my ridiculous request but how can I merge 2 segments in ONE segment  
best regards  
jean-marc

 ![PNG](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/c/a/caf527f1a72fbf5e68a7f24508f2a6145fbbe6a6.jpeg)

---

<div class="post-metadata">

**Author:** ![cpinter](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/cpinter/32/7995_2.png) [@cpinter](https://discourse.slicer.org/u/cpinter)\
**Post date:** [July 21, 2019, 7:30pm UTC](https://discourse.slicer.org/t/merge-2-segments/7702/2 "2019-07-21T19:30:40Z")

</div>

You can use the Logical operators effect in Segment Editor. Let me know if you have further questions!

---

<div class="post-metadata">

**Author:** ![muratmaga](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/muratmaga/32/3622_2.png) [@muratmaga](https://discourse.slicer.org/u/muratmaga)\
**Post date:** [July 21, 2019, 7:40pm UTC](https://discourse.slicer.org/t/merge-2-segments/7702/3 "2019-07-21T19:40:03Z")

</div>

You can use logical effects and the choose the add segments option.

---

<div class="post-metadata">

**Author:** ![soukup.la](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/soukup.la/32/17954_2.png) [@soukup.la](https://discourse.slicer.org/u/soukup.la)\
**Post date:** [January 18, 2023, 9:43am UTC](https://discourse.slicer.org/t/merge-2-segments/7702/4 "2023-01-18T09:43:13Z")

</div>

Hello,  
is it possible using Python interactor please? Or, is it possible to merge two models using Python interactor please?

thank you very much!

---

<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:** [January 19, 2023, 12:11pm UTC](https://discourse.slicer.org/t/merge-2-segments/7702/5 "2023-01-19T12:11:53Z")

</div>

Yes, you can add the segments in Python by calling functions of the SegmentEditorWidget, see an [example here](https://github.com/rbumm/SlicerLungCTAnalyzer/blob/eca5aa39b7bd519954f3f1869de4d9210d582a69/LungCTSegmenter/LungCTSegmenter.py#L1535).
