Volume calculation of Models

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 .

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.

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?

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).

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)

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

2 Likes

This works, thanks Andras.