# SSIM computation on 3D slicer 5.7.0

**URL:** <https://discourse.slicer.org/t/ssim-computation-on-3d-slicer-5-7-0/38121>\
**Category:** Support\
**Tags:** segmentation, python\
**Created:** [August 30, 2024, 1:53am UTC](https://discourse.slicer.org/t/ssim-computation-on-3d-slicer-5-7-0/38121 "2024-08-30T01:53:38Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Offormata\_Osunkwor](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/offormata_osunkwor/32/77776_2.png) [@Offormata\_Osunkwor](https://discourse.slicer.org/u/Offormata_Osunkwor)\
**Post date:** [August 30, 2024, 1:53am UTC](https://discourse.slicer.org/t/ssim-computation-on-3d-slicer-5-7-0/38121/1 "2024-08-30T01:53:38Z")

</div>

Is there any module on slicer for computing structural similarity index? or any python code will be much appreciated.

---

<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:** [September 1, 2024, 10:44pm UTC](https://discourse.slicer.org/t/ssim-computation-on-3d-slicer-5-7-0/38121/2 "2024-09-01T22:44:13Z")

</div>

SSIM is not used commonly in medical image computing and I’m not aware of any Slicer extension computing it. However, many implementations are available in Python that you can install and run in Slicer by a few lines of Python code. What are you planning to use SSIM for?

---

<div class="post-metadata">

**Author:** ![Offormata\_Osunkwor](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/offormata_osunkwor/32/77776_2.png) [@Offormata\_Osunkwor](https://discourse.slicer.org/u/Offormata_Osunkwor)\
**Post date:** [September 2, 2024, 12:27am UTC](https://discourse.slicer.org/t/ssim-computation-on-3d-slicer-5-7-0/38121/3 "2024-09-02T00:27:44Z")

</div>

Hi Andras,

Thanks for your response. I wanna use it to compare different phases of phased binned 4DCT.

---

<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:** [September 2, 2024, 2:34am UTC](https://discourse.slicer.org/t/ssim-computation-on-3d-slicer-5-7-0/38121/4 "2024-09-02T02:34:27Z")

</div>

Thanks for the clarification. For comparison of CT images, I would recommend using similarity metrics that have been specifically developed for this purpose. Several are available in ITK/SimpleITK (that is bundled with Slicer) - see for example in a [topic in the ITK forum](https://discourse.itk.org/t/metric-to-compare-two-images-using-simpleitk/3351/2).
