From 61ecc054e5845ac98fd98a783583b48cbb0e8f44 Mon Sep 17 00:00:00 2001 From: Thiago Franco de Moraes Date: Tue, 16 Aug 2016 14:25:22 -0300 Subject: [PATCH] Testings --- invesalius/data/styles.py | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/invesalius/data/styles.py b/invesalius/data/styles.py index 5a4d3eb..56b882e 100644 --- a/invesalius/data/styles.py +++ b/invesalius/data/styles.py @@ -1806,10 +1806,22 @@ class FlooFillMaskInteractorStyle(DefaultInteractorStyle): (0, -1, 0), (0, 1, 0)) + neighbor_iter = [] + for i in xrange(-1, 2): + for j in xrange(-1, 2): + for k in xrange(-1, 2): + neighbor_iter.append((i, j, k)) + if iren.GetControlKey(): - floodfill.floodfill_threshold(cp_mask, [[x, y, z]], 254, 255, 1, neighbor_iter, mask) + t0 = 254 + t1 = 255 + fill = 1 else: - floodfill.floodfill_threshold(cp_mask, [[x, y, z]], 0, 1, 254, neighbor_iter, mask) + t0 = 0 + t1 = 1 + fill = 254 + + floodfill.floodfill_threshold(cp_mask, [[x, y, z]], t0, t1, fill, neighbor_iter, mask) self.viewer.slice_.buffer_slices['AXIAL'].discard_mask() self.viewer.slice_.buffer_slices['CORONAL'].discard_mask() -- libgit2 0.21.2