|
Man /
TrackContent-type: text/html trackSection: User Commands (1)Index Return to Main Contents NAMEtrack - Performs streamline tractography.SYNOPSIStrack [options]DESCRIPTIONDoes streamline tractography using either a determinstic or probabilistic methods. This program generates streamlines from a variety of possible input, including diffusion tensors, spherical PDFs, and raw DWI data. The data that is used to derive the tracking is referred to here as the input data, and it is passed by using the -inputfile and -inputmodel options (see OPTIONS). The general pipeline for tracking is as follows:
DEFINITION OF PHYSICAL SPACE AND IMAGE DIMENSIONSIf the input image has a definition of physical space (eg, it is a NIfTI image), then that will be used as the physical space for tractography. Usually, the seed file will be a NIFTI image in the same space as the input image. Sometimes the seed image will not have the same dimensions as the input data. The seed file must be aligned to the input space, but the images need not be of the same resolution. This allows you to upsample or downsample the seed image and thereby control the density of seed points. To avoid confusion when translating to and from physical space, we recommend using NIfTI format for all images. Images other than the seed file, eg brain masks and anisotropy images, must be in the same voxel and physical space as the input data.
SEEDING TRACTOGRAPHYThe seed file is usually a NIfTI image, passed with -seedfile. The image need not be of the same resolution as the diffusion data, but their physical coordinates must be aligned. This flexibility allows tracking to be seeded at a higher or lower density than the input data. For example, we might have diffusion tensors at 2mm resolution, but decide to seed at 1mm intervals over some ROI. The seed file contains the regions of interest for tracking, and should be zero for background with positive integer labels for the ROIs. Streamlines are seeded at the centre of all voxels with an intensity greater than zero. Voxels that share the same intensity are considered part of the same ROI, they do not have to be contiguous. Alternatively, a list of points may be passed with the -seedlist option. These should be points in physical space of the input data, written in the format
They are all considered to be part of a single ROI. The seeds should be in the physical space of the input data.
OUTPUTThe output is streamlines in the physical space of the input data. If -outputroot is specified, streamline output is contained in a single file for each ROI. Otherwise output goes to stdout by default but can be sent to a file with the -outputfile option. The seed points in a seed image are processed in the following order
If a list of points are supplied with the -seedlist option, they are processed in the order that they are written. The raw streamline format is 32 bit float. For each streamline, the program outputs the number of points N in the streamline, the index of the seed point, followed by the (x,y,z) coordinates (in mm) of each point: [<N>, <seed point index>, <x_1>, <y_1>, <z_1>,...,<x_numPoints>, <y_N>, <z_N>, <N>,...,<z_N>], where the <seed point index> is the point on the streamline where tracking began. The program procstreamlines contains tools for post-processing of streamlines. The vtkstreamlines program converts Camino streamlines to VTK polylines.
TRACKING IN DIFFUSION TENSOR DATA
The steps are:
BAYESIAN PROBABILISTIC TRACKINGThe main probabilistic algorithm for DWI data is an implementation of the Bayesian method presented by Friman et al [IEEE-TMI 25:965-978, 2006]. The theory is decribed briefly below. Run track with input model bayesdirac or bayesdirac_dt. In each voxel, we compute the likelihood of the fibre orientation being the axis X, given the data and the model of the data. We wish to sample from
in each voxel. We first fit a model to the data, which can either be a ball-and-stick partial volume model, or a simplified diffusion tensor model (the tensor is required to have eigenvalues L1 >= L2 == L3). This yields m_i, the predicted measurement i given a principal direction X. The observed data y_i is a noisy estimate of m_i. The noise is modelled on the log data as
where epsilon is Gaussian distributed as N(0, sigma^2 / m_i^2), where sigma^2 is the variance of the noise in the complex MR data. Therefore,
where there are N measurements. The prior distribution for all parameters except X is a dirac delta function, so P(data) is the integral of P(data | X) over the sphere. In the case of the diffusion tensor, for example, the priors of S(0) and the tensor eigenvalues L1, and L2 = L3 are fixed around the maximum-likelihood estimate (MLE). The function P(data | X) is then evaluated by setting the tensor principal direction to X and computing the likelihood of the observed data. The prior on X, P(X), may be set to favor low tract curvature. With the -curvepriork option, the user may set a Watson concentration parameter k. Given a previous tract orientation T, P(X) = W(X, T, k), where k >= 0. The default is k = 0, which is a uniform distribution . Higher values of k increase the sharpness of P(X) around its peak axis T. Suggested values of k are in the range of 0 to 5. You may also use -curvepriorg to implement Friman's curvature prior. Note that a curvature prior does not directly impose a curvature threshold, which may be imposed separately. An external prior may also be added, in the form of a PICo PDF O(X) defined for each voxel in the image. The full prior is then W(X, T, k)O(X). Pass a PICo image with - extpriorfile. See picopdfs(1) for a definition of the file format. The Bayesian tracking algorithm uses a fixed set of vectors from which we choose the tracking direction, X. By default, the basis is a set of 1922 vectors evenly distributed on the unit hemisphere. Speed can be increased by passing the option "-pointset 0" in order to use a reduced point set of 1082 directions.
WILD BOOTSTRAP TRACKING
Wild bootstrapping requires a single DWI data set. A diffusion tensor model is fit to the raw data, and the residuals are resampled randomly. See Whitcher et al, [Human Brain Mapping 29(3):346-62, 2008] for more information.
PROBABILISTIC TRACKING WITH PARAMETRIC MODELS (PICO)PICo refers to a family of models where we fit a parametric model of the uncertainty in each voxel. These models can be derived from the a variety of sources including the diffusion tensor (as in Parker and Alexander [IPMI 2003 p 684-695]) and PAS-MRI, (see Parker and Alexander, [Trans Royal Society B. 360:893-902, 2005]). For diffusion tensor data, Bayesian or wild bootstrap methods are preferable because they make use of all the DWI data, whereas PICo only uses the tensor eigenvalues to estimate uncertainty. The pipeline for PAS-MRI is:
REPETITION BOOTSTRAP TRACKINGRepetition bootstrap tracking requires multiple repeats of raw DWI data and a reconstruction algorithm. The principal direction or directions in each voxel are determined independently for each bootstrap sample of the data. Currently, diffusion tensor is the only model supported. Please see datasynth(1) for more information on the bootstrap technique. One and two-tensor models may be fitted to the bootstrap data. The reconstruction parameters [see modelfit(1) should be passed to track along with the other parameters. For example, given 4 repeats of a scan SubjectA_[1,2,3,4].Bfloat, (in voxel order), we can track using repetition bootstrapping and DTI:
To use a two-tensor model, we must pass the voxel classification from voxelclassify.
The voxel classifications are fixed; they are not re-determined dynamically. Note that you may pass either -voxclassmap or -bgmask, but not both. If you are using a voxel classification map, the brain / background mask should be passed to fBvoxelclassify. You may always restrict tracking to any volume of the brain by using the -anisfile and -anisthresh options.
TRACKING WITH BEDPOSTX OUTPUTData from FSL's bedpostx can be imported into track for either probabilistic or deterministic tracking. Use the -bedpostxdir option to set the input directory containing the output of bedpostx. For deterministic tracking, use "-inputmodel bedpostx_dyad". This will use the vector images dyads1.nii.gz, ... , dyadsN.nii.gz, where there are a maximum of N compartments in each voxel. For probabilistic tracking, use "-inputmodel bedpostx". This will use the files merged_th1samples.nii.gz, merged_ph1samples.nii.gz, ... , merged_thNsamples.nii.gz, merged_phNsamples.nii.gz. These images contain M samples of theta and phi, the polar coordinates describing the "stick" for each compartment. At each iteration, a random number X between 1 and M is drawn and the Xth samples of theta and phi become the principal directions in the voxel. Both deterministic and probabilistic tracking make use of the images mean_f1samples.nii.gz, N, normalized such that the sum of all compartments is 1. Compartments where the mean_f is less than a threshold are discarded and not used for tracking. The default value is 0.01. This can be changed with the -bedpostxminf option.
LIST OF INPUT MODELSThis section deals with the various types input to track, which are specified with the -inputmodel option. The input model controls the format of the input data, and what kind of image will be constructed from it. The default data type is "float" for input models that require DWI data, "double" for everything else.
The available input models are:
This inputmodel is for probabilistic tracking using the Bayesian method. The input file in both cases is raw DWI data. They differ in the type of model they use for the likelihood function. See BAYESIAN PROBABILISTIC TRACKING.
When bedpostx data is used, specify the directory containing the data with -bedpostxdir. The number of PDs per voxel is determined automatically from the files in this directory.
The -anisthresh option may be specified without supplying a separate anisotropy map; the fractional anisotropy of the DT is used.
This can be used to track directly in DWI data without fitting the DT first. It's less efficient than using a precomputed DT, because the DT has to be reconstructed for each tracking process. However, it does allow for interpolation of the DWI data (see INTERPOLATION below) before the DT is reconstructed.
The maximum number of tensors in each voxel is specified by the -maxcomponents option. The number of tensors in individual voxels is encoded in the data, so no voxel classification map is required. As with single DT data, a fractional anisotropy mask can be derived from the data.
The maximum number of PDs in each voxel is specified by the -numpds option. The number of PDs in individual voxels is encoded in the data.
The maximum number of PDs in each voxel is specified by the -numpds option. The number of PDs in individual voxels is encoded in the data.
Repetition bootstrap data is passed to the program with -bsdatafiles.
Wild bootstrap data is passed on standard input or with -inputfile.
TRACKING ALGORITHMSThe tracking algorithm controls how we generate streamlines from the data, and is set with the -tracker option. The choices are
Similar to the FACT algorithm proposed by Mori et al [Annals Neurology 45:265-269, 1999], this method follows the local fibre orientation in each voxel. No interpolation is used.
Tracking proceeds using a fixed step size along the local fibre orientation. With nearest-neighbour interpolation, this method may be very similar to FACT, except that the step size is fixed, whereas FACT steps extend to the boundary of the next voxel (distance variable depending on the entry and exit points to the voxel).
Fourth-order Runge-Kutta method. The step size is fixed, however the eventual direction of the step is determined by taking and averaging a series of partial steps. For more explanation of the tracking algorithms, see Basser et al [Magnetic Resonance in Medicine 44:625–632, 2000].
The tensor deflection (tend) algorithm may be used for deterministic tracking in tensor images (Lazar et al, Human Brain Mapping 18:306-321, 2003). This algorithm is similar to FACT except that the tracking direction in each voxel is deflected by the local diffusion tensor.
INTERPOLATION ALGORITHMSThe interpolation algorithm determines how we define the fiber orientation(s) at a given continuous point within the input image. Interpolators are specified with -interpolator and are only used when the tracking algorithm is not FACT. The choices are
Nearest-neighbour interpolation, just uses the local voxel data directly.
Probabilistic nearest-neighbor interpolation, similar to the method proposed by Behrens et al [Magnetic Resonance in Medicine, 50:1077-1088, 2003]. The data is not interpolated, but at each point we randomly choose one of the 8 voxels surrounding a point. The probability of choosing a particular voxel is based on how close the point is to the centre of that voxel.
Linear interpolation of the vector field containing the principal directions at each point.
Uses TEND, similar to the method proposed by Lazar et al [Human Brain Mapping 18:306-321, 2003]. The tracking step is a combination of the local tensor orientation, the previous direction, and the previous direction deflected by the local tensor (the TEND term). Works on tensor data only. The user can control how the weighted average of the local tensor principal eigenvector e_1, the previous direction v_{in}, and the tend term D * v_{in} are constructed. Two parameters f and g control the weighting, e_1 is weighted by f, v_{in } is weighted by (1-f)(1-g) and tend is weighted by (1-f)g. By default, f = 0 and g = 1, so the resultant direction is D * v_{in}.
Like TEND, except the diffusion tensor is selected randomly from the neighbouring voxels, as the prob_nn option does for vectors. Works on tensor data only.
Interpolate the DWI data directly. Works on DWI data only.
RESTRICTING AND STOPPING TRACKINGMask images can be used to restrict tracking to particular areas. Tracts that extend outside the masked region are terminated. Set the mask with the -anisfile and -anisthresh options. Often the mask of choice is based on thresholding the anisotropy of the diffusion tensor data (hence the names) but you may use any image that is in the same space as the diffusion image. For example, a binary mask may be used with a threshold of 1.0. Tracking may also be terminated when the local streamline curvature exceeds some threshold. Two options control this behaviour: -curvethresh specifies the maximum curvature (in degrees) over a length (in mm) defined by -curveinterval. So "-curvethresh 45 -curveinterval 5" will check at 5mm intervals and terminate tracking if the curvature exceeds 45 degrees. Tracking stops when the lines reach a maximum length; by default this is 1000mm. Tracts may also be modified or discarded in post-processing, see procstreamlines(1).
PARALLEL TRACKING
The -regionindex option allows ROIs to be processed indepedently. Therefore, if
The output files can be concatenated in order for post-processing with procstreamlines.
EXAMPLESDo FACT tracking within a region of interest defined in an image subAROI.nii.gz. The ROI is defined by a collection of voxels with the intensity value 1.
This outputs A_oneDT_1.Bfloat, containing all streamlines from the ROI. If there were a total of R separate ROIs in the seed file, there would be another output file for each ROI. Do the same thing, but with Euler tracking
Use Bayesian tracking on some DWI data
OPTIONS
DATA OPTIONS
TRACKING OPTIONS
SEEDS
PICO OPTIONS
BAYES-DIRAC OPTIONS
BOOTSTRAP OPTIONS
BEDPOSTX OPTIONS
OUTPUT OPTIONS
PARALLEL TRACKING
AUTHORSPhilip Cook <camino@cs.ucl.ac.uk>SEE ALSOmodelfit(1), dtlutgen(1), picopdfs(1), countseeds(1), procstreamlines(1)
BUGS
SEEDING IN MULTI-FIBRE VOXELS USING DWI DATA Affects input model repbs_multitensor only When multi-fibre models are fit to DWI data, the order in which the fibre orientations are returned to the tracking process is undefined, so it's possible that when another bootstrap sample is drawn to track along the second PD, the order of the compartments will be reversed.
Index
This document was created by man2html, using the manual pages. Time: 02:07:11 GMT, December 04, 2017 |