From 654bac94bfbd5e71863315ed24ddfe5ab6ed5a26 Mon Sep 17 00:00:00 2001 From: Thiago Franco de Moraes Date: Thu, 7 Apr 2016 17:47:38 -0300 Subject: [PATCH] It was not showing surfaces created with greatest region, selected region and all regions filters --- invesalius/data/surface.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/invesalius/data/surface.py b/invesalius/data/surface.py index 15c92ed..762e9fb 100644 --- a/invesalius/data/surface.py +++ b/invesalius/data/surface.py @@ -245,6 +245,7 @@ class SurfaceManager(): normals.SetInputData(polydata) normals.SetFeatureAngle(80) normals.AutoOrientNormalsOn() + normals.Update() mapper = vtk.vtkPolyDataMapper() mapper.SetInputData(normals.GetOutput()) @@ -295,7 +296,8 @@ class SurfaceManager(): triangle_filter.Update() measured_polydata = vtk.vtkMassProperties() - measured_polydata.SetInputData(triangle_filter.GetOutput()) + measured_polydata.SetInputConnection(triangle_filter.GetOutputPort()) + measured_polydata.Update() volume = measured_polydata.GetVolume() surface.volume = volume print ">>>>", surface.volume -- libgit2 0.21.2