# Is it possible to use margin tool only inside a ROI?

**URL:** <https://discourse.slicer.org/t/is-it-possible-to-use-margin-tool-only-inside-a-roi/11512>\
**Category:** Support\
**Tags:** segmentation\
**Created:** [May 13, 2020, 2:00am UTC](https://discourse.slicer.org/t/is-it-possible-to-use-margin-tool-only-inside-a-roi/11512 "2020-05-13T02:00:32Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mohammad\_Tanjib\_Rahm](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/mohammad_tanjib_rahm/32/5934_2.png) [@Mohammad\_Tanjib\_Rahm](https://discourse.slicer.org/u/Mohammad_Tanjib_Rahm)\
**Post date:** [May 13, 2020, 2:00am UTC](https://discourse.slicer.org/t/is-it-possible-to-use-margin-tool-only-inside-a-roi/11512/1 "2020-05-13T02:00:32Z")

</div>

Hi,  
I am trying to shrink the margin of the segmentation by couple millimetres. However I want to do it only inside the specified annotation ROI. I tried setting the source geometry as the annotation ROI and then using the shrink tool. But it shrinks the whole segmentation.

Is it possible to shrink the segmentation just inside the ROI?

 ![Capture](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/7/4/7451c142db01a44464c221da1565bd36080c2971.jpeg)

---

<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:** [May 13, 2020, 2:18am UTC](https://discourse.slicer.org/t/is-it-possible-to-use-margin-tool-only-inside-a-roi/11512/2 "2020-05-13T02:18:53Z")

</div>

You need to specify editable region using a segment and specify that segment in the masking options section in Segment Editor.

---

<div class="post-metadata">

**Author:** ![Mohammad\_Tanjib\_Rahm](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/mohammad_tanjib_rahm/32/5934_2.png) [@Mohammad\_Tanjib\_Rahm](https://discourse.slicer.org/u/Mohammad_Tanjib_Rahm)\
**Post date:** [May 13, 2020, 2:47am UTC](https://discourse.slicer.org/t/is-it-possible-to-use-margin-tool-only-inside-a-roi/11512/3 "2020-05-13T02:47:07Z")

</div>

Do you mean I should create another segment for the portion I want to edit, select that segment as editable region in masking and then apply shrink? Is there anyway I can edit only inside the ROI and not anywhere else?

---

<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:** [May 13, 2020, 2:59am UTC](https://discourse.slicer.org/t/is-it-possible-to-use-margin-tool-only-inside-a-roi/11512/4 "2020-05-13T02:59:20Z")

</div>

> [@Mohammad\_Tanjib\_Rahm](#):
>
> Do you mean I should create another segment for the portion I want to edit, select that segment as editable region in masking and then apply shrink?

Yes. Make sure to allow overlap so that the mask segment can overlap with segments you want to modify.

> [@Mohammad\_Tanjib\_Rahm](#):
>
> Is there anyway I can edit only inside the ROI and not anywhere else?

That’s exactly how it works. Once you set a segment as editable region, you can only modify inside that region.
