Skip to content
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

Adding new filtering script by orientation #571

Merged
merged 6 commits into from
May 5, 2022

Conversation

EmmaRenauld
Copy link
Contributor

New script to filter a tractogram based on total changes in x, y or z directions. There is a note explaining that x, y, z mean the x,y,z coordinates of the sft streamlines, not necessarily aligned with the real x,y,z coordinates of the brain.

This will be useful to separate cingulum streamlines from the CC in our new tractometer based on ROI, using scil_score_tractogram (upcoming).

@pep8speaks
Copy link

pep8speaks commented Apr 5, 2022

Hello @EmmaRenauld, Thank you for updating !

There are currently no PEP 8 issues detected in this Pull Request. Cheers! 🍻

Comment last updated at 2022-05-05 20:18:25 UTC

@EmmaRenauld
Copy link
Contributor Author

@mdesco @AntoineTheb

@scil-admin scil-admin requested review from arnaudbore April 5, 2022 16:53
@scil-admin
Copy link

Build passed ! Good Job 🍻 !

2 similar comments
@scil-admin
Copy link

Build passed ! Good Job 🍻 !

@scil-admin
Copy link

Build passed ! Good Job 🍻 !

Copy link
Contributor

@AntoineTheb AntoineTheb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just finished looking at the code and running tests, LGTM ! Just one minor comment in the code. Do you have data to test it ? (with expected results). Thanks !

scilpy/tracking/tools.py Outdated Show resolved Hide resolved
@EmmaRenauld
Copy link
Contributor Author

You can check it with the CC (https://drive.google.com/file/d/1JxC8PfK9DfzPYiuODuzAtunVj1JpQwH-/view?usp=sharing):

scil_filter_streamlines_by_orientation.py CC_u_shaped.trk tmp.trk -v
scil_filter_streamlines_by_orientation.py CC_u_shaped.trk tmp2.trk -v --use_abs

The first version will show you that the minimum x distance is 0, because some streamlines have a very pronounced U shape, to the point of nearly coming back to their initial position. The second one will show you that the minimum x distance is 43 because those streamlines did actually do a loop, they did not simply go from point 0 to point 0 by not moving.

(In the ISMRM, first version will also show you that y distance is max 31.9mm, showing a good separation with, ex, the cingulum, which would have max distance of ~127).

@scil-admin
Copy link

Build passed ! Good Job 🍻 !

scilpy/tracking/tools.py Outdated Show resolved Hide resolved
@scil-admin
Copy link

Build passed ! Good Job 🍻 !

Copy link
Contributor

@mdesco mdesco left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor edits and then all good

scripts/scil_filter_streamlines_by_orientation.py Outdated Show resolved Hide resolved
@scil-admin
Copy link

Build passed ! Good Job 🍻 !

@arnaudbore arnaudbore merged commit 1ac189d into scilus:master May 5, 2022
@EmmaRenauld EmmaRenauld deleted the new_filtering branch May 6, 2022 12:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants