# Mask Ultrasound Volume Vector

**URL:** <https://discourse.slicer.org/t/mask-ultrasound-volume-vector/7280>\
**Category:** Support\
**Tags:** surgical-navigation\
**Created:** [June 22, 2019, 2:57pm UTC](https://discourse.slicer.org/t/mask-ultrasound-volume-vector/7280 "2019-06-22T14:57:41Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![lRaulMN7](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lraulmn7/32/3048_2.png) [@lRaulMN7](https://discourse.slicer.org/u/lRaulMN7)\
**Post date:** [June 22, 2019, 2:57pm UTC](https://discourse.slicer.org/t/mask-ultrasound-volume-vector/7280/1 "2019-06-22T14:57:42Z")

</div>

Hello! I saw this video: [https://www.youtube.com/watch?v=TIUWzhkdspY](https://www.youtube.com/watch?v=TIUWzhkdspY)

Originally, the ultrasound image has some numbers and information on it, however in slicer only the ultrasound image can be seen.

Right now I have a vector volume from a stream, and I want to mask the number part.

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

I have been trying to accomplish that using the segmentation tool but I can’t find the right way to do it…

 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/2/7/272e7bec7c4f279070c85903835fb19f4f4b577e.png)

Once I have the area I want to work with, is there any way to save it as a mask and add it to PLUS Server for future connections? Thanks!

---

<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, 2019, 5:49pm UTC](https://discourse.slicer.org/t/mask-ultrasound-volume-vector/7280/2 "2019-06-22T17:49:13Z")

</div>

> [@lRaulMN7](#):
>
> I have been trying to accomplish that using the segmentation tool but I can’t find the right way to do it…

To blank out everything outside a segment, install SegmentEditorExtraEffects extension, then use “Mask volume” effect.

If you attach a position tracker to the ultrasound probe (can be as simple as a [webcam](https://youtu.be/MOqh6wgOOYs) if you don’t require high accuracy) then you can set up real-time tracked image acquisition as shown in the youtube video that you referenced above.

---

<div class="post-metadata">

**Author:** ![lRaulMN7](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lraulmn7/32/3048_2.png) [@lRaulMN7](https://discourse.slicer.org/u/lRaulMN7)\
**Post date:** [June 22, 2019, 7:02pm UTC](https://discourse.slicer.org/t/mask-ultrasound-volume-vector/7280/3 "2019-06-22T19:02:43Z")

</div>

Mask Volume works perfectly! Thanks.

Now I can set a better ROI at the ultrasound image and then apply Mask Volume to get rid of the numbers.

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

So now, once I have created this “Crop Volume ROI” , is there anyway to save together with the mask, and load it again? Because I have been trying to export it as a .acsv but I don’t know how to get it back in when I reset slicer.

Also, it could be good to remove those black corners, to just display the ultrasound image. Because if I reduce the ROI I’ll be missing information.

I’ll do the real-time tracked next weekend with a tracker (I’ll have to make the ImageToProbe transformation), now I just want to make sure that I’m able to display the ultrasound image in the best way.

Thanks again for the response 🙂 There is a lot of documentation and tutorials, but sometimes I can’t find the proper ones for my purposes.

---

<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, 2019, 7:18pm UTC](https://discourse.slicer.org/t/mask-ultrasound-volume-vector/7280/4 "2019-06-22T19:18:44Z")

</div>

If you only need the mask for real-time display then it’s even simpler: create a mask image, enable thresholding in Volumes module, and set up slice viewer layers to use the mask image as background and the ultrasound image as foreground image.

---

<div class="post-metadata">

**Author:** ![lRaulMN7](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lraulmn7/32/3048_2.png) [@lRaulMN7](https://discourse.slicer.org/u/lRaulMN7)\
**Post date:** [June 23, 2019, 10:28am UTC](https://discourse.slicer.org/t/mask-ultrasound-volume-vector/7280/5 "2019-06-23T10:28:47Z")

</div>

Works, clean solution! Thanks 😃

 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/9/5/955b4411d8928513b58c0108c810357e65ff920e.png)
