# Calculating distance using Maurer distance map

**URL:** <https://discourse.slicer.org/t/calculating-distance-using-maurer-distance-map/1848>\
**Category:** Support\
**Created:** [January 15, 2018, 6:43pm UTC](https://discourse.slicer.org/t/calculating-distance-using-maurer-distance-map/1848 "2018-01-15T18:43:46Z")\
**Posts on this page:** 1\
**Showing post:** 8

<div class="post-metadata">

**Author:** ![tnguyen](https://avatars.discourse-cdn.com/v4/letter/t/6f9a4e/32.png) [@tnguyen](https://discourse.slicer.org/u/tnguyen)\
**Post date:** [January 16, 2018, 4:07pm UTC](https://discourse.slicer.org/t/calculating-distance-using-maurer-distance-map/1848/8 "2018-01-16T16:07:56Z")

</div>

I have been able to use Segment Comparison and got the maximum, 95th, and median distance just like you described. However, is there a way to extract all the distances between the two segments instead of just the three metrics above? I want to assess if the treatment zone has achieved enough margin around the pre-treatment tumor, so the minimum distance between these two segments is more important for this assessment.

I’ve been searching for awhile, and I found a link on github  
[[https://github.com/SlicerRt/SlicerRT/blob/master/SegmentComparison/Logic/vtkPolyDataDistanceHistogramFilter.cxx](https://github.com/SlicerRt/SlicerRT/blob/master/SegmentComparison/Logic/vtkPolyDataDistanceHistogramFilter.cxx)]  
It seems like Segment Comparison module does calculate all the distances but only the max, 95th, and median are shown in Slicer. I have only been using Slicer for a couple weeks but I’m very much interested to learn more. Would you point me in the direction of extracting the distance histogram or just the minimum distance value?

---

_[View the full topic](https://discourse.slicer.org/t/calculating-distance-using-maurer-distance-map/1848)._
