From fb9cb1ba4704ed842fdc0e47e2a047955591316f Mon Sep 17 00:00:00 2001 From: Anthony Gagnon Date: Wed, 12 Nov 2025 09:55:54 -0500 Subject: [PATCH] add `.h5` in extension using the 'same' reference --- src/scilpy/cli/scil_tractogram_commit.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/scilpy/cli/scil_tractogram_commit.py b/src/scilpy/cli/scil_tractogram_commit.py index e39985dc3..3795e8cbc 100755 --- a/src/scilpy/cli/scil_tractogram_commit.py +++ b/src/scilpy/cli/scil_tractogram_commit.py @@ -238,8 +238,9 @@ def _save_results(args, tmp_dir, ext, in_hdf5_file, offsets_list, sub_dir, # Loading the tractogram (we never did yet! Only sent the filename to # commit). Reminder. If input was a hdf5, we have changed - # args.in_tractogram to our tmp_tractogram saved in tmp_dir. - if ext == '.trk' and args.reference is None: + # args.in_tractogram to our tmp_tractogram saved in tmp_dir. However, + # ext is still .h5 so we need to set the reference accordingly. + if ext in ['.trk', '.h5'] and args.reference is None: args.reference = 'same' logging.debug('Loading tractogram from {} with reference {}.' .format(args.in_tractogram, args.reference))