# Volume calculation

**URL:** <https://discourse.slicer.org/t/volume-calculation/11195>\
**Category:** Development\
**Created:** [April 20, 2020, 2:43am UTC](https://discourse.slicer.org/t/volume-calculation/11195 "2020-04-20T02:43:39Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![siaeleni](https://avatars.discourse-cdn.com/v4/letter/s/b4bc9f/32.png) [@siaeleni](https://discourse.slicer.org/u/siaeleni)\
**Post date:** [April 20, 2020, 2:43am UTC](https://discourse.slicer.org/t/volume-calculation/11195/1 "2020-04-20T02:43:39Z")

</div>

Hi all,  
Here you can see that I have uploaded two different models and I want to calculate the Volumes.  
I am expecting that the green to have a larger volume, but I get significantly larger;  
green = 1147349mm^3  
blue = 127196mm^3  
I am trying to understand what exactly is calculated at the blue case?  
The “Inside Blue” Volume or the “Between Blue” volume?  
(please see the image attached)

 ![pic1](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/f/c/fc015e7326d60c6267e2298b336b8f17acc392ea.png)

---

<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:** [April 20, 2020, 4:45am UTC](https://discourse.slicer.org/t/volume-calculation/11195/2 "2020-04-20T04:45:51Z")

</div>

Blue is a shell (it is hollow), while green is an open surface, which gets closed in some way by the volume computation algorithm. Since green is not hollow, it has much larger volume.

Note that volume is undefined for open surfaces and for example, result may heavily depend on orientation of the mesh, it is advisable to close the surface first. The simplest is to convert it to segmentation node (by right-clicking on it in Data module) - you will see how exactly the surface gets closed - and use Segment Statistics to get the volume.

If you want to compare volumes then you need to solidify the hollow model. For this, you can use the excellent Wrap Solidify effect (provided by [SurfaceWrapSolidify extension](https://github.com/sebastianandress/Slicer-SurfaceWrapSolidify)).

---

<div class="post-metadata">

**Author:** ![siaeleni](https://avatars.discourse-cdn.com/v4/letter/s/b4bc9f/32.png) [@siaeleni](https://discourse.slicer.org/u/siaeleni)\
**Post date:** [April 20, 2020, 11:40pm UTC](https://discourse.slicer.org/t/volume-calculation/11195/3 "2020-04-20T23:40:55Z")

</div>

Thanks, Andras, I converted them to hollow and now seems that are comparable.  
This is what I get (image attached).  
I was wondering how can I get the whole inside blue volume as well? Is there any way to measure that as well?

 ![pic2](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/f/6/f6300285499009976bece7bf93ac86c9002a6457.jpeg)

---

<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:** [April 21, 2020, 12:19am UTC](https://discourse.slicer.org/t/volume-calculation/11195/4 "2020-04-21T00:19:55Z")

</div>

> [@siaeleni](#):
>
> I was wondering how can I get the whole inside blue volume as well? Is there any way to measure that as well?

You can solidify a shell using WrapSolidify effect (provided by SurfaceWrapSolidify extension).

---

<div class="post-metadata">

**Author:** ![siaeleni](https://avatars.discourse-cdn.com/v4/letter/s/b4bc9f/32.png) [@siaeleni](https://discourse.slicer.org/u/siaeleni)\
**Post date:** [April 21, 2020, 1:26am UTC](https://discourse.slicer.org/t/volume-calculation/11195/5 "2020-04-21T01:26:15Z")

</div>

Oh I see what it does, thanks a lot again.
