diff --git a/src/scilpy/cli/scil_tractogram_cut_streamlines.py b/src/scilpy/cli/scil_tractogram_cut_streamlines.py index eca61c0c9..b127bde4a 100755 --- a/src/scilpy/cli/scil_tractogram_cut_streamlines.py +++ b/src/scilpy/cli/scil_tractogram_cut_streamlines.py @@ -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.') @@ -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__":