Commit a5ad13a175b76123815858a16e2a602a4b836df6
1 parent
161ef11e
Exists in
master
and in
55 other branches
FIX: edition when the brush is bigger than the slice (IMPROVED)
Showing
1 changed file
with
1 additions
and
1 deletions
Show diff stats
invesalius/data/slice_.py
... | ... | @@ -428,7 +428,7 @@ class Slice(object): |
428 | 428 | roi_i = image[yi:yf, xi:xf] |
429 | 429 | |
430 | 430 | # Checking if roi_i has at least one element. |
431 | - if numpy.product(roi_i.shape): | |
431 | + if roi_i.size: | |
432 | 432 | if operation == const.BRUSH_THRESH: |
433 | 433 | # It's a trick to make points between threshold gets value 254 |
434 | 434 | # (1 * 253 + 1) and out ones gets value 1 (0 * 253 + 1). | ... | ... |