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