Commit 9ece833aea389625de8c49bf41286d90d90ead69
1 parent
0fb92927
Exists in
editor_improvements
improvements
Showing
1 changed file
with
2 additions
and
1 deletions
Show diff stats
invesalius/data/slice_.py
... | ... | @@ -466,7 +466,8 @@ class Slice(object): |
466 | 466 | elif operation == const.BRUSH_THRESH_ADD_ONLY: |
467 | 467 | roi_m[((index) & (roi_i >= thresh_min) & (roi_i <= thresh_max))] = 254 |
468 | 468 | elif operation == const.BRUSH_THRESH_ERASE_ONLY: |
469 | - roi_m[((index) & ((roi_i < thresh_min) | (roi_i > thresh_max)))] = 1 | |
469 | + out_thresh = (roi_i < thresh_min) | (roi_i > thresh_max) | |
470 | + roi_m[((index) & (out_thresh))] = 1 | |
470 | 471 | elif operation == const.BRUSH_DRAW: |
471 | 472 | roi_m[index] = 254 |
472 | 473 | elif operation == const.BRUSH_ERASE: | ... | ... |