Skip to content

Commit

Permalink
fix when empty ids
Browse files Browse the repository at this point in the history
  • Loading branch information
arnaudbore committed Nov 15, 2024
1 parent 713d3d0 commit 305bf75
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion scripts/scil_tractogram_filter_by_roi.py
Original file line number Diff line number Diff line change
Expand Up @@ -456,7 +456,11 @@ def main():
'streamlines'.format(roi_opt, len(filtered_sft)))

sft = filtered_sft
total_kept_ids = total_kept_ids[kept_ids]
if kept_ids.size == 0:
total_kept_ids = 0
else:
total_kept_ids = total_kept_ids[kept_ids]

o_dict['streamline_count_after_criteria{}'.format(i)] = \
len(sft.streamlines)

Expand Down

0 comments on commit 305bf75

Please sign in to comment.