# Error when applying Medial surface in Segment Editor hollow effect (with possible fix)

**URL:** <https://discourse.slicer.org/t/error-when-applying-medial-surface-in-segment-editor-hollow-effect-with-possible-fix/8147>\
**Category:** Development\
**Created:** [August 23, 2019, 3:13pm UTC](https://discourse.slicer.org/t/error-when-applying-medial-surface-in-segment-editor-hollow-effect-with-possible-fix/8147 "2019-08-23T15:13:53Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![hherhold](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/hherhold/32/12199_2.png) [@hherhold](https://discourse.slicer.org/u/hherhold)\
**Post date:** [August 23, 2019, 3:13pm UTC](https://discourse.slicer.org/t/error-when-applying-medial-surface-in-segment-editor-hollow-effect-with-possible-fix/8147/1 "2019-08-23T15:13:53Z")

</div>

I get an error when applying medial surface in hollow effect. The offending line is in SegmentEditorHollowEffect.py, line 157:

```
  kernelSizePixel = [int(kernelSizePixel[0],2), int(kernelSizePixel[1],2), int(kernelSizePixel[2],2)]

```

The int(…,2) specifies base 2, which doesn’t make sense.

I think this should read:

```
  kernelSizePixel = [int(kernelSizePixel[0]/2), int(kernelSizePixel[1]/2), int(kernelSizePixel[2]/2)]

```

I’m happy to submit a pull request if this looks correct.

Thanks,

-Hollister

---

<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:** [August 23, 2019, 3:20pm UTC](https://discourse.slicer.org/t/error-when-applying-medial-surface-in-segment-editor-hollow-effect-with-possible-fix/8147/2 "2019-08-23T15:20:03Z")

</div>

Yes, please send a pull request. The change has been made by the automatic Python2-\>Python3 converter script.

---

<div class="post-metadata">

**Author:** ![hherhold](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/hherhold/32/12199_2.png) [@hherhold](https://discourse.slicer.org/u/hherhold)\
**Post date:** [August 23, 2019, 3:39pm UTC](https://discourse.slicer.org/t/error-when-applying-medial-surface-in-segment-editor-hollow-effect-with-possible-fix/8147/3 "2019-08-23T15:39:30Z")

</div>

Done. Thanks!

-Hollister

---

<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:** [August 23, 2019, 3:41pm UTC](https://discourse.slicer.org/t/error-when-applying-medial-surface-in-segment-editor-hollow-effect-with-possible-fix/8147/4 "2019-08-23T15:41:19Z")

</div>

I don’t see a pull request here (checked it here [https://github.com/Slicer/Slicer/pulls](https://github.com/Slicer/Slicer/pulls)).
