# Segmentation Using SimpleITK

**URL:** <https://discourse.slicer.org/t/segmentation-using-simpleitk/13232>\
**Category:** Support\
**Created:** [August 29, 2020, 2:12pm UTC](https://discourse.slicer.org/t/segmentation-using-simpleitk/13232 "2020-08-29T14:12:13Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [August 29, 2020, 2:21pm UTC](https://discourse.slicer.org/t/segmentation-using-simpleitk/13232/2 "2020-08-29T14:21:44Z")

</div>

This easily doable in two steps:

- push/pull volume node to/from SimpleITK using sitkUtils (see [example](https://www.slicer.org/wiki/Documentation/Nightly/ScriptRepository#Running_an_ITK_filter_in_Python_using_SimpleITK))
- convert the volume node to/from segmentation node (see [example](https://www.slicer.org/wiki/Documentation/Nightly/ScriptRepository#Create_a_segmentation_from_a_labelmap_volume_and_display_in_3D))

There are several Segment Editor effects that use SimpleITK, which can serve as a complete example (that even show how to implement interactive segmentation tools, which require some user input):

> <https://github.com/lassoan/SlicerSegmentEditorExtraEffects/blob/master/SegmentEditorWatershed/SegmentEditorWatershedLib/SegmentEditorEffect.py#L106-L133>

---

_[View the full topic](https://discourse.slicer.org/t/segmentation-using-simpleitk/13232)._
