# How to make a tumor model in a 3D CT data?

**URL:** <https://discourse.slicer.org/t/how-to-make-a-tumor-model-in-a-3d-ct-data/19309>\
**Category:** Support\
**Tags:** segmentation\
**Created:** [August 23, 2021, 9:08am UTC](https://discourse.slicer.org/t/how-to-make-a-tumor-model-in-a-3d-ct-data/19309 "2021-08-23T09:08:15Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![slicexray](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/slicexray/32/12073_2.png) [@slicexray](https://discourse.slicer.org/u/slicexray)\
**Post date:** [August 23, 2021, 9:08am UTC](https://discourse.slicer.org/t/how-to-make-a-tumor-model-in-a-3d-ct-data/19309/1 "2021-08-23T09:08:15Z")

</div>

Hi, I am trying a CT imaging simulation project. And I want to use 3Dslicer to build up a tumor model. The conception is inserting a small ball as the tumor model into the current brain model. And export it as a voxelized phantom. Could anyone help me or give some hints?  
Best/Johan

---

<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:** [August 23, 2021, 1:59pm UTC](https://discourse.slicer.org/t/how-to-make-a-tumor-model-in-a-3d-ct-data/19309/2 "2021-08-23T13:59:26Z")

</div>

You can paint a tumor using Paint effect in Segment Editor module. If you enable “sphere brush” option then you can create a tumor model by a single click. Then you can paint that segment into the CT using Mask volume effect.

If you want to simulate a more realistic shape or texture then it should be easy to do, too. You can get the image and mask of a segmented tumor as numpy arrays and combine them with voxels of another volume using standard numpy operations. See useful examples in the [script repository](https://slicer.readthedocs.io/en/latest/developer_guide/script_repository.html#combine-multiple-volumes-into-one).

---

<div class="post-metadata">

**Author:** ![slicexray](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/slicexray/32/12073_2.png) [@slicexray](https://discourse.slicer.org/u/slicexray)\
**Post date:** [August 25, 2021, 2:23am UTC](https://discourse.slicer.org/t/how-to-make-a-tumor-model-in-a-3d-ct-data/19309/3 "2021-08-25T02:23:45Z")

</div>

Hi, Andras, Thank you for the great advices!  
I tried to use the Paint effect with “sphere brush” in the Digimouse model, as the red ball bellow, and click Mask volume.  
 ![123](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/d/3/d301ec37c04ea4b852039f059ede4f4c6cbee790.jpeg)  
Then I add the skin segment and adjust the skin opacity in Segmentations, to make the organ visible. But the red ball is invisible. Could you tell me why?  
Best/Johan

---

<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:** [August 25, 2021, 5:32am UTC](https://discourse.slicer.org/t/how-to-make-a-tumor-model-in-a-3d-ct-data/19309/4 "2021-08-25T05:32:07Z")

</div>

Mask volume modifies the chosen input volume and generates an output volume where the region inside (or outside) of the segment is set to a specific intensity. This can be used to simulate a tumor that looks more dense or contrast-enhanced on the image.

If you successfully add a sphere-shaped segment then it will be displayed in views and adjusting opacity should not affect its visibility. Depending on the opacity value, you may need to [enable depth peeling](https://slicer.readthedocs.io/en/latest/user_guide/user_interface.html#d-view) to ensure transparent segments embedded into each other are displayed correctly.

---

<div class="post-metadata">

**Author:** ![slicexray](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/slicexray/32/12073_2.png) [@slicexray](https://discourse.slicer.org/u/slicexray)\
**Post date:** [August 26, 2021, 3:19pm UTC](https://discourse.slicer.org/t/how-to-make-a-tumor-model-in-a-3d-ct-data/19309/5 "2021-08-26T15:19:14Z")

</div>

I found the solution to this problem. The sphere segment shoud be done after adding the skin segment. To my understanding, mask volume is Blank out the selected skin segment.
