# MassProperties

**URL:** https://discourse.vtk.org/t/massproperties/2753
**Category:** Support
**Created:** [March 4, 2020, 6:31pm UTC](https://discourse.vtk.org/t/massproperties/2753 "2020-03-04T18:31:50Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![ShaneKirkbride](https://discourse.vtk.org/user_avatar/discourse.vtk.org/shanekirkbride/32/1392_2.png) [@ShaneKirkbride](https://discourse.vtk.org/u/ShaneKirkbride)
#### Post date: [March 4, 2020, 6:31pm UTC](https://discourse.vtk.org/t/massproperties/2753/1 "2020-03-04T18:31:50Z")

</div>

I’m looking at the vtkMassProperties class. How is the mass computed with no knowledge of the pixel or slice spacing of the PolyData?

---

<div class="post-metadata">

### Author: ![lassoan](https://discourse.vtk.org/user_avatar/discourse.vtk.org/lassoan/32/50_2.png) [@lassoan](https://discourse.vtk.org/u/lassoan)
#### Post date: [March 4, 2020, 8:31pm UTC](https://discourse.vtk.org/t/massproperties/2753/2 "2020-03-04T20:31:50Z")

</div>

Points of a polydata are not defined on a rectilinear grid, so there are no pixels or slices. Instead, point coordinates are floating-point values, defined directly in the world coordinate system.

If you create polydata from image (e.g., using marching cubes) then the conversion algorithm takes into account pixel and slice spacing.

---

<div class="post-metadata">

### Author: ![ShaneKirkbride](https://discourse.vtk.org/user_avatar/discourse.vtk.org/shanekirkbride/32/1392_2.png) [@ShaneKirkbride](https://discourse.vtk.org/u/ShaneKirkbride)
#### Post date: [March 4, 2020, 8:36pm UTC](https://discourse.vtk.org/t/massproperties/2753/3 "2020-03-04T20:36:58Z")

</div>

@lassoan so if my units are mm in my image and I’m looking at this example:  
[https://lorensen.github.io/VTKExamples/site/Cxx/Utilities/MassProperties/](https://lorensen.github.io/VTKExamples/site/Cxx/Utilities/MassProperties/)

What units would the volume output be in? L or mL? or mm^3?

Thanks,  
~Shane

---

<div class="post-metadata">

### Author: ![lassoan](https://discourse.vtk.org/user_avatar/discourse.vtk.org/lassoan/32/50_2.png) [@lassoan](https://discourse.vtk.org/u/lassoan)
#### Post date: [March 4, 2020, 8:54pm UTC](https://discourse.vtk.org/t/massproperties/2753/4 "2020-03-04T20:54:37Z")

</div>

Volume = length \* length \* length, so if your length unit is mm then volume unit is mm \* mm \* mm.
