Commit 1cc92f9650546e53b6cc8f8f32a84c1bee2bfad9
1 parent
21f2f380
Exists in
ff_mask
Copying mask after applying threshold to all slices
Showing
2 changed files
with
6 additions
and
5 deletions
Show diff stats
invesalius/data/floodfill.pyx
... | ... | @@ -120,8 +120,8 @@ def floodfill_threshold(np.ndarray[image_t, ndim=3] data, list seeds, int t0, in |
120 | 120 | |
121 | 121 | with nogil: |
122 | 122 | while stack.size(): |
123 | - c = stack.front() | |
124 | - stack.pop_front() | |
123 | + c = stack.back() | |
124 | + stack.pop_back() | |
125 | 125 | |
126 | 126 | x = c.x |
127 | 127 | y = c.y | ... | ... |
invesalius/data/styles.py
... | ... | @@ -1802,12 +1802,10 @@ class FloodFillMaskInteractorStyle(DefaultInteractorStyle): |
1802 | 1802 | position = viewer.calculate_matrix_position(coord) |
1803 | 1803 | |
1804 | 1804 | x, y, z = self.calcultate_scroll_position(position) |
1805 | - mask = self.viewer.slice_.current_mask.matrix[1:, 1:, 1:] | |
1806 | - | |
1807 | - cp_mask = mask.copy() | |
1808 | 1805 | |
1809 | 1806 | from_3d = True |
1810 | 1807 | if self.config.target == "3D": |
1808 | + print "DOING 3D, manolo!" | |
1811 | 1809 | neighbor_iter = ((-1, 0, 0), |
1812 | 1810 | (1, 0, 0), |
1813 | 1811 | (0, -1, 0), |
... | ... | @@ -1821,6 +1819,9 @@ class FloodFillMaskInteractorStyle(DefaultInteractorStyle): |
1821 | 1819 | (0, -1, 0), |
1822 | 1820 | (0, 1, 0)) |
1823 | 1821 | |
1822 | + mask = self.viewer.slice_.current_mask.matrix[1:, 1:, 1:] | |
1823 | + cp_mask = mask.copy() | |
1824 | + | |
1824 | 1825 | # neighbor_iter = [] |
1825 | 1826 | # for i in xrange(-1, 2): |
1826 | 1827 | # for j in xrange(-1, 2): | ... | ... |