Repository navigation
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1373 +/- ##
==========================================
+ Coverage 72.57% 72.85% +0.27%
==========================================
Files 301 301
Lines 26279 26281 +2
Branches 3702 3702
==========================================
+ Hits 19073 19148 +75
+ Misses 5655 5572 -83
- Partials 1551 1561 +10
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
This was referenced Nov 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Quick description
Fixes #1371. In
BundleSeg.recognize(),_reduce_search_spaceuses the model centroids, whileprune_far_from_modeluses the full model streamlines._register_model_to_neighbtransformed the streamlines but not the centroids, so the second_reduce_search_space(14 mm) selected candidates around the model before the local SLR, while the pruning compared them to the model after the SLR.Type of change
bundleseg.py: also apply the SLR transform tomodel_centroids, so the 14 mm search and the pruning use the same (registered) model.test_bundleseg.py(was an empty stub): synthetic bundles, with the model shifted by 15 mm (between the 14 and 16 mm thresholds). Fails before the fix (0/50 streamlines recognized), passes after. Plus a basic recognition test with a 5 mm shift.Check the relevant options.
Validation
test_tractogram_segment_with_bundleseg.pypasses. On the fibercup test data, the outputs are identical before and after the fix.Selected bundles (the most changed, two that barely change, the largest loss and the largest gain):
As there is no ground truth, these numbers show how much the output changes, not which one is better. Gains and losses both come from the 14 mm search keeping or dropping whole tractogram clusters based on their centroid. The candidate search and the pruning now use the same (registered) model.
Full table (51 bundles)
Checklist