Commit 0f686335debdc11c081063fc94139411a66f06a3

Authored by Renan
Committed by GitHub
2 parents fb428c83 72d06b9d
Exists in master

Merge branch 'master' into robot-status-UI

invesalius/control.py
@@ -965,7 +965,7 @@ class Controller(): @@ -965,7 +965,7 @@ class Controller():
965 re_dialog = dialog.ResizeImageDialog() 965 re_dialog = dialog.ResizeImageDialog()
966 re_dialog.SetValue(int(resolution_percentage*100)) 966 re_dialog.SetValue(int(resolution_percentage*100))
967 re_dialog_value = re_dialog.ShowModal() 967 re_dialog_value = re_dialog.ShowModal()
968 - re_dialog.Close() 968 + re_dialog.Close()
969 969
970 if re_dialog_value == wx.ID_OK: 970 if re_dialog_value == wx.ID_OK:
971 percentage = re_dialog.GetValue() 971 percentage = re_dialog.GetValue()
@@ -1143,7 +1143,7 @@ class Controller(): @@ -1143,7 +1143,7 @@ class Controller():
1143 def show_mask_preview(self, index, flag=True): 1143 def show_mask_preview(self, index, flag=True):
1144 proj = prj.Project() 1144 proj = prj.Project()
1145 mask = proj.mask_dict[index] 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 mask.create_3d_preview() 1147 mask.create_3d_preview()
1148 Publisher.sendMessage("Load mask preview", mask_3d_actor=mask.volume._actor, flag=flag) 1148 Publisher.sendMessage("Load mask preview", mask_3d_actor=mask.volume._actor, flag=flag)
1149 Publisher.sendMessage("Reload actual slice") 1149 Publisher.sendMessage("Reload actual slice")
invesalius/data/slice_.py
@@ -264,8 +264,6 @@ class Slice(metaclass=utils.Singleton): @@ -264,8 +264,6 @@ class Slice(metaclass=utils.Singleton):
264 def OnRemoveMasks(self, mask_indexes): 264 def OnRemoveMasks(self, mask_indexes):
265 proj = Project() 265 proj = Project()
266 for item in mask_indexes: 266 for item in mask_indexes:
267 - proj.RemoveMask(item)  
268 -  
269 # if the deleted mask is the current mask, cleans the current mask 267 # if the deleted mask is the current mask, cleans the current mask
270 # and discard from buffer all datas related to mask. 268 # and discard from buffer all datas related to mask.
271 if self.current_mask is not None and item == self.current_mask.index: 269 if self.current_mask is not None and item == self.current_mask.index:
@@ -277,6 +275,7 @@ class Slice(metaclass=utils.Singleton): @@ -277,6 +275,7 @@ class Slice(metaclass=utils.Singleton):
277 275
278 Publisher.sendMessage("Show mask", index=item, value=False) 276 Publisher.sendMessage("Show mask", index=item, value=False)
279 Publisher.sendMessage("Reload actual slice") 277 Publisher.sendMessage("Reload actual slice")
  278 + proj.RemoveMask(item)
280 279
281 def OnDuplicateMasks(self, mask_indexes): 280 def OnDuplicateMasks(self, mask_indexes):
282 proj = Project() 281 proj = Project()
@@ -1185,6 +1184,7 @@ class Slice(metaclass=utils.Singleton): @@ -1185,6 +1184,7 @@ class Slice(metaclass=utils.Singleton):
1185 future_mask = proj.GetMask(index) 1184 future_mask = proj.GetMask(index)
1186 future_mask.is_shown = True 1185 future_mask.is_shown = True
1187 self.current_mask = future_mask 1186 self.current_mask = future_mask
  1187 + self.current_mask.on_show()
1188 1188
1189 colour = future_mask.colour 1189 colour = future_mask.colour
1190 self.SetMaskColour(index, colour, update=False) 1190 self.SetMaskColour(index, colour, update=False)
optional-requirements.txt
@@ -6,3 +6,4 @@ python-socketio[client]==5.3.0 @@ -6,3 +6,4 @@ python-socketio[client]==5.3.0
6 requests==2.26.0 6 requests==2.26.0
7 uvicorn[standard]==0.15.0 7 uvicorn[standard]==0.15.0
8 opencv-python==4.5.3.56 8 opencv-python==4.5.3.56
  9 +pyacvd==0.2.7