From 647494a055af48e1de4446d9b6dda59aaa8a473e Mon Sep 17 00:00:00 2001 From: Thiago Franco de Moraes Date: Tue, 24 Jun 2014 09:23:18 -0300 Subject: [PATCH] Fixed problem with lazy threshold --- invesalius/data/slice_.py | 2 ++ 1 file changed, 2 insertions(+), 0 deletions(-) diff --git a/invesalius/data/slice_.py b/invesalius/data/slice_.py index 4475efd..5d7787e 100644 --- a/invesalius/data/slice_.py +++ b/invesalius/data/slice_.py @@ -1202,6 +1202,8 @@ class Slice(object): thresh_min, thresh_max = self.current_mask.threshold_range m = (((slice_matrix >= thresh_min) & (slice_matrix <= thresh_max)) * 255) m[mask == 1] = 1 + m[mask == 2] = 2 + m[mask == 253] = 253 m[mask == 254] = 254 return m.astype('uint8') -- libgit2 0.21.2