From d1b18fa70d14dec3959b1bb22bfe0a834244d30a Mon Sep 17 00:00:00 2001 From: Thiago Franco de Moraes Date: Wed, 23 Jun 2021 15:16:23 -0300 Subject: [PATCH] Showing an warning message if there is not any voxel selected when creating a surface from mask (FIX: #277) --- invesalius/data/surface.py | 3 +++ 1 file changed, 3 insertions(+), 0 deletions(-) diff --git a/invesalius/data/surface.py b/invesalius/data/surface.py index 72459a2..f9688a8 100644 --- a/invesalius/data/surface.py +++ b/invesalius/data/surface.py @@ -609,6 +609,9 @@ class SurfaceManager(): """ Create surface actor, save into project and send it to viewer. """ + if mask.matrix.max() < 127: + wx.MessageBox(_("It's not possible to create a surface because there is not any voxel selected on mask"), _("Create surface warning")) + return t_init = time.time() matrix = slice_.matrix filename_img = slice_.matrix_filename -- libgit2 0.21.2