Closed AntoineTheb closed 1 day ago
DISCUSSION: Should this just replace the "more than two blobs" behavior of the script ?
Attention: Patch coverage is 86.80556%
with 19 lines
in your changes missing coverage. Please review.
Project coverage is 68.39%. Comparing base (
54fa376
) to head (a9b75fa
).
DISCUSSION: Should this just replace the "more than two blobs" behavior of the script ?
Discussed offline: the new function will be the new behavior of the script when --mask
is selected. When --label
is selected, the script will function as usual.
To cut outside of ROIs, the behavior will stay the same. To cut between ROIs, --label
will need to be selected. The script will no longer compute labels as well, but I will also add scil_labels_from_mask
script.
I tested the --mask
option (I don't have data for the --label
but I assume it hasn't change), it does wonders! All three options are very useful. Nice addition to our toolkit.
Need to update the docstring and fix the tests for scil_labels_from_mask.py. Not sure I understand the issue with the tests of tractogram_cut_streamlines when used with a mask.
--min_length has a default that is too long for "toy" examples like in the tests. It's fine for the real world so I kept it as is, but specified a min_length of 0 in tests.
Can you open an issue to harmonize this script with your new function (mask_as_labels): https://github.com/scilus/scilpy/blob/9d9ea80353670343692205236368f8978be71a18/scripts/scil_lesions_info.py#L116C5-L116C45
@arnaudbore Did anyone test it yet ? If not, I will fetch and test
@arnaudbore Did anyone test it yet ? If not, I will fetch and test
I tested the --mask option. Works great.
@frheault Comments should be fixed @arnaudbore Unrelated tests now seem to be failing. I don't have this issue locally.
LGTM!
Quick description
Uniformize
scil_tractogram_cut_streamlines
so the behavior is consistent no matter the mask provided. If input with a label map, keep the same behavior as before.In other words, cut streamlines outside a mask or between ROIs. To cut streamlines between ROIs in a mask, use
scil_labels_from_mask
to generate a label map.Also added a "min-length" parameter.
Type of change
Check the relevant options.
Provide data, screenshots, command line to test (if relevant)
Before:![image](https://github.com/scilus/scilpy/assets/10272382/73d51a5b-2dd0-4dd4-a3d7-8cea91376f66)
After:![image](https://github.com/scilus/scilpy/assets/10272382/355abcb7-963d-4306-934c-136db801bd4d)
Checklist