Commit 654bac94bfbd5e71863315ed24ddfe5ab6ed5a26
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,6 +245,7 @@ class SurfaceManager(): | ||
245 | normals.SetInputData(polydata) | 245 | normals.SetInputData(polydata) |
246 | normals.SetFeatureAngle(80) | 246 | normals.SetFeatureAngle(80) |
247 | normals.AutoOrientNormalsOn() | 247 | normals.AutoOrientNormalsOn() |
248 | + normals.Update() | ||
248 | 249 | ||
249 | mapper = vtk.vtkPolyDataMapper() | 250 | mapper = vtk.vtkPolyDataMapper() |
250 | mapper.SetInputData(normals.GetOutput()) | 251 | mapper.SetInputData(normals.GetOutput()) |
@@ -295,7 +296,8 @@ class SurfaceManager(): | @@ -295,7 +296,8 @@ class SurfaceManager(): | ||
295 | triangle_filter.Update() | 296 | triangle_filter.Update() |
296 | 297 | ||
297 | measured_polydata = vtk.vtkMassProperties() | 298 | measured_polydata = vtk.vtkMassProperties() |
298 | - measured_polydata.SetInputData(triangle_filter.GetOutput()) | 299 | + measured_polydata.SetInputConnection(triangle_filter.GetOutputPort()) |
300 | + measured_polydata.Update() | ||
299 | volume = measured_polydata.GetVolume() | 301 | volume = measured_polydata.GetVolume() |
300 | surface.volume = volume | 302 | surface.volume = volume |
301 | print ">>>>", surface.volume | 303 | print ">>>>", surface.volume |