Commit 360a7beb0bed7dcb8266dd881a044c6f49c1908e

Authored by Thiago Franco de Moraes
1 parent ec15fe81
Exists in master

Improvements on mask 3d preview when changing actual mask

invesalius/control.py
... ... @@ -965,7 +965,7 @@ class Controller():
965 965 re_dialog = dialog.ResizeImageDialog()
966 966 re_dialog.SetValue(int(resolution_percentage*100))
967 967 re_dialog_value = re_dialog.ShowModal()
968   - re_dialog.Close()
  968 + re_dialog.Close()
969 969  
970 970 if re_dialog_value == wx.ID_OK:
971 971 percentage = re_dialog.GetValue()
... ... @@ -1143,7 +1143,7 @@ class Controller():
1143 1143 def show_mask_preview(self, index, flag=True):
1144 1144 proj = prj.Project()
1145 1145 mask = proj.mask_dict[index]
1146   - slc = self.Slice.do_threshold_to_all_slices(mask)
  1146 + self.Slice.do_threshold_to_all_slices(mask)
1147 1147 mask.create_3d_preview()
1148 1148 Publisher.sendMessage("Load mask preview", mask_3d_actor=mask.volume._actor, flag=flag)
1149 1149 Publisher.sendMessage("Reload actual slice")
... ...
invesalius/data/slice_.py
... ... @@ -1185,6 +1185,7 @@ class Slice(metaclass=utils.Singleton):
1185 1185 future_mask = proj.GetMask(index)
1186 1186 future_mask.is_shown = True
1187 1187 self.current_mask = future_mask
  1188 + self.current_mask.on_show()
1188 1189  
1189 1190 colour = future_mask.colour
1190 1191 self.SetMaskColour(index, colour, update=False)
... ...