# Issues when using Binary Image Erode Filter

**URL:** <https://discourse.slicer.org/t/issues-when-using-binary-image-erode-filter/31009>\
**Category:** Support\
**Created:** [August 6, 2023, 10:58am UTC](https://discourse.slicer.org/t/issues-when-using-binary-image-erode-filter/31009 "2023-08-06T10:58:05Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Annabel\_W](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/annabel_w/32/67086_2.png) [@Annabel\_W](https://discourse.slicer.org/u/Annabel_W)\
**Post date:** [August 6, 2023, 10:58am UTC](https://discourse.slicer.org/t/issues-when-using-binary-image-erode-filter/31009/1 "2023-08-06T10:58:06Z")

</div>

Hi There,

I am working on a project that will allow me to automate the localization of intracranial electrodes using Pre and Post Surgical CTs and a Pre Surgical MRI on 3D Slicer.

I am Currently trying to remove the outer inch of the patients head to remove the skull allow the end of the electrodes to be exposed using the binary erode image filter.

I have attempted using three filters, ‘BinaryErodeImageFilter’, ‘ErodeObjectMorphologyImageFilter’ and BinaryMorpologicalOpeningImageFilter’.

These seemed to have no effect on my CT scans or Binarized Label-Maps.

Please could you let me know how I can complete this task.

 ![Screenshot 2023-08-06 103715](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/9/f/9f44dc1a801254e59dd0f24c568896cf30744399.png)

Kind Regards  
Annabel

---

<div class="post-metadata">

**Author:** ![pieper](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/pieper/32/8_2.png) [@pieper](https://discourse.slicer.org/u/pieper)\
**Post date:** [August 6, 2023, 6:23pm UTC](https://discourse.slicer.org/t/issues-when-using-binary-image-erode-filter/31009/2 "2023-08-06T18:23:28Z")

</div>

You can convert the labelmaps to segmentations (use the right click menu in the Data module) and then in the Segment Editor you can use the Margin effect.
