# Segmenting 3D printed heartseg

**URL:** <https://discourse.slicer.org/t/segmenting-3d-printed-heartseg/31617>\
**Category:** Support\
**Tags:** segmentation\
**Created:** [September 8, 2023, 9:25am UTC](https://discourse.slicer.org/t/segmenting-3d-printed-heartseg/31617 "2023-09-08T09:25:46Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Raha\_Sep](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/raha_sep/32/15684_2.png) [@Raha\_Sep](https://discourse.slicer.org/u/Raha_Sep)\
**Post date:** [September 8, 2023, 9:25am UTC](https://discourse.slicer.org/t/segmenting-3d-printed-heartseg/31617/1 "2023-09-08T09:25:46Z")

</div>

Hello Lassoan,

Is the threshold effect the best tool for segmentation of a 3D printed heart from CT scan images? below you see the segmentation using threshold. I want to produce .vtk or stl. file formats of the endocardial RA, LA, LV and RV from CT images.  
TotalSegmentator ([GitHub - lassoan/SlicerTotalSegmentator: Fully automatic total body segmentation in 3D Slicer using "TotalSegmentator" AI model](https://github.com/lassoan/SlicerTotalSegmentator#totalsegmentator)) didn’t work properly in this case.

Thanks for your help!  
Best  
Rahi

 ![heart](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/5/7/576b0cb92236daaf7b848b95344fffd3f4e1b6b0.jpeg)

---

<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:** [September 8, 2023, 1:17pm UTC](https://discourse.slicer.org/t/segmenting-3d-printed-heartseg/31617/2 "2023-09-08T13:17:53Z")

</div>

TotalSegmentator segments real patient images, which look completely different than the scan of a 3D-printed object. In your 3D object scan, segmenting the “heart wall” is trivial, using thresholding. You can limit segmenting the ventricles inside the heart using [“Wrap Solidify” effect](https://discourse.slicer.org/t/fill-or-extract-cavities-in-segmentations-using-the-new-wrap-solidify-effect/11248/2) (provided by SurfaceWrapSolidify extension), then [splitting the ventricles](https://lassoan.github.io/SlicerSegmentationRecipes/Craniotomy/) using Scissors effect. Once you learned how to use the tools, the whole process should take just a couple of minutes.

---

<div class="post-metadata">

**Author:** ![Raha\_Sep](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/raha_sep/32/15684_2.png) [@Raha\_Sep](https://discourse.slicer.org/u/Raha_Sep)\
**Post date:** [September 12, 2023, 3:10pm UTC](https://discourse.slicer.org/t/segmenting-3d-printed-heartseg/31617/3 "2023-09-12T15:10:34Z")

</div>

Thanks very much @lassoan!  
By using the Threshold effect, I can extract the entire 3D heart model or as you said the “heart wall” but I still need to practice “Wrap Solidify”.

from this video [https://www.youtube.com/watch?v=IWo-QlU4J\_c](https://www.youtube.com/watch?v=IWo-QlU4J_c) I understood nothing 😅 but I have this extension now and will try to apply it. p.s. It’s quite difficult for non-physicians to identify each organ correctly 🙂

---

<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:** [September 12, 2023, 3:21pm UTC](https://discourse.slicer.org/t/segmenting-3d-printed-heartseg/31617/4 "2023-09-12T15:21:37Z")

</div>

> [@Raha\_Sep](#):
>
> from this video [https://www.youtube.com/watch?v=IWo-QlU4J\_c](https://www.youtube.com/watch?v=IWo-QlU4J_c) I understood nothing

This is just a demo video that shows the end results. To fill a cavity you need to create a small seed segment inside the cavity you want to segment (it can be a small sphere that you create with a single click using the Paint effect), then choose the “heart wall” segment in the segment list at the top, and choose your “seed” segment as “Custom” region, then click “Apply”:

 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/c/2/c220a6e190394453e2f058edfb5384b2c5b6660a.jpeg)

Result after clicking apply: the seed region is expanded to fill the cavity

 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/6/8/687d21e558c9644534a0912a53d8602c86c5e450.jpeg)
