# 3D slicer for US segmentation

**URL:** <https://discourse.slicer.org/t/3d-slicer-for-us-segmentation/34526>\
**Category:** Support\
**Created:** [February 25, 2024, 2:13pm UTC](https://discourse.slicer.org/t/3d-slicer-for-us-segmentation/34526 "2024-02-25T14:13:56Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![eden\_altman](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/eden_altman/32/69477_2.png) [@eden\_altman](https://discourse.slicer.org/u/eden_altman)\
**Post date:** [February 25, 2024, 2:13pm UTC](https://discourse.slicer.org/t/3d-slicer-for-us-segmentation/34526/1 "2024-02-25T14:13:56Z")

</div>

Hi everyone,

New here and would like to know if the 3D slicer is useful for segmentation of ultrasound images?  
Im trying to segment ultrasound images of the thigh to 3 different layers- fat, muscle and bone.

---

<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:** [February 25, 2024, 2:16pm UTC](https://discourse.slicer.org/t/3d-slicer-for-us-segmentation/34526/2 "2024-02-25T14:16:18Z")

</div>

3D Slicer is frequently used for ultrasound segmentation training and real-time segmentation of live ultrasound.

@ungi could you provide a good link to get started?

---

<div class="post-metadata">

**Author:** ![ungi](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/ungi/32/78573_2.png) [@ungi](https://discourse.slicer.org/u/ungi)\
**Post date:** [February 25, 2024, 5:39pm UTC](https://discourse.slicer.org/t/3d-slicer-for-us-segmentation/34526/3 "2024-02-25T17:39:27Z")

</div>

I think segmentation itself is best done outside of Slicer. I used to install TensorFlow and PyTorch in Slicer’s python environment and run segmentation in Slicer, but then it seemed better to run segmentation in everyone’s favorite AI environment, and communicate with Slicer via OpenIGTLink. You can stream the ultrasound images from Slicer or PLUS to an Anaconda environment and receive the segmentations back in Slicer (or whatever your application is) nearly real time.

I still use Slicer for manual segmentations, for generating training data. Like this: [https://youtu.be/zlrUFaP9q1w?si=4UgkGDA9U\_Jpyz5S](https://youtu.be/zlrUFaP9q1w?si=4UgkGDA9U_Jpyz5S)

And Slicer is great for visualization, 3D volume reconstruction (if you track your ultrasound images), and providing a custom user interface if necessary for clinical users.

For ultrasound segmentation AI training, I’m using this code (under development): [aigt/UltrasoundSegmentation at master · SlicerIGT/aigt (github.com)](https://github.com/SlicerIGT/aigt/tree/master/UltrasoundSegmentation)
