# Subtract unhealthy tissue from area of box around a tumor

**URL:** <https://discourse.slicer.org/t/subtract-unhealthy-tissue-from-area-of-box-around-a-tumor/17609>\
**Category:** Support\
**Created:** [May 13, 2021, 7:23pm UTC](https://discourse.slicer.org/t/subtract-unhealthy-tissue-from-area-of-box-around-a-tumor/17609 "2021-05-13T19:23:21Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mostafa2020](https://avatars.discourse-cdn.com/v4/letter/m/eb9ed0/32.png) [@Mostafa2020](https://discourse.slicer.org/u/Mostafa2020)\
**Post date:** [May 13, 2021, 7:23pm UTC](https://discourse.slicer.org/t/subtract-unhealthy-tissue-from-area-of-box-around-a-tumor/17609/1 "2021-05-13T19:23:21Z")

</div>

Operating system:macOS  
Slicer version:4.11  
Expected behavior:  
Actual behavior:

Hi all,

 ![Screen Shot 2021-05-13 at 1.56.22 PM](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/7/8/787c08db2052ea0a9d365bb8aafbcfd05bdda316.jpeg)

I am trying to subtract unhealthy tissue from the area of the box surrounding the tumor. I used the Markups module, put a box around the segmented region, and I am going to subtract the unhealthy part from the area of the box to get the area of the healthy region. Please see the picture.

Thanks in advance for your help,

---

<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, 2021, 7:24pm UTC](https://discourse.slicer.org/t/subtract-unhealthy-tissue-from-area-of-box-around-a-tumor/17609/2 "2021-05-13T19:24:27Z")

</div>

You can blank out any part of a volume using “Mask volume” effect in Segment Editor module.

---

<div class="post-metadata">

**Author:** ![Mostafa2020](https://avatars.discourse-cdn.com/v4/letter/m/eb9ed0/32.png) [@Mostafa2020](https://discourse.slicer.org/u/Mostafa2020)\
**Post date:** [May 13, 2021, 7:41pm UTC](https://discourse.slicer.org/t/subtract-unhealthy-tissue-from-area-of-box-around-a-tumor/17609/3 "2021-05-13T19:41:25Z")

</div>

Thanks, Andras. But how can I calculate the area of the box? By using “Mask volume”?

---

<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, 2021, 8:04pm UTC](https://discourse.slicer.org/t/subtract-unhealthy-tissue-from-area-of-box-around-a-tumor/17609/4 "2021-05-13T20:04:09Z")

</div>

You can get the volume of the box in the Measurements section in markups module.  
You can get the volume of the tumor using Segment Statistics module.

---

<div class="post-metadata">

**Author:** ![Mostafa2020](https://avatars.discourse-cdn.com/v4/letter/m/eb9ed0/32.png) [@Mostafa2020](https://discourse.slicer.org/u/Mostafa2020)\
**Post date:** [May 18, 2021, 2:24pm UTC](https://discourse.slicer.org/t/subtract-unhealthy-tissue-from-area-of-box-around-a-tumor/17609/5 "2021-05-18T14:24:57Z")

</div>

Great. Thanks for your response. Is it possible to find ROI of the healthy tissue and then extract its feature? I am looking for a way to extract features from healthy and unhealthy regions inside the box.

---

<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 18, 2021, 7:24pm UTC](https://discourse.slicer.org/t/subtract-unhealthy-tissue-from-area-of-box-around-a-tumor/17609/6 "2021-05-18T19:24:39Z")

</div>

Yes, sure you can segment multiple tissue types (healthy, unhealthy, etc.). You can get their volumes and also their bounding box size using Segment statistics module.

---

<div class="post-metadata">

**Author:** ![Mostafa2020](https://avatars.discourse-cdn.com/v4/letter/m/eb9ed0/32.png) [@Mostafa2020](https://discourse.slicer.org/u/Mostafa2020)\
**Post date:** [May 20, 2021, 3:56am UTC](https://discourse.slicer.org/t/subtract-unhealthy-tissue-from-area-of-box-around-a-tumor/17609/7 "2021-05-20T03:56:36Z")

</div>

Thanks, Andras. I cannot see any options in “Measurement Settings” in the Measurements section in the markups module. There must be some options there to get the volume of the box?

---

<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 20, 2021, 12:06pm UTC](https://discourse.slicer.org/t/subtract-unhealthy-tissue-from-area-of-box-around-a-tumor/17609/8 "2021-05-20T12:06:07Z")

</div>

Volume measurement for markups ROI is available in recent Slicer Preview Releases.

---

<div class="post-metadata">

**Author:** ![Mostafa2020](https://avatars.discourse-cdn.com/v4/letter/m/eb9ed0/32.png) [@Mostafa2020](https://discourse.slicer.org/u/Mostafa2020)\
**Post date:** [May 20, 2021, 1:57pm UTC](https://discourse.slicer.org/t/subtract-unhealthy-tissue-from-area-of-box-around-a-tumor/17609/9 "2021-05-20T13:57:56Z")

</div>

I am using version 4.11. Should I use version 4.13 instead?

---

<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 20, 2021, 2:01pm UTC](https://discourse.slicer.org/t/subtract-unhealthy-tissue-from-area-of-box-around-a-tumor/17609/10 "2021-05-20T14:01:24Z")

</div>

Yes. Volume measurement for markups ROI is available in recent Slicer Preview Releases, which is currently 4.13.

---

<div class="post-metadata">

**Author:** ![rbumm](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/rbumm/32/9404_2.png) [@rbumm](https://discourse.slicer.org/u/rbumm)\
**Post date:** [May 22, 2021, 1:03pm UTC](https://discourse.slicer.org/t/subtract-unhealthy-tissue-from-area-of-box-around-a-tumor/17609/11 "2021-05-22T13:03:46Z")

</div>

You could also use the “Local Threshold” function from the “Segment Editor”. That is a good way to segment lung tumors:

 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/1/9/19fa6eb7d390c79a68ff57d06a46a9cf14f2c8b4.jpeg)

- Create a ROI around the tumor
- Experiment with the threshold to make the tumor solid, but the surrounding tissue transparent
- CTRL+left click into the tumor
- Wait some moments for the segmentation

Next, you can call the “Segment Statistics” for the tumor volume.  
In this example, lung segments and airways were created by using the “Grow from Seeds” function of the “Segment Editor”.

Best regards  
Rudolf

---

<div class="post-metadata">

**Author:** ![Mostafa2020](https://avatars.discourse-cdn.com/v4/letter/m/eb9ed0/32.png) [@Mostafa2020](https://discourse.slicer.org/u/Mostafa2020)\
**Post date:** [June 1, 2021, 1:40pm UTC](https://discourse.slicer.org/t/subtract-unhealthy-tissue-from-area-of-box-around-a-tumor/17609/12 "2021-06-01T13:40:50Z")

</div>

Thanks, Rduolf. It was very helpful. I also think about the way the distributions of voxels inside the ROI. Is there any options in 3D Slicer to do it? Thanks in advance.

---

<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 8, 2021, 11:38pm UTC](https://discourse.slicer.org/t/subtract-unhealthy-tissue-from-area-of-box-around-a-tumor/17609/13 "2021-06-08T23:38:19Z")

</div>

You can compute intensity distribution histogram in a segment as shown in this [example in the script repository](https://slicer.readthedocs.io/en/latest/developer_guide/script_repository.html#get-histogram-of-a-segmented-region).
