# Expand Cortical Region to Geometric Edge and Enhance Contrast at Edge

**URL:** <https://discourse.slicer.org/t/expand-cortical-region-to-geometric-edge-and-enhance-contrast-at-edge/36909>\
**Category:** Support\
**Tags:** segmentation\
**Created:** [June 20, 2024, 3:40am UTC](https://discourse.slicer.org/t/expand-cortical-region-to-geometric-edge-and-enhance-contrast-at-edge/36909 "2024-06-20T03:40:56Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![William\_Kuo](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/william_kuo/32/65525_2.png) [@William\_Kuo](https://discourse.slicer.org/u/William_Kuo)\
**Post date:** [June 20, 2024, 3:40am UTC](https://discourse.slicer.org/t/expand-cortical-region-to-geometric-edge-and-enhance-contrast-at-edge/36909/1 "2024-06-20T03:40:56Z")

</div>

I want to expand the cortical bone to edges of the masked region, marked by my geometric line in the scan. After I expand the cortical region to those edges, I want to enhance the contrast at that edge. Are there a set of filters that can produce this effect?

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

---

<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:** [June 22, 2024, 5:06am UTC](https://discourse.slicer.org/t/expand-cortical-region-to-geometric-edge-and-enhance-contrast-at-edge/36909/2 "2024-06-22T05:06:57Z")

</div>

You can blank out the v9lume outside the segment using `Mask volume` effect in Segment Editor module.

We would need more information to give you advice on filtering. You need to specify what you consider useful signal (that you want to enhance) and what you consider noise (that tou want to suppress). What is your end goal?Quentitative analysis, 3D printing, surgical simulation, …?

---

<div class="post-metadata">

**Author:** ![William\_Kuo](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/william_kuo/32/65525_2.png) [@William\_Kuo](https://discourse.slicer.org/u/William_Kuo)\
**Post date:** [June 25, 2024, 11:52am UTC](https://discourse.slicer.org/t/expand-cortical-region-to-geometric-edge-and-enhance-contrast-at-edge/36909/3 "2024-06-25T11:52:38Z")

</div>

The volume I showed above is already masked by a segmentation.

I want to edit the HU values of the pixels near the border. I want to be able to select the pixels between the cortical bone and the edge and increase them to the level of the cortical bone. Since the highest density cortical bone appears to be about 2 pixels layers away from the geometric boundary, I want to incorporate a filter that raises the HU of the pixels in between closer to the HU of the cortical bone. I tried several filters to generate this effect but I have been unsuccessful. The goal is to reduce partial volume effects and mitigate segmentation accuracy for finite element analysis. I believe partial volume effects and the capture of low HU pixels (due to segmentation accuracy) are causing underprediction in the strength of my finite element results.
