scilus / scilpy

The Sherbrooke Connectivity Imaging Lab (SCIL) Python dMRI processing toolbox
Other
60 stars 60 forks source link

FIX: scorer crash if only NC and --unique #974

Closed AntoineTheb closed 5 months ago

AntoineTheb commented 5 months ago

Quick description

The scoring script (scil_tractogram_segment_and_score.py) crashes if it only has NCs due to a restriction of np.concatenate (can't concatenate nothing).

Type of change

Check the relevant options.

Provide data, screenshots, command line to test (if relevant)

To test:

Data: https://drive.google.com/file/d/1Y0faJeSrvujcwaOUUbMsKwo9-DWyWrtw/view?usp=sharing

Requires the FiberCup's scoring data to be in your working folder. Then: scil_tractogram_segment_and_score.py tractogram_Angular30FiberCup__2024-04-17-05_50_50_fibercup.trk scil_scoring_config.json crash -f -v --dilate 2 --compute_ic --unique

Checklist

codecov[bot] commented 5 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 68.15%. Comparing base (d6eddcf) to head (1996cc8).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #974 +/- ## ======================================= Coverage 68.15% 68.15% ======================================= Files 399 399 Lines 21365 21365 Branches 3229 3229 ======================================= Hits 14561 14561 Misses 5500 5500 Partials 1304 1304 ``` | [Components](https://app.codecov.io/gh/scilus/scilpy/pull/974/components?src=pr&el=components&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=scilus) | Coverage Δ | | |---|---|---| | [Scripts](https://app.codecov.io/gh/scilus/scilpy/pull/974/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=scilus) | `69.19% <ø> (ø)` | | | [Library](https://app.codecov.io/gh/scilus/scilpy/pull/974/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=scilus) | `66.56% <ø> (ø)` | |