Commit 654bac94bfbd5e71863315ed24ddfe5ab6ed5a26

Authored by Thiago Franco de Moraes
1 parent 2eb7bf90
Exists in vtk6

It was not showing surfaces created with greatest region, selected region and all regions filters

Showing 1 changed file with 3 additions and 1 deletions   Show diff stats
invesalius/data/surface.py
... ... @@ -245,6 +245,7 @@ class SurfaceManager():
245 245 normals.SetInputData(polydata)
246 246 normals.SetFeatureAngle(80)
247 247 normals.AutoOrientNormalsOn()
  248 + normals.Update()
248 249  
249 250 mapper = vtk.vtkPolyDataMapper()
250 251 mapper.SetInputData(normals.GetOutput())
... ... @@ -295,7 +296,8 @@ class SurfaceManager():
295 296 triangle_filter.Update()
296 297  
297 298 measured_polydata = vtk.vtkMassProperties()
298   - measured_polydata.SetInputData(triangle_filter.GetOutput())
  299 + measured_polydata.SetInputConnection(triangle_filter.GetOutputPort())
  300 + measured_polydata.Update()
299 301 volume = measured_polydata.GetVolume()
300 302 surface.volume = volume
301 303 print ">>>>", surface.volume
... ...