From 22751b3f0c39aa8442f55cb6fb91efefc38d942b Mon Sep 17 00:00:00 2001 From: paulojamorim Date: Wed, 20 Jan 2010 16:53:44 +0000 Subject: [PATCH] ENH: Improvements in progress to generate surface --- invesalius/data/surface.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/invesalius/data/surface.py b/invesalius/data/surface.py index 632fc72..7be7d19 100644 --- a/invesalius/data/surface.py +++ b/invesalius/data/surface.py @@ -188,7 +188,7 @@ class SurfaceManager(): if imagedata_resolution: imagedata = iu.ResampleImage3D(imagedata, imagedata_resolution) - pipeline_size = 2 + pipeline_size = 5 if decimate_reduction: pipeline_size += 1 if (smooth_iterations and smooth_relaxation_factor): @@ -230,18 +230,24 @@ class SurfaceManager(): # Orient normals from inside to outside normals = vtk.vtkPolyDataNormals() + normals.AddObserver("ProgressEvent", lambda obj,evt: + UpdateProgress(obj, _("Generating 3D surface..."))) normals.SetInput(polydata) normals.SetFeatureAngle(80) normals.AutoOrientNormalsOn() normals.GetOutput().ReleaseDataFlagOn() stripper = vtk.vtkStripper() + stripper.AddObserver("ProgressEvent", lambda obj,evt: + UpdateProgress(obj, _("Generating 3D surface..."))) stripper.SetInput(normals.GetOutput()) stripper.PassThroughCellIdsOn() stripper.PassThroughPointIdsOn() # Map polygonal data (vtkPolyData) to graphics primitives. mapper = vtk.vtkPolyDataMapper() + mapper.AddObserver("ProgressEvent", lambda obj,evt: + UpdateProgress(obj, _("Generating 3D surface..."))) mapper.SetInput(stripper.GetOutput()) mapper.ScalarVisibilityOff() -- libgit2 0.21.2