Closed levje closed 2 weeks ago
Hello @levje, Thank you for updating !
There are currently no PEP 8 issues detected in this Pull Request. Cheers! :beers:
Attention: Patch coverage is 40.00000%
with 12 lines
in your changes missing coverage. Please review.
Project coverage is 68.27%. Comparing base (
99ad51e
) to head (f67cf16
).
Quick description
When using the _extract_vb_and_wpc_all_bundles function from the file
tractogram_from_roi.py
, there's a loop that updates and uses the remaining_ids list. While iterating over the bundles, it is possible that the list of remaining indices becomes empty thus creating an empty StatefulTractogram. This was causing some issues with the sub-functionfilter_grid_roi_both
which internally was trying to transpose an empty matrix, which is invalid.I added a quick check and some simple tests to make sure the sft provided as an input is not empty before filtering the streamlines w.r.t. the ROI.
Type of change
Check the relevant options.
Provide data, screenshots, command line to test (if relevant)
pytest scilpy/segment/tests/test_tractogram_from_roi.py
Checklist