Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/scilpy/cli/scil_tractogram_cut_streamlines.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,8 @@ def _build_arg_parser():
p.add_argument('--min_length', type=float, default=0,
help='Minimum length of streamlines to keep (in mm) '
'[%(default)s].')
p.add_argument('--no_empty', action='store_true',
help='Do not write file if there is no streamline.')

g = p.add_argument_group('Cutting options', 'Options for cutting '
'streamlines with --mask.')
Expand Down Expand Up @@ -191,7 +193,7 @@ def main():
new_sft = StatefulTractogram.from_sft(
compressed_strs, sft, data_per_streamline=sft.data_per_streamline)

save_tractogram(new_sft, args.out_tractogram)
save_tractogram(new_sft, args.out_tractogram, args.no_empty)


if __name__ == "__main__":
Expand Down