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

NF - Add PMF Threshold to Tractography #1041

Merged
merged 7 commits into from May 15, 2016

Conversation

Projects
None yet
2 participants
@gabknight
Contributor

gabknight commented May 3, 2016

This PR adds pmf_threshold parameter to ProbabilisticDirectionGetter, which set to 0 all directions with probability mass function value < pmf_threshold.. It is common to remove low CSD-ODF value (e.g. mrtrix) from the probability mass function used in probabilistic tractography. Increasing pmf_threshold tends to reduce erroneous streamlines by following 'less noisy' directions of the CSD-ODF.

I set the default to 0.1 as suggested by [Tournier et al. 2012, Girard et al. 2014]. However, this will change probabilistic streamline output of current scripts.

@gabknight gabknight changed the title from NF - add PMF Threshold for tractography to NF - Add PMF Threshold to Tractography May 3, 2016

directions.
max_angle : float, [0, 90]
The maximum allowed angle between incoming direction and new
direction.
mpmf_threshold : float, [0, 1.]
The maximum allowed angle between incoming direction and new

This comment has been minimized.

@arokem

arokem May 4, 2016

Member

This is not the documentation for this parameter, is it?

This comment has been minimized.

@arokem

arokem May 4, 2016

Member

Also, I think this shouldn't be here at all. There's no such parameter that I can see.

streamlines = LocalTracking(dg, tc, seeds, np.eye(4), 1.)
for sl in streamlines:
npt.assert_(np.allclose(sl, expected[1]))
# The first path is not possible if pmf_threshold>0.4 degree turns are excluded

This comment has been minimized.

@arokem

arokem May 4, 2016

Member

I think this comment has a few too many words :-)

streamlines = LocalTracking(dg, tc, seeds, np.eye(4), 1.)
for sl in streamlines:
npt.assert_(np.allclose(sl, expected[1]))
# Both path are not possible if 90 degree turns are exclude and
# if pmf_threhold is superior to 0.4. Streamlines should stop at

This comment has been minimized.

@arokem

arokem May 4, 2016

Member

Small nit: "superior to" is perhaps not the right word. How about "larger than"?

@arokem

This comment has been minimized.

Member

arokem commented May 4, 2016

This looks great to me. What are your thoughts on absorbing the inevitable changes to previous behavior? I think it'll probably be alright (that's what happens when you upgrade software...), but if someone has any ideas on how to not surprise users with this, that would be good.

Either way, a note in the API changes doc needs to be made.

@gabknight

This comment has been minimized.

Contributor

gabknight commented May 4, 2016

Thanks for your comments.

With pmf_threshold = 0.1, changes in the reconstruction are small, but I would prefer having it at 0.1 by default that 0.0. My only concern is reproducibility of previous results, with previous code.

How should this note be made? In the documentation of the class ProbabilisticDirectionGetter?

@gabknight gabknight force-pushed the gabknight:NF_add_ODF_thresholding_for_tractography branch from ec96690 to e3ce0aa May 4, 2016

@arokem

This comment has been minimized.

Member

arokem commented May 4, 2016

@gabknight gabknight force-pushed the gabknight:NF_add_ODF_thresholding_for_tractography branch from 05cc282 to 9d82170 May 4, 2016

@gabknight

This comment has been minimized.

Contributor

gabknight commented May 5, 2016

done, thx @arokem

@arokem

This comment has been minimized.

Member

arokem commented May 9, 2016

Anyone have any more comments here, or anxious to give this a look? If not, I will merge it by the end of the week.

@arokem arokem merged commit 888f853 into nipy:master May 15, 2016

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@gabknight gabknight deleted the gabknight:NF_add_ODF_thresholding_for_tractography branch Aug 29, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment