AFQ.tractography

Module Contents

Functions

track(params_file, directions='det', max_angle=30.0, sphere=None, seed_mask=None, seed_threshold=0, n_seeds=1, random_seeds=False, rng_seed=None, stop_mask=None, stop_threshold=0, step_size=0.5, min_length=10, max_length=1000, odf_model='DTI', tracker='local')

Tractography

_tracking(tracker, seeds, dg, stopping_criterion, params_img, step_size=0.5, min_length=10, max_length=1000, random_seed=None)

Helper function

AFQ.tractography.track(params_file, directions='det', max_angle=30.0, sphere=None, seed_mask=None, seed_threshold=0, n_seeds=1, random_seeds=False, rng_seed=None, stop_mask=None, stop_threshold=0, step_size=0.5, min_length=10, max_length=1000, odf_model='DTI', tracker='local')[source]

Tractography

Parameters
params_filestr, nibabel img.

Full path to a nifti file containing CSD spherical harmonic coefficients, or nibabel img with model params.

directionsstr

How tracking directions are determined. One of: {“det” | “prob”}

max_anglefloat, optional.

The maximum turning angle in each step. Default: 30

sphereSphere object, optional.

The discretization of direction getting. default: dipy.data.default_sphere.

seed_maskarray, optional.

Float or binary mask describing the ROI within which we seed for tracking. Default to the entire volume (all ones).

seed_thresholdfloat, optional.

A value of the seed_mask below which tracking is terminated. Default to 0.

n_seedsint or 2D array, optional.

The seeding density: if this is an int, it is is how many seeds in each voxel on each dimension (for example, 2 => [2, 2, 2]). If this is a 2D array, these are the coordinates of the seeds. Unless random_seeds is set to True, in which case this is the total number of random seeds to generate within the mask.

random_seedsbool

Whether to generate a total of n_seeds random seeds in the mask. Default: False.

rng_seedint

random seed used to generate random seeds if random_seeds is set to True. Default: None

stop_maskarray or str, optional.

If array: A float or binary mask that determines a stopping criterion (e.g. FA). If tuple: it contains a sequence that is interpreted as: (pve_wm, pve_gm, pve_csf), each item of which is either a string (full path) or a nibabel img to be used in particle filtering tractography. A tuple is required if tracker is set to “pft”. Defaults to no stopping (all ones).

stop_thresholdfloat or tuple, optional.

If float, this a value of the stop_mask below which tracking is terminated (and stop_mask has to be an array). If str, “CMC” for Continuous Map Criterion [Girard2014].

“ACT” for Anatomically-constrained tractography [Smith2012].

A string is required if the tracker is set to “pft”. Defaults to 0 (this means that if no stop_mask is passed, we will stop only at the edge of the image).

step_sizefloat, optional.

The size (in mm) of a step of tractography. Default: 1.0

min_length: int, optional

The miminal length (mm) in a streamline. Default: 10

max_length: int, optional

The miminal length (mm) in a streamline. Default: 1000

odf_modelstr, optional

One of {“DTI”, “CSD”, “DKI”, “MSMT”}. Defaults to use “DTI”

trackerstr, optional

Which strategy to use in tracking. This can be the standard local tracking (“local”) or Particle Filtering Tracking ([Girard2014]). One of {“local”, “pft”}. Default: “local”

Returns
list of streamlines ()

References

Girard2014(1,2)

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

AFQ.tractography._tracking(tracker, seeds, dg, stopping_criterion, params_img, step_size=0.5, min_length=10, max_length=1000, random_seed=None)[source]

Helper function