# Volume calculation of Models

**URL:** https://discourse.slicer.org/t/volume-calculation-of-models/1482
**Category:** Support
**Tags:** volume
**Created:** [November 17, 2017, 2:17pm UTC](https://discourse.slicer.org/t/volume-calculation-of-models/1482 "2017-11-17T14:17:19Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![Remco](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/remco/32/902_2.png) [@Remco](https://discourse.slicer.org/u/Remco)
#### Post date: [November 17, 2017, 2:17pm UTC](https://discourse.slicer.org/t/volume-calculation-of-models/1482/1 "2017-11-17T14:17:19Z")

</div>

Operating system: Win7  
Slicer version: 4.9.0-2017-11-16

I have loaded a uMRI dataset and created some surface meshes using the segment editor. I would like to interrogate the volume of the surface meshes using the Models Module, however the units are in mm^3 (See screenshot). Since my volumes are very small this is somewhat unfortunate. Can I adjust the units or significant digits somewhere? the general setting for length under Preferences does not appear to affect the volume calculation. Is there perhaps a different module I could use?

![20171117_Model-volume-information](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/d/c/dcc3e91e502ac86bd64c8926db6c82a728a95e44.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: [November 17, 2017, 2:20pm UTC](https://discourse.slicer.org/t/volume-calculation-of-models/1482/2 "2017-11-17T14:20:46Z")

</div>

You might consider changing volume spacing in Volumes module, for example multiplying it by 1000 (so the unit would be micrometer instead of millimeter). Of course that would mean you would need to interpret values that are shown in mm as um. You can also change displayed length unit from mm to um in Edit/Application settings/Units, but there may be some places where “mm” is hardcoded, so you would still see mm.

---

<div class="post-metadata">

### Author: ![Remco](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/remco/32/902_2.png) [@Remco](https://discourse.slicer.org/u/Remco)
#### Post date: [November 17, 2017, 3:23pm UTC](https://discourse.slicer.org/t/volume-calculation-of-models/1482/3 "2017-11-17T15:23:07Z")

</div>

Thanks for the advice, I see that I can indeed change the volume spacing in the Volume module. However, the existing volume meshes are not updated, only new models have the new volume spacing applied.

I assume I would have to recreate the models?

---

<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: [November 17, 2017, 9:57pm UTC](https://discourse.slicer.org/t/volume-calculation-of-models/1482/4 "2017-11-17T21:57:18Z")

</div>

You can scale models by applying a transformation matrix that has the scaling factor in the first 3 values in the diagonal (using Transforms module).

---

<div class="post-metadata">

### Author: ![brhoom](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/brhoom/32/1228_2.png) [@brhoom](https://discourse.slicer.org/u/brhoom)
#### Post date: [May 10, 2018, 10:08pm UTC](https://discourse.slicer.org/t/volume-calculation-of-models/1482/5 "2018-05-10T22:08:01Z")

</div>

A related question. I tried to scale to 0.001 but it does not work. The Transforms module does not accept more than 2 places after the decimal point. I tried this code but also does not work:

```
nd=getNode('img')
vTransform = vtk.vtkTransform()
vTransform.Scale(0.001,0.001,0.001)
transform = slicer.vtkMRMLLinearTransformNode()
slicer.mrmlScene.AddNode(transform) 
logic = slicer.vtkSlicerTransformLogic()
logic.hardenTransform(nd)
```

---

<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: [May 10, 2018, 10:39pm UTC](https://discourse.slicer.org/t/volume-calculation-of-models/1482/6 "2018-05-10T22:39:35Z")

</div>

You can press `Ctrl` - `+` to increase the number of displayed decimal digits.

---

<div class="post-metadata">

### Author: ![brhoom](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/brhoom/32/1228_2.png) [@brhoom](https://discourse.slicer.org/u/brhoom)
#### Post date: [May 11, 2018, 6:30am UTC](https://discourse.slicer.org/t/volume-calculation-of-models/1482/7 "2018-05-11T06:30:47Z")

</div>

This works, thanks Andras.
