# Comparing the differences between two slices quantitatively 

**URL:** <https://discourse.slicer.org/t/comparing-the-differences-between-two-slices-quantitatively/1748>\
**Category:** Support\
**Created:** [December 30, 2017, 10:57pm UTC](https://discourse.slicer.org/t/comparing-the-differences-between-two-slices-quantitatively/1748 "2017-12-30T22:57:34Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ishan\_Perera](https://avatars.discourse-cdn.com/v4/letter/i/919ad9/32.png) [@Ishan\_Perera](https://discourse.slicer.org/u/Ishan_Perera)\
**Post date:** [December 30, 2017, 10:57pm UTC](https://discourse.slicer.org/t/comparing-the-differences-between-two-slices-quantitatively/1748/1 "2017-12-30T22:57:34Z")

</div>

Operating system: MacOS High Sierra 10.13.1  
Slicer version: 4.7.0-2017-09-21 r26391 (I can upgrade/downgrade if need be)  
Expected behavior: Quantitative comparison of slices  
Actual behavior: N/A

I have been tasked with creating images that show the least amount of difference between two images (if possible around a specific area of the images). I am unsure of which module/filter to use in order to easily get quantitative data about the differences!

Please Help!

Thank you,  
Ishan

---

<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:** [December 31, 2017, 2:10am UTC](https://discourse.slicer.org/t/comparing-the-differences-between-two-slices-quantitatively/1748/2 "2017-12-31T02:10:16Z")

</div>

What kind of images you need to compare? Would you like to subtract the images from each other or just visually compare them side-by-side?

For visual comparison, it is probably enough to just set the same window/level values for both volumes in Volumes module.

If you need to subtract the images then probably spatially alignment would improve image quality a lot. You can register images using `General registration (BRAINS)` or `General registration (Elastix)` modules (for the latter you need to install SlicerElastix extension).

---

<div class="post-metadata">

**Author:** ![Ishan\_Perera](https://avatars.discourse-cdn.com/v4/letter/i/919ad9/32.png) [@Ishan\_Perera](https://discourse.slicer.org/u/Ishan_Perera)\
**Post date:** [December 31, 2017, 7:12pm UTC](https://discourse.slicer.org/t/comparing-the-differences-between-two-slices-quantitatively/1748/3 "2017-12-31T19:12:56Z")

</div>

I am comparing MRI scans, I have conducted visual comparisons by overlapping them and allowing them to show 50/50, but I think the subtraction method would be more of what I am looking for. I will try the methods you have introduced and see if they work!

Thank you and Happy New Years!

---

<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:** [January 1, 2018, 12:26am UTC](https://discourse.slicer.org/t/comparing-the-differences-between-two-slices-quantitatively/1748/4 "2018-01-01T00:26:56Z")

</div>

Also you can just subtract the two volumes and look at the resulting volume:

[https://www.slicer.org/wiki/Documentation/4.8/Modules/SubtractScalarVolumes](https://www.slicer.org/wiki/Documentation/4.8/Modules/SubtractScalarVolumes)

HTH,  
Steve

---

<div class="post-metadata">

**Author:** ![kalaiselvi](https://avatars.discourse-cdn.com/v4/letter/k/85f322/32.png) [@kalaiselvi](https://discourse.slicer.org/u/kalaiselvi)\
**Post date:** [January 1, 2018, 2:28am UTC](https://discourse.slicer.org/t/comparing-the-differences-between-two-slices-quantitatively/1748/5 "2018-01-01T02:28:15Z")

</div>

Dice coefficient is an efficient similarity comparison measure among  
images.
