Commit d1b18fa70d14dec3959b1bb22bfe0a834244d30a

Authored by Thiago Franco de Moraes
1 parent 8ecc0900
Exists in master

Showing an warning message if there is not any voxel selected when creating a su…

…rface from mask (FIX: #277)
Showing 1 changed file with 3 additions and 0 deletions   Show diff stats
invesalius/data/surface.py
@@ -609,6 +609,9 @@ class SurfaceManager(): @@ -609,6 +609,9 @@ class SurfaceManager():
609 """ 609 """
610 Create surface actor, save into project and send it to viewer. 610 Create surface actor, save into project and send it to viewer.
611 """ 611 """
  612 + if mask.matrix.max() < 127:
  613 + wx.MessageBox(_("It's not possible to create a surface because there is not any voxel selected on mask"), _("Create surface warning"))
  614 + return
612 t_init = time.time() 615 t_init = time.time()
613 matrix = slice_.matrix 616 matrix = slice_.matrix
614 filename_img = slice_.matrix_filename 617 filename_img = slice_.matrix_filename