# Hide data inside ROI when Volume Rendering

**URL:** https://discourse.slicer.org/t/hide-data-inside-roi-when-volume-rendering/118
**Category:** Support
**Created:** [April 14, 2017, 3:25pm UTC](https://discourse.slicer.org/t/hide-data-inside-roi-when-volume-rendering/118 "2017-04-14T15:25:05Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![Fernando](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/fernando/32/5640_2.png) [@Fernando](https://discourse.slicer.org/u/Fernando)
#### Post date: [April 14, 2017, 3:25pm UTC](https://discourse.slicer.org/t/hide-data-inside-roi-when-volume-rendering/118/1 "2017-04-14T15:25:05Z")

</div>

Hi slicers,

Is there a way to make the ROI hide the data inside instead of cropping it? Like in this capture of `mrview`:

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

Best,  
Fernando

P. S.: I’m trying to add the tag “volume rendering”, but I didn’t manage.

---

<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: [April 14, 2017, 3:57pm UTC](https://discourse.slicer.org/t/hide-data-inside-roi-when-volume-rendering/118/2 "2017-04-14T15:57:15Z")

</div>

Use the `Volume clip with ROI` module in `Volume Clip` extension to remove an arbitrary rectangular section. You can also use `Volume clip with model` module (in the same extension) to remove an arbitrarily shaped region.

---

<div class="post-metadata">

### Author: ![Fernando](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/fernando/32/5640_2.png) [@Fernando](https://discourse.slicer.org/u/Fernando)
#### Post date: [April 14, 2017, 4:14pm UTC](https://discourse.slicer.org/t/hide-data-inside-roi-when-volume-rendering/118/3 "2017-04-14T16:14:46Z")

</div>

Hi Andras,

I forgot to say “interactively”, like in the `Volume Rendering` module.

---

<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: [April 14, 2017, 6:08pm UTC](https://discourse.slicer.org/t/hide-data-inside-roi-when-volume-rendering/118/4 "2017-04-14T18:08:27Z")

</div>

If clicking the Apply button is so bad then you can slightly modify the Crop volume with ROI module to apply cropping immediately whenever the ROI is changed.

Instead of immediate update you may allow a few-second delay: (re)start a timer whenever the ROI is changed and re-crop the volume when the timer expires.

---

<div class="post-metadata">

### Author: ![Fernando](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/fernando/32/5640_2.png) [@Fernando](https://discourse.slicer.org/u/Fernando)
#### Post date: [April 15, 2017, 10:53am UTC](https://discourse.slicer.org/t/hide-data-inside-roi-when-volume-rendering/118/5 "2017-04-15T10:53:21Z")

</div>

I don’t think clicking the Apply button _is so bad_. I just think that might not be what the user wants, specially if he’s clipping a very large image just for visualization.

Thanks for your answer. I’ll experiment and try to modify the Volume Rendering volume if I get a result.

---

<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: [April 15, 2017, 11:32am UTC](https://discourse.slicer.org/t/hide-data-inside-roi-when-volume-rendering/118/6 "2017-04-15T11:32:54Z")

</div>

Volume renderer in VTK does not support arbitrary Boolean operators between clipping planes: you can only do rectangular cropping or masking with binary labelmap. Everything else must be done by modifying the input volume.

If VTK’s volume renderer will be able to do such clipping then we can make that available in Slicer till then the simplest is to pre-process the volume. Note that you can still show the original unclipped volume in slice viewers.

---

<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: [April 15, 2017, 11:35am UTC](https://discourse.slicer.org/t/hide-data-inside-roi-when-volume-rendering/118/7 "2017-04-15T11:35:58Z")

</div>

Also note that you can get almost the same result by showing slice views (with thresholding enabled for the volume, to remove black borders) and a skin surface model (slice clipping enabled to be able to see inside the head).

Example ([download the scene from here](https://1drv.ms/u/s!Arm_AFxB9yqHr5BI0Hag1rewSdETWg)):

 ![](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/1X/e6d24c90190c1e4315521adc7bae274d303e861e.gif)

---

<div class="post-metadata">

### Author: ![SteveRobbins](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/steverobbins/32/16678_2.png) [@SteveRobbins](https://discourse.slicer.org/u/SteveRobbins)
#### Post date: [September 16, 2022, 6:19am UTC](https://discourse.slicer.org/t/hide-data-inside-roi-when-volume-rendering/118/8 "2022-09-16T06:19:26Z")

</div>

I tried the Volume clip with ROI. I can’t get it to do anything. I watched the video but it was all about the other Volume Clip module. Is there a basic step-by-step for the Volume Clip with ROI somewhere?

---

<div class="post-metadata">

### Author: ![SteveRobbins](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/steverobbins/32/16678_2.png) [@SteveRobbins](https://discourse.slicer.org/u/SteveRobbins)
#### Post date: [September 16, 2022, 2:32pm UTC](https://discourse.slicer.org/t/hide-data-inside-roi-when-volume-rendering/118/9 "2022-09-16T14:32:05Z")

</div>

I figured it out – see [Volume Rendering with cut planes - #3 by SteveRobbins](https://discourse.slicer.org/t/volume-rendering-with-cut-planes/25290/3)
