# Issue using Swiss Skull Stripper Module

**URL:** https://discourse.slicer.org/t/issue-using-swiss-skull-stripper-module/1876
**Category:** Support
**Tags:** swissskullstripper
**Created:** [January 19, 2018, 10:11pm UTC](https://discourse.slicer.org/t/issue-using-swiss-skull-stripper-module/1876 "2018-01-19T22:11:19Z")
**Posts on this page:** 14
**Page:** 1

<div class="post-metadata">

### Author: ![dlevitas](https://avatars.discourse-cdn.com/v4/letter/d/85e7bf/32.png) [@dlevitas](https://discourse.slicer.org/u/dlevitas)
#### Post date: [January 19, 2018, 10:11pm UTC](https://discourse.slicer.org/t/issue-using-swiss-skull-stripper-module/1876/1 "2018-01-19T22:11:20Z")

</div>

Hello,

I just started trying out 3D Slicer: currently using version 4.9.0

I thought I entered the correct information into the GUI, but when I went to run it I received the following error:

```
Swiss Skull Stripper standard error:

Failed to read input atlas label volume.

itk::ImageFileReaderException (0x104a50388)
Location: "unknown" 
File: /Users/kitware/Dashboards/Nightly/Slicer-0-
build/ITKv4/Modules/IO/ImageBase/include/itkImageFileReader.hxx
Line: 143
Description: Could not create IO object for reading file 
/var/folders/0c/l9qjt85j7ns3j3lctwhs82wc1kd6y7/T/Slicer-dlevitas/CACHI_vtkMRMLLabelMapVolumeNodeB.nrrd

The file doesn't exist. 

Filename = /var/folders/0c/l9qjt85j7ns3j3lctwhs82wc1kd6y7/T/Slicer-
dlevitas/CACHI_vtkMRMLLabelMapVolumeNodeB.nrrd

```

I already converted my Dicoms using a different program, and my atlas and input files are in NIFTI format; however, I’m unsure if things are failing because the files aren’t in .nrrd format.

Does anyone have any suggestions regarding this issue? Thanks for the help.

Dan

---

<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: [January 19, 2018, 10:22pm UTC](https://discourse.slicer.org/t/issue-using-swiss-skull-stripper-module/1876/2 "2018-01-19T22:22:57Z")

</div>

Try to change temporary folder in Application Settings to a simpler one (when your username contain non-ascii characters then the default temporary folder location may not work).

Also, right now we are changing many things in the nightly builds, so for a couple of weeks it may be better to use the stable version (4.8).

---

<div class="post-metadata">

### Author: ![dlevitas](https://avatars.discourse-cdn.com/v4/letter/d/85e7bf/32.png) [@dlevitas](https://discourse.slicer.org/u/dlevitas)
#### Post date: [January 22, 2018, 7:26pm UTC](https://discourse.slicer.org/t/issue-using-swiss-skull-stripper-module/1876/3 "2018-01-22T19:26:14Z")

</div>

Hi Andras,

Thank you for your response. I installed the stable version for Mac OS X (ver 4.8.1), and changed the temporary folder, but I continue to get a similar error:

```
Swiss Skull Stripper standard error:

Failed to read input atlas label volume.

itk::ImageFileReaderException (0x105ae8938)
Location: "unknown" 
File: /Users/kitware/Dashboards/Package/Slicer-481-
package/ITKv4/Modules/IO/ImageBase/include/itkImageFileReader.hxx
Line: 143
Description: Could not create IO object for reading file 
/Users/dlevitas/Desktop/3Dslicer/CFJGF_vtkMRMLLabelMapVolumeNodeB.nrrd
The file doesn't exist. 
Filename = /Users/dlevitas/Desktop/3Dslicer/CFJGF_vtkMRMLLabelMapVolumeNodeB.nrrd

```

It seems that it can’t find the CFJGF\_vtkMRMLLabelMapVolumeNodeB.nrrd file, but I’m unsure where this file would be, or how to perform the skull strip without it.

---

<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: [January 22, 2018, 8:04pm UTC](https://discourse.slicer.org/t/issue-using-swiss-skull-stripper-module/1876/4 "2018-01-22T20:04:43Z")

</div>

For “Atlas mask volume” you have to select atlasMask volume. Note that the volume only shows up there if it is loaded as “labelmap”. Unfortunately, atlasMask.mha file is not loaded as labelmap by default but in the `Add data` window you have to check `Show options` and then check `LabelMap`.

@Lorensen Could you rename the atlas mask file to `atlasImage-label.mha`? If a volume’s file name ends with `-label` then it is loaded as `LabelMap` by default and it would make it much easier to use the module. Or, even better, extensions can register their own data sets in Sample Data module, so the user could easily go to Sample Data module and download the mask by a single click. See how it is done for Sequences module: [https://github.com/SlicerRt/Sequences/tree/master/SequenceSampleData](https://github.com/SlicerRt/Sequences/tree/master/SequenceSampleData)

---

<div class="post-metadata">

### Author: ![dlevitas](https://avatars.discourse-cdn.com/v4/letter/d/85e7bf/32.png) [@dlevitas](https://discourse.slicer.org/u/dlevitas)
#### Post date: [January 22, 2018, 9:41pm UTC](https://discourse.slicer.org/t/issue-using-swiss-skull-stripper-module/1876/5 "2018-01-22T21:41:08Z")

</div>

I was having trouble navigating the GUI, however, I managed to solve my problem by using this in the terminal command line:

```
/Applications/Slicer.app/Contents/Extensions-26813/SwissSkullStripper/lib/Slicer-4.8/cli-modules/SwissSkullStripper --atlasMRI atlas_with_skull.nii.gz --atlasMask atlas_no_skull_mask.nii.gz input_data.nii.gz output_brain_no_skull.nii.gz output_mask_no_skull.nii.gz
```

---

<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: [January 22, 2018, 10:59pm UTC](https://discourse.slicer.org/t/issue-using-swiss-skull-stripper-module/1876/6 "2018-01-22T22:59:00Z")

</div>

You can also use default atlas by not specifying any atlas image or mask inputs at all.

---

<div class="post-metadata">

### Author: ![Saima](https://avatars.discourse-cdn.com/v4/letter/s/9d8465/32.png) [@Saima](https://discourse.slicer.org/u/Saima)
#### Post date: [January 24, 2020, 6:50am UTC](https://discourse.slicer.org/t/issue-using-swiss-skull-stripper-module/1876/7 "2020-01-24T06:50:29Z")

</div>

Hi andras,  
I have used skull stripper multiple times. it does do good with sample data. but not with other data.

 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/d/9/d90561cb75fae80f8a7f4d7c1933610022255d1a.png)

How can I fix the above problem. it misses the brain portion.

Thank you  
Regards,  
Saima Safdar

---

<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: [January 24, 2020, 10:03am UTC](https://discourse.slicer.org/t/issue-using-swiss-skull-stripper-module/1876/8 "2020-01-24T10:03:01Z")

</div>

If your images are too different from the default atlas then you can use one of your own typical images and corresponding segmentation as input.

---

<div class="post-metadata">

### Author: ![jshen](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/jshen/32/13792_2.png) [@jshen](https://discourse.slicer.org/u/jshen)
#### Post date: [January 14, 2022, 1:14am UTC](https://discourse.slicer.org/t/issue-using-swiss-skull-stripper-module/1876/10 "2022-01-14T01:14:42Z")

</div>

Hi Andras,

I am having the same issue as Saima and I am trying to create a atlas using my own typical images as you said in your last reply. I am a bit stuck, do you have any resources or tutorials that can help with explain this process?

Regards,  
James

---

<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: [January 15, 2022, 9:22pm UTC](https://discourse.slicer.org/t/issue-using-swiss-skull-stripper-module/1876/11 "2022-01-15T21:22:28Z")

</div>

The atlas is simply a single image and corresponding labelmap. You can choose these images in the atlas section and skull stripping should just work. If not then describe in detail what did you do, what did you expect to happen, and what happened instead.

---

<div class="post-metadata">

### Author: ![jshen](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/jshen/32/13792_2.png) [@jshen](https://discourse.slicer.org/u/jshen)
#### Post date: [February 6, 2022, 3:03am UTC](https://discourse.slicer.org/t/issue-using-swiss-skull-stripper-module/1876/12 "2022-02-06T03:03:46Z")

</div>

Hi Andras,

I tried two methods: 1) I used my own T1 MRI DICOM image set and the default atlas and mask image files obtained from the Swedish Skull Stripper module documentation page. I ran into problems as this seemed to have stripped away a layer of brain along with the skull. I expected that the Swedish Skull Stripper module would leave the full brain intact while stripping away the skull and dura. See attached screenshots.

1. I used a patient mask I created in 3D slicer using the Segment Editor module using my own MRI image set. The same result occurred, the output was too small and the module eroded too much of the brain (see attached screenshot). I tried to make the input mask bigger so I used the entire skull as a mask, unsuccessfully.

 ![3DSlicer_SwedishSkullStripper_BeforeRun.PNG](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/4/5/4518997ae7cdb41b97d0ab1982bf6bb3ca6dd82f.jpeg)  
Before run, with default atlas mask

 ![3DSlicer_SwedishSkullStripper_AfterRun1](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/1/2/1278c5ffb22ec53077419d9713798252dfbbade6.png)  
After applying Swedish Skull Stripper with default mask, some areas of brain stripped

 ![3DSlicer_SwedishSkullStripper_AfterRun2.PNG](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/9/3/9303fa31cc9b70d951b2d55e7bd48428b0021ab0.jpeg)  
After applying Swedish Skull Stripper with default mask, overlaid with patient volume input

 ![3DSlicer_SwedishSkullStripper_UsingCustomMask](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/5/3/53656b21b303ef28a2f8ee41d7082c125bf8c93d.png)  
Using Swedish Skull Stripper with a custom mask, output overlaid with patient volume input

---

<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 6, 2022, 4:00am UTC](https://discourse.slicer.org/t/issue-using-swiss-skull-stripper-module/1876/13 "2022-02-06T04:00:08Z")

</div>

Could you share the data sets that you used for these tests so that we can see if something special about this data that makes it a difficult problem or there is a software bug?

---

<div class="post-metadata">

### Author: ![jshen](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/jshen/32/13792_2.png) [@jshen](https://discourse.slicer.org/u/jshen)
#### Post date: [February 8, 2022, 12:02am UTC](https://discourse.slicer.org/t/issue-using-swiss-skull-stripper-module/1876/14 "2022-02-08T00:02:55Z")

</div>

Hi Andras,

Sure! I have the files linked here:

> **[Meet Google Drive – One place for all your files](https://accounts.google.com/ServiceLogin?service=wise&passive=1209600&continue=https:%2F%2Fdrive.google.com%2Fdrive%2Ffolders%2F1nl1k6z7f_joCk96DIR4s--dCKAc4XLlj?usp%3Dsharing&followup=https:%2F%2Fdrive.google.com%2Fdrive%2Ffolders%2F1nl1k6z7f_joCk96DIR4s--dCKAc4XLlj?usp%3Dsharing)**
>
> Google Drive is a free way to keep your files backed up and easy to reach from any phone, tablet, or computer. Start with 15GB of Google storage – free.

Regards,  
James

---

<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 10, 2022, 4:53am UTC](https://discourse.slicer.org/t/issue-using-swiss-skull-stripper-module/1876/15 "2022-02-10T04:53:58Z")

</div>

I’ve checked the image and it seems that the problem is that the default atlas image of SwissSkullStripper is just too different from your image.

I’ve created a brain segmentation from the HNCMA atlas and it worked much better - you can download the files from [here](https://1drv.ms/u/s!Arm_AFxB9yqHx-5S8h8e_6RZVkh1HA?e=8q1F4a) and select them as `atlas volume` and `atlas mask volume` in the Atlas section.

 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/e/d/edf8d27fc93f8ef1535a3c2517ee2c6ed4f1bc92.jpeg)

If the result is not still not good enough then you can either fix it up manually in the Segment Editor module or use an atlas that looks more similar to your image.
