Tract profiles#

A tract profile describes a bundle by the values of a map, such as FA or MD, at points along its length, so that subjects or groups can be compared point by point rather than by one mean over the whole bundle (Yeatman et al. 2012; Chandio et al. 2020). Start from one bundle, for example one isolated with lar tract-edit (see isolating a bundle), and maps on any grid:

lar tract-profile left_cst.tck fa.nii.gz md.nii.gz left_cst_profile.csv

The table has one row per profile point, from the start of the bundle to its end: the point’s index, the bundle’s core there (core_x, core_y, core_z, the mean position of the streamlines, in mm) and one column per map, named after its file (fa, md). In Python, tract_profile(bundle, {"fa": fa}) in larmor.tractography returns the same profile.

How it is computed#

  1. Orientation. All streamlines are made to run the same way. The bundle’s main axis is the direction that best fits the vectors from each streamline’s first point to its last; its sign is chosen so that its largest component (x, y or z) is positive. A streamline whose end-to-end vector points against the axis is reversed. The profile therefore starts at the bundle’s left, posterior or inferior end, whichever the main axis runs along: the brainstem end of a corticospinal tract, the left end of the corpus callosum. With --start x,y,z (mm), each streamline instead starts at its end nearer to that point. When the axis lies about halfway between two of x, y and z, a small change in the bundle can move the start to the other end; Larmor then warns. For group studies, pass --start (the same anatomical point in each subject), so that every profile starts at the same end.

  2. Resampling. Each streamline is resampled to --num-points points (100 by default) at equal arc lengths, so that point n of every streamline lies at the same fraction of its length.

  3. Sampling. Each map is sampled at those points with trilinear interpolation. Points outside the map are left out, so they do not pull the profile’s ends towards 0.

  4. Averaging. The profile at point n is the weighted mean of the streamlines’ values there. With --weighting gaussian (the default), the weight of a streamline is the probability that it belongs to the bundle at that point, under a 3D Gaussian fitted to the streamlines’ points: exp(-d^2 / 2), with d its Mahalanobis distance from their mean. Streamlines near the core count most, and stray ones little. With --weighting mean, all count the same. Non-finite values (NaN) are left out too; a point where no streamline has a value is NaN.

Colouring the bundle in the viewer#

--tsf-prefix out/left_cst also writes two kinds of TSF files with a value per point of the bundle: out/left_cst_segment.tsf, the index of the profile point each point belongs to (the nearest one along the streamline’s length), and out/left_cst_fa.tsf and so on, the profile value of that segment. Open the bundle and choose one of them as its TSF file:

lar bv -v fa.nii.gz -t left_cst.tck

References#

  • Yeatman JD, Dougherty RF, Myall NJ, Wandell BA, Feldman HM. Tract profiles of white matter properties: automating fiber-tract quantification. PLoS One 7 (2012) e49790.

  • Chandio BQ, Risacher SL, Pestilli F, et al. Bundle analytics, a computational framework for investigating the shapes and profiles of brain pathways across populations. Sci Rep 10 (2020) 17149.