# Segmentation Comparsion

**URL:** <https://discourse.slicer.org/t/segmentation-comparsion/9467>\
**Category:** Support\
**Tags:** slicerrt\
**Created:** [December 10, 2019, 7:59pm UTC](https://discourse.slicer.org/t/segmentation-comparsion/9467 "2019-12-10T19:59:38Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![fkr](https://avatars.discourse-cdn.com/v4/letter/f/d26b3c/32.png) [@fkr](https://discourse.slicer.org/u/fkr)\
**Post date:** [December 10, 2019, 7:59pm UTC](https://discourse.slicer.org/t/segmentation-comparsion/9467/1 "2019-12-10T19:59:38Z")

</div>

Hi,

I need some help with the Segmentation Comparsion Module of SlicerRT. I have some dicoms with segmentations (10 per Dicom), that I want to compare to each other. The results I get from the Dice and Hausdorff tables are perfect for me, but due to the mass of data I need to automate it.

Is there a simple way in Python to do this? Similar to: [Hausdorff distance calculation in SegmentComparison module](https://discourse.slicer.org/t/hausdorff-distance-calculation-in-segmentcomparison-module/4300) maybe?

I just need to get the values of the dice score and hausdorff distance, so I can save them to a variable. The rest of the script should be no problem.

Maybe @cpinter can help?

Thanks a lot!

---

<div class="post-metadata">

**Author:** ![fkr](https://avatars.discourse-cdn.com/v4/letter/f/d26b3c/32.png) [@fkr](https://discourse.slicer.org/u/fkr)\
**Post date:** [December 10, 2019, 10:09pm UTC](https://discourse.slicer.org/t/segmentation-comparsion/9467/2 "2019-12-10T22:09:35Z")

</div>

Sorry, i meant this thread: [Distance between two segments](https://discourse.slicer.org/t/distance-between-two-segments/4910/5)

---

<div class="post-metadata">

**Author:** ![fedorov](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/fedorov/32/14_2.png) [@fedorov](https://discourse.slicer.org/u/fedorov)\
**Post date:** [December 11, 2019, 2:00am UTC](https://discourse.slicer.org/t/segmentation-comparsion/9467/3 "2019-12-11T02:00:31Z")

</div>

[`plastimatch dice`](https://plastimatch.org/plastimatch.html) can be one way to batch it:

> The plastimatch _dice_ compares binary label images using Dice coefficient, Hausdorff distance, or contour mean distance. The input images are treated as boolean, where non-zero values mean that voxel is inside of the structure and zero values mean that the voxel is outside of the structure.
