# How is the volume calculated in Labelmap statistics

**URL:** <https://discourse.slicer.org/t/how-is-the-volume-calculated-in-labelmap-statistics/17758>\
**Category:** Support\
**Created:** [May 24, 2021, 12:27pm UTC](https://discourse.slicer.org/t/how-is-the-volume-calculated-in-labelmap-statistics/17758 "2021-05-24T12:27:27Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Chenglin\_Zhu](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/chenglin_zhu/32/11031_2.png) [@Chenglin\_Zhu](https://discourse.slicer.org/u/Chenglin_Zhu)\
**Post date:** [May 24, 2021, 12:27pm UTC](https://discourse.slicer.org/t/how-is-the-volume-calculated-in-labelmap-statistics/17758/1 "2021-05-24T12:27:27Z")

</div>

Hello!  
I am new to Slicer and I’m trying to calculate the volume of the pituitary gland from MRI slides. Now I can segment the pituitary gland out and use segment statistics to calculate its volume. However, I wondering how is the volume calculated out of discrete slides and what assumptions are made?

Appreciate

---

<div class="post-metadata">

**Author:** ![Andinet\_Enquobahrie](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/andinet_enquobahrie/32/75_2.png) [@Andinet\_Enquobahrie](https://discourse.slicer.org/u/Andinet_Enquobahrie)\
**Post date:** [May 24, 2021, 1:14pm UTC](https://discourse.slicer.org/t/how-is-the-volume-calculated-in-labelmap-statistics/17758/2 "2021-05-24T13:14:29Z")

</div>

Hello @Chenglin_Zhu

Here is some documentation  
[https://slicer.readthedocs.io/en/latest/user\_guide/modules/segmentstatistics.html](https://slicer.readthedocs.io/en/latest/user_guide/modules/segmentstatistics.html)

Actual code

> <https://github.com/Slicer/Slicer/blob/master/Modules/Scripted/SegmentStatistics/SegmentStatisticsPlugins/LabelmapSegmentStatisticsPlugin.py#L94-L97>

-Andinet
