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

WIP - NF - Tracking with Initial Directions and other tracking parameters #1627

Closed
wants to merge 19 commits into from

Conversation

gabknight
Copy link
Contributor

@gabknight gabknight commented Aug 27, 2018

WIP - it needs a first review by @StongeEtienne and @jchoude. Does this will do for SET?

The aim of this PR is to add three new optional parameters to LocalTracking:

  • initial_directions : specify the initial direction for tractography to follow at the initial seed position. If initial_directions is None (default), LocalTracking calls DirectionGetter.initial_direction(seed_position) to get the initial directions (current behavior). This functions return the list of peak at the seed position. In a similar fashion, initial_directions contains a list of directions for every seed positions.
    • The tracking works with directions that correspond to vertices on the sphere. Thus, I had to select the vertice the closest to the input direction instead of the actual input direction. i.e. the closest sphere vertice is used as initial direction instead of the given initial directions.
  • unidirectional: perform the tractography in a single direction from the seeding position, instead of both (default). This is especially useful in conjunction with initial_direction, where, for instance, those initial directions could be pointing inward from the cortical surface or outward from subcortical regions.
  • randomized_forward_direction: Useful in conjunction with unidirectional, this parameter allows the tracking to start randomly either in the initial direction or in its opposite direction. If undirectional is False, this parameter will only reverse the points order of some streamlines.

@pep8speaks
Copy link

pep8speaks commented Aug 28, 2018

Hello @gabknight, Thank you for updating !

Cheers ! There are no PEP8 issues in this Pull Request. 🍻

Comment last updated on January 17, 2019 at 13:39 Hours UTC

@codecov-io
Copy link

codecov-io commented Aug 28, 2018

Codecov Report

Merging #1627 into master will increase coverage by 3.29%.
The diff coverage is 98.69%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1627      +/-   ##
==========================================
+ Coverage   87.32%   90.62%   +3.29%     
==========================================
  Files         245      234      -11     
  Lines       32148    28441    -3707     
  Branches     3493     3018     -475     
==========================================
- Hits        28073    25774    -2299     
+ Misses       3242     2049    -1193     
+ Partials      833      618     -215
Impacted Files Coverage Δ
dipy/tracking/local/localtracking.py 98.27% <100%> (+0.52%) ⬆️
dipy/tracking/local/tests/test_tracking.py 97.07% <98.26%> (+1.48%) ⬆️
dipy/testing/decorators.py 64.51% <0%> (-29.04%) ⬇️
dipy/workflows/segment.py 72.44% <0%> (-23.21%) ⬇️
dipy/workflows/tests/workflow_tests_utils.py 83.33% <0%> (-16.67%) ⬇️
dipy/data/fetcher.py 33.24% <0%> (-12.11%) ⬇️
dipy/testing/__init__.py 72.72% <0%> (-9.1%) ⬇️
dipy/data/__init__.py 83.33% <0%> (-8.83%) ⬇️
dipy/utils/optpkg.py 64.28% <0%> (-7.15%) ⬇️
dipy/io/vtk.py 14.58% <0%> (-6.58%) ⬇️
... and 78 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a32e164...b48139b. Read the comment docs.

@StongeEtienne StongeEtienne mentioned this pull request Sep 7, 2018
@gabknight gabknight changed the title WIP - NF - Tracking with Initial Directions NF - Tracking with Initial Directions and other tracking parameters Sep 7, 2018
@gabknight gabknight changed the title NF - Tracking with Initial Directions and other tracking parameters WIP - NF - Tracking with Initial Directions and other tracking parameters Sep 11, 2018
@gabknight
Copy link
Contributor Author

@StongeEtienne, do you think those tracking parameters will do for your future mesh seeding integration?

@StongeEtienne
Copy link
Contributor

@gabknight I will soon test them, and see if there is things to be changed/improved,
I might work on surfaces integration in Dipy, at Dipy workshop https://workshop.dipy.org/

@guaje
Copy link
Contributor

guaje commented Feb 14, 2019

@gabknight I was checking your code and I realized you are importing HemiSphere but you are not using it. Can you please check that?

@skoudoro skoudoro added this to the 1.0 milestone Apr 23, 2019
@skoudoro
Copy link
Member

What is the status of this PR @gabknight @StongeEtienne?

@gabknight
Copy link
Contributor Author

This needs a bit of work and not required for the next release. let keep this for Dipy 1.1

@skoudoro
Copy link
Member

Ok Sounds like plan. Thank you for the feedback.

@skoudoro skoudoro modified the milestones: 1.1, 1.2 Sep 24, 2019
@skoudoro skoudoro modified the milestones: 1.2, 1.3 Sep 2, 2020
@skoudoro skoudoro removed this from the 1.3 milestone Oct 21, 2020
@gabknight
Copy link
Contributor Author

Closed in favor of PRs #2821 and #2825.

@gabknight gabknight closed this Jun 14, 2023
@gabknight gabknight deleted the NF_tracking_inital_direction branch April 4, 2024 20:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants