From eb05cef78a7693f13b48f64bd00aa8e9710bb801 Mon Sep 17 00:00:00 2001 From: Thiago Franco de Moraes Date: Wed, 25 Feb 2015 09:44:06 -0300 Subject: [PATCH] fixed a problem in the threshold filter --- invesalius/data/threshold.pyx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/invesalius/data/threshold.pyx b/invesalius/data/threshold.pyx index e375f7b..288709f 100644 --- a/invesalius/data/threshold.pyx +++ b/invesalius/data/threshold.pyx @@ -24,8 +24,8 @@ def threshold(DTYPE16_t[:, :] image, DTYPE8_t[:, :] mask, DTYPE16_t low, DTYPE16 cdef DTYPE16_t v for y in prange(sy, nogil=True): for x in xrange(sx): - v = mask[y, x] - if not v: + v = image[y, x] + if not mask[y, x]: if v >= low and v <= high: mask[y, x] = 255 else: -- libgit2 0.21.2