# Brain extraction - CT angiograms

**URL:** https://discourse.itk.org/t/brain-extraction-ct-angiograms/7545
**Category:** Beginner Questions
**Created:** [May 27, 2025, 3:00pm UTC](https://discourse.itk.org/t/brain-extraction-ct-angiograms/7545 "2025-05-27T15:00:04Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![malar563](https://discourse.itk.org/user_avatar/discourse.itk.org/malar563/32/4530_2.png) [@malar563](https://discourse.itk.org/u/malar563)
#### Post date: [May 27, 2025, 3:00pm UTC](https://discourse.itk.org/t/brain-extraction-ct-angiograms/7545/1 "2025-05-27T15:00:04Z")

</div>

Hi,  
I would like to automatically extract the brain from CT angiograms using a Python script. I have tested the WrapSolidify extension in 3D Slicer, and it works well (see screenshot). My questions are :

1 - How can I implement such a method directly in Python, without using a GUI?  
2 - If WrapSolidify is not possible to use in such a way, what are the best approaches for brain extraction from CT angiograms (without relying on deep learning models)?

Thank you in advance for your help!

 ![test2WrapSolidify](https://discourse.itk.org/uploads/default/original/2X/c/c1154fca874e6461aa1aaf76e45b995210505a50.jpeg)

---

<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: [May 27, 2025, 3:17pm UTC](https://discourse.itk.org/t/brain-extraction-ct-angiograms/7545/2 "2025-05-27T15:17:26Z")

</div>

Hello @malar563,

Possibly mimic the workflow of the [SlicerSwissSkullStripper](https://github.com/lassoan/SlicerSwissSkullStripper) which doesn’t rely on Deep Learning (DL).

If you lift this restriction, possibly try [TotalSegmentator](https://github.com/wasserth/TotalSegmentator) which is DL, but you only need to do inference so no requirements for large dataset for training.

---

<div class="post-metadata">

### Author: ![dchen](https://discourse.itk.org/user_avatar/discourse.itk.org/dchen/32/34_2.png) [@dchen](https://discourse.itk.org/u/dchen)
#### Post date: [May 27, 2025, 5:23pm UTC](https://discourse.itk.org/t/brain-extraction-ct-angiograms/7545/3 "2025-05-27T17:23:30Z")

</div>

You might be able to run that WrapSolidify extension in a python script using Slicer’s docker container.

Here’s the SlicerDockers repo if you want to try that approach:

> **[GitHub - pieper/SlicerDockers: docker config files for slicer](https://github.com/pieper/SlicerDockers)**
>
> docker config files for slicer

---

<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: [May 27, 2025, 5:27pm UTC](https://discourse.itk.org/t/brain-extraction-ct-angiograms/7545/4 "2025-05-27T17:27:54Z")

</div>

@lassoan might want to comment too.

---

<div class="post-metadata">

### Author: ![malar563](https://discourse.itk.org/user_avatar/discourse.itk.org/malar563/32/4530_2.png) [@malar563](https://discourse.itk.org/u/malar563)
#### Post date: [May 28, 2025, 2:35pm UTC](https://discourse.itk.org/t/brain-extraction-ct-angiograms/7545/5 "2025-05-28T14:35:00Z")

</div>

Thank you so much for all your answers, it helps me a lot!
