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 - Particle Filtering Tractography #1340

wants to merge 201 commits into
base: master


None yet

gabknight commented Sep 22, 2017

This PR add a new tissue classifier (CMC) and a new tractography algorithm (PFT). Both methods are described in [Girard et al., NImg, 2014].

  • CMC - new tissue Classifier. CmcTissueClassifier used probabilisties and the tissue partial volume fraction maps to determine when the tracking stops. As it is very similar to ActTissueClassifier, both classes now extend an a new abstract class ConstrainedTissueClassifier.

  • PFT - new tractography method. ParticleFilteringTracking is inherited from the LocalTracking class. The particle filter is used to find a valid streamline path when the streamline being traced reach the state INVALIDPOINT.

    • An example is giving in doc/examples/

@nilgoyette found potential optimisation for the cumsum(...) function, called several times in dipy.tracking.local.localtrack._pft(...) and dipy.direction.probabilistic_direction_getter.ProbabilisticDirectionGetter.get_direction(...). A PR should follow :).

@MrBago I would be very glad to get your feedback on the way I actually structured the implementation of PFT in dipy. PFT is the first tracking algorithm in dipy that is not a different direction getter as such. PFT uses a probabilistic direction getter, and needs to know the tracking state from the tissueClassifier at every steps and use it change the reconstruction of the streamline. I thus choose to extend the LocalTracking class with the ParticleFilteringTracking class and added the _tracker(...) function to the LocalTracking class. ParticleFilteringTracking returns the pft_tracker cython function, LocalTracking returns the local_tracker cyhton function. Both use the same _generate_streamlines(...) function from LocalTracking.

@Garyfallidis, @arokem, @skoudoro, @jchoude, I would be very much interested to hear your thoughts on this implementation. On the CC exemple, PFT is ~4.5x slower than ProbabilisticDirectionGetter LocalTracking, but outputs 3x more streamlines connecting the GM (i.e. not stopping in the WM or CSF). PFT has a seed to streamlines ratio of ~93% while the same algorithm With localTracking has a ratio of ~29% (for CC seeding of the example).


Girard, G., Whittingstall, K., Deriche, R., & Descoteaux, M. Towards quantitative connectivity analysis: reducing tractography biases. NeuroImage, 98, 266-278, 2014.

ranveeraggarwal and others added some commits Jun 17, 2017

Merge pull request #13 from MarcCote/ui_fix_events
BF: dragging events and filename coloration in file dialog.
Merge pull request #1368 from jhlegarreta/UpdateDevelopersListAffilia…

DOC: Update developers' affiliations.

@skoudoro skoudoro added this to Needs a review in Dipy 0.14.0 Nov 8, 2017

Garyfallidis and others added some commits Nov 9, 2017

Merge pull request #1374 from skoudoro/fix-viz-1282
FIX: Viz test correction
Merge pull request #1377 from skoudoro/fix-print-legacy
FIX: update printing format for numpy 1.14

skoudoro and others added some commits Nov 21, 2017

Merge pull request #1378 from skoudoro/fix-numpy-legacy-again
Fix: numpy legacy print again...
Merge pull request #1342 from nilgoyette/cythonize_dg
Cythonize DirectionGetter and whatnot
Merge pull request #1381 from gabknight/DOC_plotting_reorientation
DOC - re-orientation of figures in the DKI example

This comment has been minimized.


skoudoro commented Nov 22, 2017

Since #1342 is merged, can you rebase this one @gabknight? Thanks !


This comment has been minimized.


nilgoyette commented Nov 22, 2017

@gabknight I don't remember what we said... you rebase and I open another PR for some enhancements, or I rebase and enhance in this PR?


This comment has been minimized.


gabknight commented Nov 22, 2017

@nilgoyette @skoudoro I will rebase this.

@nilgoyette I will also update the particle filtering part following #1342. It would be ideal if you can then have a look to the whole PR for further optimisation.

@gabknight gabknight closed this Nov 28, 2017

@gabknight gabknight deleted the gabknight:NF_cmc_pft branch Nov 28, 2017

@gabknight gabknight restored the gabknight:NF_cmc_pft branch Nov 28, 2017


This comment has been minimized.


gabknight commented Nov 28, 2017

I screw thing up here.... I open a new PR #1384 with the good commits

@gabknight gabknight removed this from Needs a review in Dipy 0.14.0 Nov 29, 2017

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