Tract Specific Analysis Using an existing template
Software
Before starting this analysis, make sure you have these two softwares available.
- DTI-TK
- cmrep, which is needed for the statistical analysis
- Paraview, a visualization tool
Background
Here is the abstract from the very good paper published by Zhang et al. in the Proceedings of the 4th International Conference on Biomedical Image registration in 2010 (see the paper here)
Voxel-based analysis, either whole-brain or tract-specific, is a widely used approach for localizing white matter (WM) differences across populations using diffusion tensor imaging (DTI). A prerequisite to this approach is to spatially normalize all the subjects to a common template. The accuracy of spatial normalization can be improved by using a population-specific template that is, morphologically, most similar to the subjects in the population of interest. Here, we report the development of a population specific DTI template for the elderly using the publicly available IXI brain database [...]. The present template captures the average shape and diffusion properties of a population and contains segmentations of major WM fasciculi parcellated via fiber tractography. Furthermore, the segmentations are modeled using surface-based representation to support the tract-specific analysis recently proposed by Yushkevich et al. The template can be used to examine WM changes in neurodegenerative diseases and conditions.
This abstract explains the core of the method and reflects upon another paper, by Yushkevich et al. which was published two years earlier (see here). In this paper, the author built a children template. From the two papers, you can easily guess the pipeline of the TSA technique.
Here is in a simplified version:
1. Obtain an existing DTI template by visiting DTI-TK NITRC Page. Each template consists of a diffusion tensor atlas as well as medial representations of 11 tracts: the corpus callosum (CC), the corticospinal tracts (CST), inferior fronto-occipital tracts (IFO), inferior longitudinal tracts (ILF), superior longitudinal tracts (SLF), and uncinates (UNC).
Two templates have been built from the IXI dataset that is freely available:
- an adult template, built with 78 subjects, 40 males/38 females (mean age: 39.5 ± 12), not yet published (WARNING: We have identified production issues with the TSA models in this template. For TSA analysis, use only the following aging template for the time being.)
- an aging template, generated from 51 subjects, 21 males/30 females (mean age: 70.1 ± 4), see Zhang et al., 2010, here
2. Register all the population diffusion tensor images to this template (rigid, affine and nonlinear registration)
3. Sample the Fractional Anisotropy (or Apparent Diffusion Coefficient values) over all the registered subjects, compute the mean of this value at each point and project this value on the medial representation
4. Perform a permutation-based non-parametric suprathreshold cluster analysis, to determine the WM clusters that are significantly different between your two populations.
Prior requirement: Checking your DTIs
Before any statistical analysis, or registration, you must have built your Diffusion Tensor images. For them to work seamlessly with DTI-TK, there are a few things you might want to check.
- How were my images reconstructed? Here are a few tools that exist amongst others, which allow you to build your DTI from your DWI.
- Then you want to make sure that the diffusivity units of the DT images are compatible with DTI-TK. Check this page to make sure
- Last but not least, it is always a good idea (well, it's in fact highly recommended!) to visualize your images to make sure there is no outlier, which could critically influence your final analysis in a negative way. You will find a few very useful commands in this toolkit that will enable you to check these images.
Obtaining the atlas
Here are the DTI and TSA representation of the atlas.
Left: Principal diffusion direction map of the DTI template visualized with itk-snap. Blue represents the fibers that are going from inferior to superior regions, green posterior anterior and red from left to right. Right: Medial representation of the 11 tracts: the cc (red), the CSTs (blue), the IFOs (yellow), the ILFs (green) the SLFs (purple) and UNCs (light blue, visualized with http://www.paraview.org/paraview).
Registration
This is the point, where we are going to use DTI-TK to register all the images to the common template. For this, you can refer to this tutorial, which walks you through the successive types registration: rigid, affine and nonlinear. It also gives you three distinct commands depending on if you want to build a template while registering your data. In our case, we already have the template, so the relevant commands to use are
1. rigid registration:
dti_rigid_sn template.nii.gz subjs.txt EDS
subjs.txt is a text file containing the names of all the image files (see
here).
Output: For each subject, subject_name.aff, a text file that contains an initialization matrix for the next step.
2. affine registration:
dti_affine_sn template.nii.gz subjs.txt EDS 1
Output: subject_name_aff.nii.gz
3. nonlinear registration:
dti_diffeomorphic_sn template.nii.gz subjs_aff.txt mask.nii.gz 6 0.002
subjs_aff.txt consists of a list of all the affinely registered subjects' names.
Output: subject_name_aff_diffeo.nii.gz
4. create final normalized volumes for analysis
dti_warp_to_template_group subjs.txt template.nii.gz 2 2 2
This step combines the affine and nonlinear transformations into a single transformation to warp the original data into the template space. It allows you to specify the voxel spacing of the normalized data. The example given sets them to 2x2x2 mm^3.
After going through this section, all your subjects will be in a common space. Here again, there's no harm in checking the registered images to make sure everything is ok!
Sampling values over all the subjects
The script tsa_sampling, located in the dtitk/scripts directory of the DTI-TK package samples white matter and tract-specific attributes across the whole population. These white matter attributes are values, such as FA, RD, AD, ADC.... For each one of these values, the mean or the max are computed locally and projected onto the medial model of the tracts. A medial model or mesh is a sheet-like structure that represents a 3D tract (there are 11 of them in our atlases). More precisely, for each subject, these values are sampled along the spokes corresponding to each vertex of the mesh and projected on the mesh.
You can run it as follows:
tsa_sampling dti_volume_list.txt tsa_model_path [maxFA or mean]
where
- dti_volume_list.txt is a text file that gathers all the subjects'names (click here for an example)
- tsa_model_path is the directory that contains all the medial representations (if you downloaded our template, this path should be something like "${HOME_DIR}/template/aging/tsa/"
- maxFA or mean: the values projected on the mesh can be computed in two ways. The resulting projected values can be either mean, i.e., an average of DT metrics along the spokes of the vertex or maxFA, i.e., the DT metrics corresponding to the point along the spokes with the maximum FA value, as in TBSS.
Statistical Analysis
Non-parametric permutation-based supratheshold statistical analysis follows. In this last computation, we use a script from dti-tk that completely relies on the function mesh_glm, which is part of cmrep.
For this, use the script called tsa_stats_glm. For this script to work, you must first generate contrast and design matrices to identify which subjects belong to which group.
You can find a simple explanation and example of the general linear model, as well as the associated design and contrast matrix on the freesurfer website.
Very simply, if you had such a dti_volume_list.txt and wanted to perform group comparison without any covariation, the design matrix should be as followed (design.txt) and the contrast matrix should be as followed (contrast.txt). As you can notice, there are two groups in this data set, one group of patients and one group of controls. The design matrix has two columns (one per group) and as many lines as the number of subjects. 1 indicates that the subject belongs to a group.
An applet was created to automate this process and can be found here.
Once this is done, simply run the script in the given directory. Example:
tsa_stats_glm mesh_in.txt design.txt contrast.txt [feature] [p threshold] [statistic type] [number of permutation]
where:
- mesh_in.txt is a text file containing the names of all the tracts (an example can be found here)
- feature: is the white matter attribute analyzed. It can be FA, Radial diffusivity (RD), apparent diffusion coefficient (ADC), axial diffusivity (AD)
- p threshold is typically 0.01 or 0.05:
- statistic type: P for a group analysis and C for a regression analysis
- number of permutation: this number can be set to 0 to test the script, and raised to typically 10000