# Semiautomatic Segmentation with SimpleITK

**URL:** https://discourse.itk.org/t/semiautomatic-segmentation-with-simpleitk/5040
**Category:** Beginner Questions
**Tags:** segmentation, simpleitk
**Created:** [June 1, 2022, 10:16pm UTC](https://discourse.itk.org/t/semiautomatic-segmentation-with-simpleitk/5040 "2022-06-01T22:16:49Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![shqipcop](https://discourse.itk.org/user_avatar/discourse.itk.org/shqipcop/32/2712_2.png) [@shqipcop](https://discourse.itk.org/u/shqipcop)
#### Post date: [June 1, 2022, 10:16pm UTC](https://discourse.itk.org/t/semiautomatic-segmentation-with-simpleitk/5040/1 "2022-06-01T22:16:49Z")

</div>

I’m interested in using SimpleITK to be able to seed an organ in a layer of a CT scan and have the organ segmented, ignoring small connections like veins/arteries. eg. I select a part of the right atrium, the whole right atrium is then segmented, but connecting arteries/veins are not. Does anybody know if the functions available in SimpleITK are sufficient for this problem, and if so, where would I get started? I’ve been looking all over and haven’t been able to find a straight answer.

---

<div class="post-metadata">

### Author: ![zivy](https://discourse.itk.org/user_avatar/discourse.itk.org/zivy/32/1726_2.png) [@zivy](https://discourse.itk.org/u/zivy)
#### Post date: [June 1, 2022, 10:41pm UTC](https://discourse.itk.org/t/semiautomatic-segmentation-with-simpleitk/5040/2 "2022-06-01T22:41:22Z")

</div>

Hello @shqipcop,

Before starting to code anything from scratch, see if an existing program can do what you need. Highly recommend going over the [Slicer segmentation documentation](https://slicer.readthedocs.io/en/latest/user_guide/image_segmentation.html).

Try various segmentation approaches and filters in slicer. Once you identify a workflow which solves the problem using slicer, you can then either continue using it, or if you need to incorporate the code into another application, see which filters are involved and implement the workflow using SimpleITK.

Note that SimpleITK is available inside slicer, so you can write SimpleITK code within slicer to test various ideas (see [slides](http://amos3.aapm.org/abstracts/pdf/146-43884-486612-144546-383231504.pdf) from Greg Sharp and the [slicer docs](https://slicer.readthedocs.io/en/latest/developer_guide/script_repository/volumes.html?highlight=simpleitk#running-an-itk-filter-in-python-using-simpleitk)).

---

<div class="post-metadata">

### Author: ![shqipcop](https://discourse.itk.org/user_avatar/discourse.itk.org/shqipcop/32/2712_2.png) [@shqipcop](https://discourse.itk.org/u/shqipcop)
#### Post date: [June 1, 2022, 10:45pm UTC](https://discourse.itk.org/t/semiautomatic-segmentation-with-simpleitk/5040/3 "2022-06-01T22:45:11Z")

</div>

Thank you for the quick reply! I’ll be sure to do that. I appreciate the help!

---

<div class="post-metadata">

### Author: ![dzenanz](https://discourse.itk.org/user_avatar/discourse.itk.org/dzenanz/32/1093_2.png) [@dzenanz](https://discourse.itk.org/u/dzenanz)
#### Post date: [June 2, 2022, 12:43pm UTC](https://discourse.itk.org/t/semiautomatic-segmentation-with-simpleitk/5040/4 "2022-06-02T12:43:30Z")

</div>

Your problem sounds like it will not have a simple and easy solution. Segment from seeds in Slicer is probably your best bet.

---

<div class="post-metadata">

### Author: ![mauigna06](https://discourse.itk.org/letter_avatar_proxy/v4/letter/m/ccd318/32.png) [@mauigna06](https://discourse.itk.org/u/mauigna06)
#### Post date: [June 6, 2022, 8:37am UTC](https://discourse.itk.org/t/semiautomatic-segmentation-with-simpleitk/5040/5 "2022-06-06T08:37:53Z")

</div>

Maybe test localThreshold effect of 3d Slicer on the extra segmente editor effects extension, it may be what your are looking fro

Mauro
