Commit 61ecc054e5845ac98fd98a783583b48cbb0e8f44

Authored by Thiago Franco de Moraes
1 parent 75509c1d
Exists in ff_mask

Testings

Showing 1 changed file with 14 additions and 2 deletions   Show diff stats
invesalius/data/styles.py
... ... @@ -1806,10 +1806,22 @@ class FlooFillMaskInteractorStyle(DefaultInteractorStyle):
1806 1806 (0, -1, 0),
1807 1807 (0, 1, 0))
1808 1808  
  1809 + neighbor_iter = []
  1810 + for i in xrange(-1, 2):
  1811 + for j in xrange(-1, 2):
  1812 + for k in xrange(-1, 2):
  1813 + neighbor_iter.append((i, j, k))
  1814 +
1809 1815 if iren.GetControlKey():
1810   - floodfill.floodfill_threshold(cp_mask, [[x, y, z]], 254, 255, 1, neighbor_iter, mask)
  1816 + t0 = 254
  1817 + t1 = 255
  1818 + fill = 1
1811 1819 else:
1812   - floodfill.floodfill_threshold(cp_mask, [[x, y, z]], 0, 1, 254, neighbor_iter, mask)
  1820 + t0 = 0
  1821 + t1 = 1
  1822 + fill = 254
  1823 +
  1824 + floodfill.floodfill_threshold(cp_mask, [[x, y, z]], t0, t1, fill, neighbor_iter, mask)
1813 1825  
1814 1826 self.viewer.slice_.buffer_slices['AXIAL'].discard_mask()
1815 1827 self.viewer.slice_.buffer_slices['CORONAL'].discard_mask()
... ...