Retrieve Volume and Surface Area of a ModelNode (Surface Mesh (vtkPolyData)) - Python

l.geronzi
Fri, 21 Jan 2022 11:04:47 +0000
Support

Hi all,
I am a beginner and I don’t have much experience with the 3DSlicer environment and vtk libraries. I have already followed the various tutorials to get started.
My problem is the following.
I am trying to use python to retrieve model information, particularly Surface Area and Volume.
The ModelNode in my case is a Surface Mesh (vtkPolyData).

I’m using:
modelnode=slicer.util.getNode(“Model_3”)
meshpolydata=modelnode.GetMesh()

From here, how do I get easily Surface Area and Volume?

Thank you,

Leonardo

5 posts - 4 participants