diff --git a/invesalius/data/surface.py b/invesalius/data/surface.py index e5fc2bd..43ca55c 100644 --- a/invesalius/data/surface.py +++ b/invesalius/data/surface.py @@ -137,6 +137,17 @@ class SurfaceManager(): UpdateProgress(smoother, "Smoothing surface...")) polydata = smoother.GetOutput() + # Filter used to detect and fill holes. Only fill boundary edges holes. + #TODO: Hey! This piece of code is the same from + # polydata_utils.FillSurfaceHole, we need to review this. + filled_polydata = vtk.vtkFillHolesFilter() + filled_polydata.SetInput(polydata) + filled_polydata.SetHoleSize(500) + filled_polydata.AddObserver("ProgressEvent", lambda obj, evt: + UpdateProgress(filled_polydata, + "Filling polydata...")) + polydata = filled_polydata.GetOutput() + # Orient normals from inside to outside normals = vtk.vtkPolyDataNormals() normals.SetInput(polydata) @@ -231,4 +242,4 @@ class SurfaceManager(): # Update value in project's surface_dict proj = Project() proj.surface_dict[index].colour = colour - ps.Publisher().sendMessage('Render volume viewer') \ No newline at end of file + ps.Publisher().sendMessage('Render volume viewer') diff --git a/invesalius/reader/dicom.py b/invesalius/reader/dicom.py index f4069f8..afce6d2 100644 --- a/invesalius/reader/dicom.py +++ b/invesalius/reader/dicom.py @@ -1339,7 +1339,7 @@ class Parser(): img = self.gdcm_reader.GetImage() direc_cosines = img.GetDirectionCosines() orientation = gdcm.Orientation() - type = orientation.GetType(direc_cosines) + type = orientation.GetType(tuple(direc_cosines)) label = orientation.GetLabel(type) if (label): -- libgit2 0.21.2