From 0c381e9a587182d12f745416a861bc224a6034cc Mon Sep 17 00:00:00 2001 From: arnaudbore Date: Wed, 5 Nov 2025 10:27:48 -0500 Subject: [PATCH 1/2] fix issues from Aurelie tests --- src/scilpy/cli/scil_bundle_label_map.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/scilpy/cli/scil_bundle_label_map.py b/src/scilpy/cli/scil_bundle_label_map.py index 496f2c74d..1655cb54f 100755 --- a/src/scilpy/cli/scil_bundle_label_map.py +++ b/src/scilpy/cli/scil_bundle_label_map.py @@ -272,7 +272,8 @@ def main(): concat_sft.to_corner() for i in range(len(sft_list)): sft_list[i] = cut_streamlines_with_mask(sft_list[i], - binary_mask) + binary_mask, + cutting_style=CuttingStyle.KEEP_LONGEST) sft_list[i] = filter_streamlines_by_nb_points(sft_list[i], min_nb_points=4) From 7dbad23ad483950bb4d8ca6e26ad29f1ffb51e16 Mon Sep 17 00:00:00 2001 From: arnaudbore Date: Wed, 5 Nov 2025 13:10:12 -0500 Subject: [PATCH 2/2] switch to to_center --- src/scilpy/tractograms/streamline_and_mask_operations.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/scilpy/tractograms/streamline_and_mask_operations.py b/src/scilpy/tractograms/streamline_and_mask_operations.py index faa0fcce5..80a75b94a 100644 --- a/src/scilpy/tractograms/streamline_and_mask_operations.py +++ b/src/scilpy/tractograms/streamline_and_mask_operations.py @@ -324,7 +324,7 @@ def cut_streamlines_with_mask(sft, mask, orig_space = sft.space orig_origin = sft.origin sft.to_vox() - sft.to_corner() + sft.to_center() # Get the indices of the voxels # intersected by the streamlines and the mapping from points to indices