Commit c04408d689c9df5600f762c604d4f988be618d51

Authored by tatiana
1 parent 8d05dc3e

ENH: Set progress on measure step of the pipeline

Showing 1 changed file with 3 additions and 1 deletions   Show diff stats
invesalius/data/surface.py
... ... @@ -231,7 +231,7 @@ class SurfaceManager():
231 231 if imagedata_resolution:
232 232 imagedata = iu.ResampleImage3D(imagedata, imagedata_resolution)
233 233  
234   - pipeline_size = 3
  234 + pipeline_size = 4
235 235 if decimate_reduction:
236 236 pipeline_size += 1
237 237 if (smooth_iterations and smooth_relaxation_factor):
... ... @@ -341,6 +341,8 @@ class SurfaceManager():
341 341  
342 342 # The following lines have to be here, otherwise all volumes disappear
343 343 measured_polydata = vtk.vtkMassProperties()
  344 + measured_polydata.AddObserver("ProgressEvent", lambda obj,evt:
  345 + UpdateProgress(obj, _("Generating 3D surface...")))
344 346 measured_polydata.SetInput(polydata)
345 347 volume = measured_polydata.GetVolume()
346 348 surface.volume = volume
... ...