-
Notifications
You must be signed in to change notification settings - Fork 66
ENH: remove sft._data
usage part 1 - tractogram coloring scripts + more
#1105
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
sft._data
usage part 1sft._data
usage part 1 - tractogram coloring scripts + more
Hello @AntoineTheb, Thank you for updating ! There are currently no PEP 8 issues detected in this Pull Request. Cheers! 🍻 Comment last updated at 2025-01-23 20:15:50 UTC |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1105 +/- ##
==========================================
- Coverage 58.90% 58.84% -0.07%
==========================================
Files 651 651
Lines 30705 30740 +35
Branches 3460 3461 +1
==========================================
Hits 18088 18088
- Misses 11168 11203 +35
Partials 1449 1449
🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good thanks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tested it with local coloring and I got the wrong results (also a problem with --from anatomy)
I also tried scil_bundle_label_map.py and it is now extremely slow (compared to master)
scil_bundle_diameter.py seems to work alright (right color, right speed)
I also found a bug in streamline_operations.py at line 286
new_data_per_point[key].append(
sft.data_per_point[key][ind][
best_pos[0]:best_pos[1]-1])
That -1 should not be there, can you test it with a independent dataset with invalid and use scil_tractogram_remove_invalid.py with the --cut option?
We already have tests for it: https://github.com/scilus/scilpy/blob/master/scilpy/tractograms/tests/test_streamline_operations.py, |
@frheault can you provide the test data you used ? |
On the data I sent Antoine, the --cut was not working because the DPP was one item short of the streamlines points data and the SFT was not liking it. (scil_tractogram_remove_invalid.py on IFOF big with the --cut option) |
@frheault the file IFOF_big in your data was actually making |
|
||
# Get segments in the streamline that are within the volume using | ||
# ndi.label | ||
blobs, _ = ndi.label(in_vol) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@frheault @arnaudbore I have greatly simplified and sped up the invalid-cutting process. Let me know how you feel about it.
Quick description
As per #891, although does not fix it completely. In doing so , I ended up reworking
scil_tractogram_assign_custom_color.py
Type of change
Check the relevant options.
Provide data, screenshots, command line to test (if relevant)
No
Checklist