From b2325625ed71df2a6e267b8d71823db73ef95dbb Mon Sep 17 00:00:00 2001 From: tfmoraes Date: Fri, 19 Jun 2009 19:04:35 +0000 Subject: [PATCH] ADD: Calculating Area and Volume in the polydata pipeline --- invesalius/data/surface.py | 4 ++++ 1 file changed, 4 insertions(+), 0 deletions(-) diff --git a/invesalius/data/surface.py b/invesalius/data/surface.py index 43ca55c..b05927c 100644 --- a/invesalius/data/surface.py +++ b/invesalius/data/surface.py @@ -5,6 +5,7 @@ import constants as const import imagedata_utils as iu from project import Project import vtk_utils as vu +import polydata_utils as pu class Surface(): """ @@ -148,6 +149,9 @@ class SurfaceManager(): "Filling polydata...")) polydata = filled_polydata.GetOutput() + print "Area: %f mm2" % pu.CalculateSurfaceArea(polydata) + print "Volume: %f mm3" % pu.CalculateSurfaceVolume(polydata) + # Orient normals from inside to outside normals = vtk.vtkPolyDataNormals() normals.SetInput(polydata) -- libgit2 0.21.2