# Mask scalar volume vs masking within the registration

**URL:** <https://discourse.slicer.org/t/mask-scalar-volume-vs-masking-within-the-registration/7835>\
**Category:** Support\
**Tags:** registration, masking\
**Created:** [August 1, 2019, 9:20am UTC](https://discourse.slicer.org/t/mask-scalar-volume-vs-masking-within-the-registration/7835 "2019-08-01T09:20:33Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![labixin](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/labixin/32/1965_2.png) [@labixin](https://discourse.slicer.org/u/labixin)\
**Post date:** [August 1, 2019, 9:20am UTC](https://discourse.slicer.org/t/mask-scalar-volume-vs-masking-within-the-registration/7835/1 "2019-08-01T09:20:33Z")

</div>

Hi everyone,

I am now using Slicer 4.11.0 and want to register pre-surgical CT to post-surgical CT (breast). The two images were acquired using different CT table (curved vs flat), and there are some metal markers on the breast skin in post-surgical CT (shown below).

I know from FAQ manual ([Documentation/4.10/FAQ - Slicer Wiki](https://www.slicer.org/wiki/Documentation/4.10/FAQ#Masking)) that masking is a powerful tool and I want to use it in my registration. But I am not sure about the difference between “mask scalar volume” and “masking within the registration”.

If I just mask the breast region in registration, can the unexpected misleading effect of markers and CT table be well handled? (I am not quite certain about “This does not mean that the rest is not registered, but rather that it moves along passively, i.e. areas outside the mask do not actively contribute to the cost function that determines the quality of the match.”) Or do I need to mask these relatively high intensity regions and set them to background value (-1024)?

Which one would be more reasonable? Hope for some advice, thanks a lot!

Crayon

 ![masking](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/f/6/f61a35d95a0577e57473cc5e9bb49b0bf4cc56c9.jpeg)

---

<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 5, 2019, 9:10pm UTC](https://discourse.slicer.org/t/mask-scalar-volume-vs-masking-within-the-registration/7835/2 "2019-08-05T21:10:20Z")

</div>

This post should clarify:

> [@Mask volume- segment editor](https://discourse.slicer.org/t/mask-volume-segment-editor/7808/9):
>
> To keep things simple, make the segment cover the region you are interested in. Then, you can us Mask volume effect to blank out the parts outside your region of interest. Yes, this is correct. All effects (Scissors, Surface cut, Paint, etc.) only modify segments. They will not modify any volume nodes. If you blank out a region of a volume, Elastix will still take those voxels into account. This is probably not what you want. To make Elastix ignore certain regions then you can specify mask…

---

<div class="post-metadata">

**Author:** ![labixin](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/labixin/32/1965_2.png) [@labixin](https://discourse.slicer.org/u/labixin)\
**Post date:** [August 6, 2019, 2:46am UTC](https://discourse.slicer.org/t/mask-scalar-volume-vs-masking-within-the-registration/7835/3 "2019-08-06T02:46:06Z")

</div>

I will try the methods mentioned in this post. Thank you very much!

Crayon
