# Volume maths (adding, subtracting ,,, singnal intensity)

**URL:** <https://discourse.slicer.org/t/volume-maths-adding-subtracting-singnal-intensity/42724>\
**Category:** Support\
**Created:** [April 28, 2025, 5:22pm UTC](https://discourse.slicer.org/t/volume-maths-adding-subtracting-singnal-intensity/42724 "2025-04-28T17:22:40Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kenneth](https://avatars.discourse-cdn.com/v4/letter/k/94ad74/32.png) [@Kenneth](https://discourse.slicer.org/u/Kenneth)\
**Post date:** [April 28, 2025, 5:22pm UTC](https://discourse.slicer.org/t/volume-maths-adding-subtracting-singnal-intensity/42724/1 "2025-04-28T17:22:40Z")

</div>

Hy. I need to ADD 2 nifti MR registered volumes (of the same size and body part) in order to have a new volume whith the higher signal intensity of each of the two volume. Each pixel must have a signal value (intensity) resulting from the sum of the signal of the corresponding voxels from the two volumes or the signal value of the image with higher signal).  
Same thing, but at the opposite, should happen when subtracting.  
I would like to avoid segmentation.

Thanks!

---

<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:** [April 28, 2025, 11:42pm UTC](https://discourse.slicer.org/t/volume-maths-adding-subtracting-singnal-intensity/42724/2 "2025-04-28T23:42:11Z")

</div>

There are Add Scalar Scalar Volume and Subtract Scalar Volume modules.

---

<div class="post-metadata">

**Author:** ![muratmaga](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/muratmaga/32/3622_2.png) [@muratmaga](https://discourse.slicer.org/u/muratmaga)\
**Post date:** [April 29, 2025, 12:17am UTC](https://discourse.slicer.org/t/volume-maths-adding-subtracting-singnal-intensity/42724/3 "2025-04-29T00:17:11Z")

</div>

> [@Kenneth](#):
>
> I need to ADD 2 nifti MR registered volumes

If the volumes are registered to a common coordinate system and have exact dimensions and spacing (which should be after registration), you will probably want to do this as a numpy operation on image arrays. It will give you far more flexibility than the add/subtract scalar volumes.  
You can get started with simple examples in the script repository like this:

> **[Script repository — 3D Slicer documentation](https://slicer.readthedocs.io/en/latest/developer_guide/script_repository.html#modify-voxels-in-a-volume)**
