Skip to content

Commit

Permalink
filter_by_roi: major refactor to make checks before the processing
Browse files Browse the repository at this point in the history
  • Loading branch information
EmmaRenauld committed Apr 3, 2024
1 parent 1ac830a commit 65327b7
Show file tree
Hide file tree
Showing 2 changed files with 271 additions and 225 deletions.
3 changes: 2 additions & 1 deletion scilpy/io/image.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@ def merge_labels_into_mask(atlas, filtering_args):
for filter_opt in values:
if ':' in filter_opt:
values = [int(x) for x in filter_opt.split(':')]
mask[(atlas >= int(min(values))) & (atlas <= int(max(values)))] = 1
mask[(atlas >= int(min(values))) &
(atlas <= int(max(values)))] = 1
else:
mask[atlas == int(filter_opt)] = 1
elif ':' in filtering_args:
Expand Down

0 comments on commit 65327b7

Please sign in to comment.