FSL-TBSS Processing Guide - Blackford Lab Processing Guide V1.2.pdf · Suzanne Avery FSL-TBSS Analysis Guide 09/2010 3 This guide is written for Vanderbilt Philips users who are beginners

  • Upload
    phamnhu

  • View
    223

  • Download
    1

Embed Size (px)

Citation preview

  • Vanderbilt University Institute of Imaging Science

    2010

    FSL-TBSS Processing Guide Suzanne Avery

    V.1.2

  • Suzanne Avery FSL-TBSS Analysis Guide 09/2010

    2

    Software Versions Used: MATLAB R2009a vuTools downloaded 9/14/09 FSL 4.1.4 running in VMware virtual machine VMware Player version 2.5.2 build-156735 (centOS, GNOME file mgmt) WinZip 12.1 MRIcro version 1.40 build 1 DTIstudio version 3.0.1

    Software Downloads:

    MRIcro: http://www.cabiatl.com/mricro/mricro/index.html MRIcron: http://www.cabiatl.com/mricro/mricron/index.html DCM2NII: http://www.cabiatl.com/mricro/mricron/dcm2nii.html DTIstudio: http://www.dtistudio.org FSL: http://www.fmrib.ox.ac.uk/fsl/fsl/downloading.html VMware Player: http://www.filehippo.com/download_vmware_player/

    Data Set Used:

    WS data set: 20 subjs Philips format DTI -- 32 direction 2x2x2

    Important TBSS Articles:

    Pubmed link to NeuroImage TBSS article: http://www.ncbi.nlm.nih.gov/pubmed/16624579?itool=EntrezSystem2.PEntrez.Pubmed.Pubmed_ResultsPanel.Pubmed_RVDocSum&ordinalpos=45

    Pubmed link to Nature Protocols TBSS article: http://www.ncbi.nlm.nih.gov/pubmed/17406613?itool=EntrezSystem2.PEntrez.Pubmed.Pubmed_ResultsPanel.Pubmed_RVDocSum&ordinalpos=39

    Important Processing Links:

    FSL-TBSS Guide: http://www.fmrib.ox.ac.uk/fsl/tbss/index.html FMRIB-TBSS webpage: http://www.fmrib.ox.ac.uk/analysis/research/tbss/ FSL-Email Archives: https://www.jiscmail.ac.uk/cgi-bin/webadmin?S1=FSL NeuroWiki: Processing DTI (FSL):

    http://www.test.uva.nl/wiki/index.php?title=NeuroWiki:Processing_DTI_(FSL) Fiber Tract-based Atlas of Human White Matter Anatomy:

    http://radiology.rsna.org/content/230/1/77.full FSL-FDT Diffusion Toolbox Guide: http://www.fmrib.ox.ac.uk/fsl/fdt/index.html VUIIS Wiki: Matlab Image Processing Tools:

    http://wiki.vuiis.vanderbilt.edu/index.php/VUIIS_Matlab_Image_Processing_Tools

    http://www.cabiatl.com/mricro/mricro/index.htmlhttp://www.cabiatl.com/mricro/mricron/index.htmlhttp://www.cabiatl.com/mricro/mricron/dcm2nii.htmlhttp://www.dtistudio.org/http://www.fmrib.ox.ac.uk/fsl/fsl/downloading.htmlhttp://www.filehippo.com/download_vmware_player/http://www.ncbi.nlm.nih.gov/pubmed/16624579?itool=EntrezSystem2.PEntrez.Pubmed.Pubmed_ResultsPanel.Pubmed_RVDocSum&ordinalpos=45http://www.ncbi.nlm.nih.gov/pubmed/16624579?itool=EntrezSystem2.PEntrez.Pubmed.Pubmed_ResultsPanel.Pubmed_RVDocSum&ordinalpos=45http://www.ncbi.nlm.nih.gov/pubmed/17406613?itool=EntrezSystem2.PEntrez.Pubmed.Pubmed_ResultsPanel.Pubmed_RVDocSum&ordinalpos=39http://www.ncbi.nlm.nih.gov/pubmed/17406613?itool=EntrezSystem2.PEntrez.Pubmed.Pubmed_ResultsPanel.Pubmed_RVDocSum&ordinalpos=39http://www.fmrib.ox.ac.uk/fsl/tbss/index.htmlhttp://www.fmrib.ox.ac.uk/analysis/research/tbss/https://www.jiscmail.ac.uk/cgi-bin/webadmin?S1=FSLhttp://www.test.uva.nl/wiki/index.php?title=NeuroWiki:Processing_DTI_(FSL)http://radiology.rsna.org/content/230/1/77.fullhttp://www.fmrib.ox.ac.uk/fsl/fdt/index.htmlhttp://wiki.vuiis.vanderbilt.edu/index.php/VUIIS_Matlab_Image_Processing_Tools

  • Suzanne Avery FSL-TBSS Analysis Guide 09/2010

    3

    This guide is written for Vanderbilt Philips users who are beginners at preprocessing DTI data in FSL. FSL provides a set of toolboxes which can be used exclusively for TBSS preprocessing (see FSL-TBSS Guide for the basic recommended preprocessing steps). However, vuTools scripts and custom Matlab scripts are supplementally used throughout this guide to address specific processing problems. vuTools scripts may be downloaded from the VUIIS wiki, and custom scripts will be provided with this guide. This guide is meant to supplement the FSL processing information pages by providing a walkthrough of the basic FSL-recommended steps plus additional troubleshooting steps proven on Philips DTI data. Outline of Basic Processing Steps: Step 1: Establish initial file structure Step 2: Check PAR files for important header information Step 3: Check images for visible quality issues Step 4: Reformat image files (Matlab, DTIstudio, or dcm2nii) Step 5: Move/Rename Nifti image files Step 6: Eddy Current Correction (FSL) Step 8: Extract b=0 image (Matlab) Step 9: Brain Extraction (Matlab) Step 11: DTIfit (FSL) Step 12: Check FA images using fslview (FSL) Step 13: Create TBSS skeleton and perform group statistics (FSL) Outline of Optional Processing Steps: Step 7: Distortion Correction (Matlaboptional for data with problematic distortions) Step 10: Automated Outlier Rejection (DTIstudiooptional for high motion data)

  • Suzanne Avery FSL-TBSS Analysis Guide 09/2010

    4

    Step 1: Establish initial file structure o Changes to the file structure become difficult later in processing, so it is important to design an

    intuitive file structure from the beginning. In this recommended design, raw files are stored separately from preprocessing folders so that the raw data arent accidentally modified. Recommended initial file structure:

    Create one raw data directory per subject, place all raw PAR/REC files here for safekeeping /DTI/RawData/subj#/rawdatafiles

    Create one preprocessing directory per subject /DTI/Preproc/subj#

    o If running FSL through a virtual machine (VM), your analysis folder on your hard drive should be shared with your VM. This allows you to write FSL processing files directly to your hard drive folder and eliminates the need to constantly copy and paste files between the two machines, which can result in overwritten data and confusion. This also allows data to be accessed through MRIcro, DTIstudio, or Matlab without opening the VM. Depending on the version of VMware you are using, these steps may need to be done in VMware either prior to or after opening the FSL virtual machine:

    Select VMware Player Shared Folders Set host path

  • Suzanne Avery FSL-TBSS Analysis Guide 09/2010

    5

    To navigate to this shared folder, open a new Terminal window in the VM and use a change directory (cd) command (ie. cd /mnt/hgfs/DTI) prior to opening FSL.

    Step 2: Check PAR files for important header information o Open DTI PAR file using notepad or another text editor that does not word wrap o From upper panel, note:

    Software version # # of slices FOV Water Fat Shift

  • Suzanne Avery FSL-TBSS Analysis Guide 09/2010

    6

    o From lower panel, note: Reconstruction size (scan resolution) Slice thickness Diffusion value Diffusion gradient (its not necessary at this point to note the exact diffusion gradient

    values, just note where these columns are in the par file for later)

    ***dotted lines indicate break points in screenshot

    *** *** ***

  • Suzanne Avery FSL-TBSS Analysis Guide 09/2010

    7

    Step 3: Check images for visible quality issues o It is very common to have image quality problems such as ghosting (phase error due to finite

    motion), complete disappearance of images (due to severe motion), zebra patterns (spikes in k-space), and missing data (upload, download, or conversion error). These images must be identified by visual inspection. Images may be checked in any image viewer (ie. Matlab, fslview, MRIcro, or DTIstudio); however, DTIstudio is superior for detailed visual analysis. PAR/REC images can be opened and viewed directly in DTIstudio or Matlab. However, PAR/REC images must first be converted to Nifti or Analyze format to be viewed in MRIcro or fslview (see image conversion steps below).

    o For 4D DTI series: There should be 1 DTI volume per direction + one non-diffusion image (T2 weighted, or b=0) + (usually) one average DTI image. The b=0 and avg DTI images should be located at either the beginning or end of the 4D sequence. Note whether the b=0 and avg DTI image are first or last in the 4D sequence

    o DTIstudio viewing: Open DTIstudio Select File DTI Mapping Select image file type (Philips REC) Enter correct Image Parameters for data (these values are in the PAR file) Set b_Value (usually 1000 or greater) Click Add a File, select appropriate DTI REC file Create a Gradient Table file using your bvecs file (see DTIfit step below for explanation

    of bvecs file and how to extract this from the PAR file if necessary). Each row of the DTIstudio Gradient Table should begin with a row number and colon. B-values in the first and second columns should be followed by a comma. Save each Gradient Table file as a text document in the subject folder and copy and paste into DTIstudio. Example of a Gradient Table:

    0: -0.993, -0.004, 0.119 1: -0.01, 0.999, -0.049 2: 0.119, 0.049, 0.992 3:

    Vitamin E marker artifact Motion artifact

    Ghosting artifact

    EPI distortion

  • Suzanne Avery FSL-TBSS Analysis Guide 09/2010

    8

    32: 0, 0, 0 33: 100, 100, 100

    Click OK An image such as the one below should be displayed. Select the DtiMap tab on the

    bottom right panel.

    Click the Original ADC Mean STD button on the right-hand tool bar

  • Suzanne Avery FSL-TBSS Analysis Guide 09/2010

    9

    This window displays all image gradient blocks side-by-side at the same slice level. The view can also be changed to ascending inferior to superior slices within one gradient volume by clicking the In Gradients button. These views allow for detailed inspection of the quality of the data.

    o Matlab viewing: To use Matlab, type im = vuOpenImage(imagename.nii) , then

    vuThreePaneViewer(im)

    o MRIcro and fslview may also be used to review image quality, but images will need to first be converted to Nifti format (see image conversion steps below).

    o MRIcro viewing: Open each converted .nii file and visually check for missing data, artifacts and/or

    orientation problems

  • Suzanne Avery FSL-TBSS Analysis Guide 09/2010

    10

    o Fslview viewing: To use fslview to check images, type fslview at command line prompt, select File

    Open (below is an example of a DTI image; images must display exactly as below in FSL. If display is not exactly as below, images are not oriented correctly for later processing)

    Step 4: Reformat image files

    o FSL prefers data in Nifti or Analyze format and LAS orientation. Several programs can convert Phillips data to Nifti or Analyze format. Due to batching ability, the recommended conversion method is a custom script which converts PAR/REC files to Nifti LAS format in Matlab. However, if DTI Studio will be used to calculate tensors (ie. for high motion data that needs to take

  • Suzanne Avery FSL-TBSS Analysis Guide 09/2010

    11

    advantage of DTI Studios outlier rejection tool), images must be converted from PAR/REC to Nifti using DTI Studio. DTI Studio does not correctly read Nifti DTI images created in Matlab.

    o Matlab conversion: Make sure reorienttolas.m (custom Matlab script) is in Matlab path Make sure vuTools is in Matlab path Change Matlab working directory to individual subjects raw data folder (ie.

    /DTI/RawData/WS01) Open reorienttolas.m Change filename (line 6) to DTI image filename (ie. Blackford_523_13_1) Run script Time:

  • Suzanne Avery FSL-TBSS Analysis Guide 09/2010

    12

    Highlight all image blocks on the left and move them to the right column using arrow Select that files are saved as Analyze format, then hit OK Note: Analyze files may be renamed and saved directly to the Preproc/subjID folder in

    this step, eliminating the need to move and rename files in step below

    o dcm2nii conversion: follow instructions provided at the website below (dcm2nii will automatically extract and save bvecs and bvals files for each subject)

    http://www.sph.sc.edu/comd/rorden/mricron/dcm2nii.html Step 5: Move/Rename Nifti image files

    http://www.sph.sc.edu/comd/rorden/mricron/dcm2nii.html

  • Suzanne Avery FSL-TBSS Analysis Guide 09/2010

    13

    o This step will not be necessary if moving and renaming command were scripted into the previous step or if files were renamed and written to the appropriate locations in DTIstudio.

    Move each subjects converted data files (Nifti) from RawData to Preproc folder Recommended naming conventions: DTI.nii, T1.nii, FIELDMAP.nii Note: there is no need to include subj # or subj type in the names of files at this point,

    unless you want to, since files are stored in individual folders during preprocessing. A common naming convention makes batch preprocessing easier.

    Step 6: Eddy Current Correction (ECC) (note that this is the first preprocessing step listed in the FSL - TBSS processing guide)

    o Eddy current correction corrects for both shearing and motion between volumes (below are ECC steps using FSL, but ECC can also be completed in Matlab or DTIstudio)

    Open new terminal window in VM Change working directory to Preproc (ie. cd /mnt/hgfs/DTI/Preproc) Open FSL by typing fsl at command prompt Open FDT diffusion toolbox Change PROBTRACKX Probabilistic tracking to Eddy current correction

    Diffusion weighted data: select DTI.nii

    http://lmi.bwh.harvard.edu/wwiki/pub/DMRI08/Program/Pierpaoli_MICCAI_small.pdf

  • Suzanne Avery FSL-TBSS Analysis Guide 09/2010

    14

    Check that Corrected output data directory is correct Reference volume: select b=0 image (ie. reference volumes are numbered from 0-n,

    not 1-n, so if b=0 image is #34 in 4D series, enter a reference volume of 33) Hit Go Time: ~ 20 to 30 min/subj Output files: data.nii.gz; data.ecclog data.ecclog may be opened as a text file and reviewed

    Each volume will have a 4x4 matrix of motion parameters. The first three columns are rotation parameters and the last column is translation:

    r11, r12, r13, tx r21, r22, r23, ty r31, r32, r33, tz 0 , 0 , 0, 1

    Motion correction results should be reviewed by opening the data.nii.gz in fslview and clicking the movie tool

    o This step may also be completed in the VM terminal window using the eddy_correct command. Usage: eddy_correct Example: eddy_correct DTI.nii data 33

    Step 7: Distortion Correction (optional)

    o DTI images are EPI weighted and therefore susceptible to geometric distortions due to field inhomogeneities. Distortions occur in the phase encoding direction, usually anterior-posterior. Distortion correction of DTI images may provide more anatomically accurate images. Ideally, a set of fieldmaps should be collected near the DTI series and have same number of slices and the same shimming as the DTI series. In this case, follow steps 1 and 3 below.

    o Fieldmaps collected for use with an fMRI series may be used, but note that the shimming for these fieldmaps will be different from the DTI series and distortion correction will be suboptimal. In this case a reslicing step is necessary to match fieldmaps to the DTI series (step 2 below).

    o First coregister each subjects fieldmap with that subjects DTI image Make sure registerfieldmaptodti.m is in Matlab path (custom Matlab script) Make sure vuTools is in Matlab path Change Matlab working directory to first subjects Preproc folder (ie.

    /DTI/Preproc/WS01) Open registerfieldmaptodti.m Make sure fieldmap name is correct (ie. FIELDMAP.nii) (line 3) Make sure dti name is correct (ie. data.nii) (line 4) Make sure noDiff image number is correct (line 16) Make sure output file name is correct (ie. regFIELDMAP.nii) (line 35) Run script Time: < 15 sec/subj Output file will be written to current working directory

  • Suzanne Avery FSL-TBSS Analysis Guide 09/2010

    15

    Check registration (easiest in MRIcro) Open data.nii Overlay regFIELDMAP.nii

    Change working directory to next subject, repeat o Second, reslice fieldmaps to match DTIs (this step is only necessary if your fieldmaps DO NOT

    have the same slice #s and angulation as the DTI series, ie. if fieldmaps were collected to match fMRI series)

    Make sure fieldmapreslice.m is in Matlab path (custom Matlab script) Make sure vuTools is in Matlab path Change Matlab working directory to first subjects Preproc folder (ie.

    DTI/Preproc/WS01) Open fieldmapreslice.m Make sure that dti name is correct (ie. data.nii) (line 6) Make sure that fieldmap name is correct (ie. regFIELDMAP.nii) (line 9) Make sure that output file name is correct (ie. resFIELDMAP.nii) (line 35) Run script Time: < 5 sec/subj Output file will be written to current working directory Check reslicing (easiest in MRIcro)

    o Open data.nii o Overlay resFIELDMAP.nii

  • Suzanne Avery FSL-TBSS Analysis Guide 09/2010

    16

    Change working directory to next subject, repeat o Last, distortion correct DTI images. Matlab may crash when reading .nii.gz files, so decompress

    data.nii.gz files before running this script. Make sure dtidistortioncorrect.m is in Matlab path (custom Matlab script) Make sure vuTools is in Matlab path Change Matlab working directory to first subjects Preproc folder (ie.

    DTI/Preproc/WS01) Open dtidistortioncorrection.m Make sure dti image is correct (ie. data.nii) (line 2) Make sure fieldmap image is correct (ie. resFIELDMAP.nii) (line 3) Make sure WaterFatShift is correct (line 11) (this value can be found in subjects .par

    file) Make sure DTI output image is correct (ie. corr.data.nii) (line 24) Make sure fieldmap output image is correct (ie. skullstripped.resFIELDMAP.nii) (line 25) Choose whether to call vuDistortionCorrection or vuDistortionCorrect_modmask (line

    12) Note:

    vuDistortionCorrection is a vuTools script. vuDistortionCorrection masks DTI images by the fieldmap and any areas that are not covered by the fieldmap are dropped from the corrected DTI image.

    vuDistortionCorrection_modmask is a custom modified script. If your fieldmap does not cover the whole brain (as in screenshot above) you may decide to distortion correct the area covered by the fieldmap and ignore, but not drop, the areas not covered by the fieldmap. vuDistortionCorrection_modmask masks the DTI image with b=0 image mask instead of the fieldmap mask. This allows all data to remain in the output image. Areas covered by the fieldmap will be distortion corrected and areas not covered by the fieldmap will be untouched. This may produce obvious differences between corrected and

  • Suzanne Avery FSL-TBSS Analysis Guide 09/2010

    17

    uncorrected data, especially in the frontal pole (shown below). Careful BET will remove most or all of the unwanted, uncorrected data.

    If using vuDistortionCorrection.m (vuTools): Modify frac_thresh in dtidistortioncorrection.m on subject by subject basis

    (default = .5) Check appropriate thresholding by opening corr.data.nii in MRIcro and

    overlaying ResFIELDMAP.skullstripped.nii If using vuDistortionCorrection_modmask.m (custom script):

    Make sure vuDistortionCorrection_modmask.m is in Matlab path Make sure nodiff image number is correct in

    vuDistortionCorrection_modmask.m (line 107) If using this option, it is easiest to be more lenient with the frac_thresh here

    and allow some skull and neck to be left in the image. It will be masked out during FSL BET in the next step.

    Run dtidistortioncorrect.m script Check distortion correction results (easiest in MRIcro)

    Open data.nii (turn on yoking in MRIcro) Open corr.data.nii

    Change working directory to next subject, repeat

    Step 8: Extract b=0 image o FSL will need to use the b=0 image as a mask in later preprocessing so a copy should be

    extracted from the 4D DTI series. A custom Matlab script is provided. Matlab may crash when reading .nii.gz files, so decompress data.nii.gz files before running this script.

    Unzip each subjects data.nii.gz using decompression software such as WinZip (this will create data.nii file)

    Make sure extract_nodiff.m is in Matlab path (custom Matlab script) Make sure vuTools is in Matlab path Change Matlab working directory to first subjects Preproc folder (ie.

    /DTI/Preproc/WS01) Open extract_nodiff.m Make sure nodiff image # is correct (line 2)

    Uncorrected image Corrected image BET image

  • Suzanne Avery FSL-TBSS Analysis Guide 09/2010

    18

    Make sure output file name is correct (ie. nodif.nii) (line 4) (nodif = no diffusion; FSL will require that the file be named exactly this at a later step)

    Run script Time: < 5 sec/subj nodif file will be written to current working directory Change working directory to next subject, repeat

    *Note that this script may be batched. o This step may also be completed in the VM terminal window using the fslroi command.

    Usage: fslroi Example: fslroi data.nii.gz nodif 34 1

    tmin = scan # (ie. 34) tduration = how many scans do you want to isolate (ie. 1)

    Step 9: Brain Extraction (BET) (note that this is the second preprocessing step in the FSL - TBSS processing guide)

    o FSL will need a skullstripped nodif.nii (b=0) mask in a later step Open terminal window in VM Change working directory to Preproc (ie. cd /mnt/hgfs/DTI/Preproc) Open FSL by typing fsl at command prompt Open BET brain extraction toolbox Input image: nodif.nii Check that output image directory is correct Select Advanced Options Make sure that Output brain-extracted image and Output binary brain mask image

    options are selected

    Hit Go

  • Suzanne Avery FSL-TBSS Analysis Guide 09/2010

    19

    Check that fractional intensity threshold is correct by opening nodif.nii and overlaying nodif_brain.nii.gz image; adjust threshold and rerun if necessary

    Repeat for each subject o This step may also be completed in the VM terminal window using the bet command.

    Usage: bet [options] Example: bet nodif.nii.gz nodif_brain m f 0.5

    -m = (option) create binary brain mask -f = (option) change fractional intensity threshold (default=0.5)

    o If using vuDistortionCorrection_modmask, also run BET on corr.data.nii to clean up any leftover skull, neck and/or uncorrected data. If using vuDistortionCorrection, data.nii image should already be nicely skullstripped so BET may not be necessary

    Open terminal window in VM Change working directory to Preproc (ie. cd /mnt/hgfs/DTI/Preproc) Open FSL by typing fsl at command prompt Open BET brain extraction toolbox

    Input image: corr.data.nii Check that output image directory is correct Change Run standard to Apply to FMRI 4D Hit Go Check that fractional intensity threshold is correct by opening corr.data_brain.nii.gz

    image; adjust threshold and rerun if necessary

  • Suzanne Avery FSL-TBSS Analysis Guide 09/2010

    20

    Repeat for each subject, or run using bet command in terminal window Step 10: Automated Outlier Rejection and tensor calculation (optional)

    o Even after motion correction, data may still have artifacts that increase SNR and may obscure findings. Automatic outlier rejection may be used to remove high SNR slices. An advantage to this approach is that rejection criteria are less arbitrary than in manual rejection and, since the process is automated, less hands-on time may be required. Image registration (AIRAutomatic Image Registration, affine) should be completed in DTIstudio or Eddy Current Correction should be completed in FSL prior to automatic outlier rejection. This step will also calculate tensors. Therefore, this step is run in substitution for FSLs tensor calculation (Step 12: DTIfit, below). If outlier rejection is not necessary or desired (ie. normal data with average motion), skip to Step 12: DTIfit. Note, images must have been originally converted from Par/Rec using DTIstudio if using outlier rejection.

    Automatic outlier rejection method (from patent application): First, the b-matrix was computed from known diffusion

    orientation vectors. Second, the LSME method was implemented on the over-determined linear equations for the diffusion tensor estimation. Next, the DWI-fitting procedure was performed using the estimated tensor and b-matrix. The results of this fitting step were then subtracted against the original DWIs over all pixels of each slice, resulting in so called error-maps.

    Afterwards, the goodness-of-fitting was evaluated based on the statistic measurements of the error-maps. Auto-correlation coefficients were used as the measurements for this evaluation. Outliers are supposed to have higher coefficient values due to the residuals error caused by varying artifacts. If the goodness of fitting criterion was not satisfied, the outliers were identified and the iterative tensor estimating process was launched again after the outliers were excluded.

    The whole procedure continued iteratively until the goodness criterion was satisfied or reached a pre-defined maximum iteration number.

    o Preprocessed images (ie. eddy current corrected & brain extracted Nifti images) must now be converted to raw format (.dat) in DTIstudio. Raw format images can then be read into DTI

  • Suzanne Avery FSL-TBSS Analysis Guide 09/2010

    21

    Studios DTI Mapping tool and tensor calculation can be performed. Open preprocessed Nifti images in DTIstudio (refer to image conversion steps above; nii.gz images must be unzipped before opening in DTI Studio). Save files as Raw Data (.dat) format.

    o After images are converted to Raw Data (.dat) Create a blank text file in the subject folder, rename to flag_subj#.flg Select File DTI Mapping Select image file type (even though files are in .dat format, choose REC file type here) Enter correct Image Parameters for your data (these parameters are found in the PAR

    file). Set b_Value (usually 1000 or greater) Click Add a File, select appropriate DTI .dat file Image Quality Flag File Select empty flag file Create a Gradient Table file using your bvecs file (see DTIfit step below for explanation

    of bvecs file and how to extract this from the PAR file if necessary). Each row of the DTIstudio Gradient Table should begin with a row number and colon. B-values in the first and second columns should be followed by a comma. Save each Gradient Table file as a text document in the subject folder and copy and paste into FSL. Example of a Gradient Table:

    0: -0.993, -0.004, 0.119 1: -0.01, 0.999, -0.049 2: 0.119, 0.049, 0.992 3: 32: 0, 0, 0 33: 100, 100, 100

  • Suzanne Avery FSL-TBSS Analysis Guide 09/2010

    22

    Click OK An image such as the one below should be displayed. Select the DtiMap tab on the

    bottom right panel.

    Click Tensor, Color Map etc. calculation. Select options as in example shown below. Note that the background noise level is very important in tensor calculation if brains have not be skull stripped (BET). A setting of 10 or 0 should be fine in brains that have been skull stripped.

    After tensor fit has run, click ADC-Map and run. Review automatic outlier rejections by clicking Original ADC Mean STD. A large

    red X will appear over slices which have been removed from the tensor calculation. If

  • Suzanne Avery FSL-TBSS Analysis Guide 09/2010

    23

    rejections appear to be too extensive, the tensor fit can be rerun with a higher relative_error rejection point or some slice rejections can be manually unchecked and the tensor rerun. At least one manual change must be made while in this viewing window for DTIstudio to update the flag file (unchecking and rechecking a single slice counts as a change).

    After reviewing tensor fit for accuracy, select Image tab and save data as outlined below.

    Save files for use in FSL: FA dti_FA.hdr/img Trace dti_trace.hdr/img b=0 dti_S0.hdr/img EigenVal0 dti_L1.hdr/img EigenVal1 dti_L2.hdr/img EigenVal2 dti_L3.hdr/img EigenVec0 EigenVec0.dat (convert to FSL readable structure using

    custom Matlab script, SaveDTIStudio.m) EigenVec1 EigenVec1.dat (convert to FSL readable structure using

    custom Matlab script, SaveDTIStudio.m) EigenVec2 EigenVec2.dat (convert to FSL readable structure using

    custom Matlab script, SaveDTIStudio.m) No mean diffusivity image created, but this may be calculated using

    fslmaths [fslmaths dti_MO div 3 dti_MD.nii]

    Original Image

    Theory Image

    Difference Image

  • Suzanne Avery FSL-TBSS Analysis Guide 09/2010

    24

    Save files for use in ROQS: if ROQS will be used at any point to select ROIs, images must be saved in a certain way to be compatible FA FA*.hdr/img b=0 b0*.hdr/img ADC Dev*.hdr/img EigenVal0 L1*.hdr/img EigenVal1 L2*.hdr/img EigenVal2 L3*.hdr/img EigenVec0,1,2 (select all three at once) evector*.dat

    When data viewing window is closed, DTIstudio will ask if changes to the flag file should be saved. Select yes. This will provide a permanent record of which slices were removed. It is not necessary to save a binary flag file.

    Step 11: DTIfit (note that this is the third preprocessing step in the FSL - TBSS processing guide)

    o Two new files are needed to complete this step: bvecs and bvals. These files should be obtained from the faculty member who designed your DTI scanning parameters.

    o This step is only necessary if tensor fit has not been run in DTI Studio. Bvecs: list of gradient directions used to acquire data. The Bvecs file must be in

    EXACTLY the format shown below: Example Bvecs (single space between columns, single carriage return after each

    row, single carriage return at end): -1 0 -0.02 -0.005 0.966 0.259 -0.019 -0.259 0.966 0.062 0.146 -0.987 -0.155 0.056 -0.986 -0.213 0.091 -0.973 -0.35 0.266 -0.898 -0.174 0.597 -0.783 0.123 0.945 -0.304 0.217 0.489 -0.845 0.512 0.352 -0.784 0.032 -0.405 -0.914 0.758 0.026 -0.652 0.77 0.455 -0.447 0.183 0.98 -0.081 0.693 -0.253 -0.675 -0.771 0.563 -0.297 -0.916 -0.005 -0.4 -0.456 -0.628 -0.631 -0.872 -0.071 -0.484 -0.691 0.723 0.017 -0.231 0.889 -0.396 0.05 0.906 0.42 0.535 0.837 0.117 0.993 -0.106 -0.052 0.997 0.078 0.002

  • Suzanne Avery FSL-TBSS Analysis Guide 09/2010

    25

    0.872 0.488 0.043 0.239 0.835 0.496 -0.122 0.97 0.209 -0.35 0.704 0.618 -0.535 0.782 0.319 -0.996 0.068 -0.061 0 -0 0 0 -0 0

    Ideally these gradient directions should be the same for every subject across the study. However, due to head placement in the scanner, the exact values of these gradients may vary slightly subject-to-subject. Check that the gradients in this file exactly corresponds to the gradients listed in PAR files. If they do not correspond exactly, extract exact gradients using Read_bvals.m (custom Matlab script; requires vuTools and loadParRec.m)

    Bvals: vector that corresponds to image type (usually 1000=diffusion image; 0=nodif image); must be formatted EXACTLY as shown below; also found in PAR files

    Example bvals (one row single spaced with carriage return at end of string): 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 0

    o You may either select the folder location of the image files or manually input the necessary image files. If you decide to select the image files manually:

    Open terminal window in VM Change working directory to Preproc (ie. cd /mnt/hgfs/DTI/Preproc) Open FSL by typing fsl at command prompt Open FDT diffusion toolbox Change PROBTRACKX Probabilistic tracking to DTIFIT Reconstruct diffusion tensors Select Specify input files manually

    Diffusion weighted data: data.nii or corr.data.nii BET binary brain mask: nodif_brain_mask.nii.gz Output basename: autofill (check that this is correct)

  • Suzanne Avery FSL-TBSS Analysis Guide 09/2010

    26

    Gradient directions: bvecs file B values: bvals file Hit Go Time < 20 sec/subj Output:

    dti_FA.nii.gz (Fractional Anisotropy) dti_L1.nii.gz (1st eigenvalue) dti_L2.nii.gz (2nd eigenvalue) dti_L3.nii.gz (3rd eigenvalue) dti_MD.nii.gz (Mean Diffusivity) dti_MO.nii.gz (Trace or Total Diffusivity) dti_S0.nii.gz (Raw T2; no diffusion weighting) dti_V1.nii.gz (1st eigenvector; longest diffusion direction) dti_V2.nii.gz (2nd eigenvector) dti_V3.nii.gz (3rd eigenvector)

    Repeat for each subject o If you decide to input the file location instead of manually inputting the image files, appropriate

    image files should be moved to their own folder and named according to FSL standards (FSL is picky about image naming conventions when only a location is specified):

    Create subdirectory called DTIFIT in each subjects preprocessing folder (ie. DTI/Preproc/WS01/DTIFIT)

    Copy each subjects files needed in DTIFIT to each subjects new DTIFIT directory and rename the files so you have exactly the list below:

    data.nii.gz (rename corr.data.nii data.nii) nodif_brain_mask.nii.gz bvecs bvals

    Open FDT diffusion toolbox Change PROBTRACKX Probabilistic tracking to DTIFIT Reconstruct diffusion tensors

    Specify first subjects Input directory (ie. DTI/Preproc/WS01/DTIFIT) Hit Go Repeat for each subject

  • Suzanne Avery FSL-TBSS Analysis Guide 09/2010

    27

    o This step may also be completed in the VM terminal window using the dtifit command. Usage: dtifit Example: dtifit --data=data --out=dti --mask=nodif_brain_mask --bvecs=bvecs --

    bvals=bvals

    Step 12: Check FA images using fslview Open terminal window in VM o Change working directory to first subjects DTIFIT file (ie. cd

    /mnt/hgfs/DTI/Preproc/WS01/DTIFIT) o Type fslview in command window and open files manually (File Open dti_FA, File Add

    dti_V1), or type: fslview dti_FA dti_V1

    o Highlight dti_V1 image in lower right panel o Click on blue i (information) icon o Change options as shown below

  • Suzanne Avery FSL-TBSS Analysis Guide 09/2010

    28

    o Visually check FA values Some key areas are:

    corpus collosumshould be high r/l FA (red) spino-cortical trackshould be relatively high s/i FA (blue) longitudinal fasciculusshould be

    relatively high a/p FA (green) o Select blue information icon again, change Display from

    RGB to Lines o Visually check diffusion vectors

    o Use fslmaths to check for negative eigenvalues which could signal poor alignment/eddy current correction or low SNR in data. Ringing around image is fairly common and should not be too concerning (its a symptom of registration error), but many negative values within the brain may signal poor data quality or very poor registration.

  • Suzanne Avery FSL-TBSS Analysis Guide 09/2010

    29

    Create image of negative eigenvalues in L2 and L3 Example: fslmaths dti_L2 thr 0 dti_L2thresh.nii.gz

    fslmaths dti_L2thresh sub dti_L2 dti_L2neg.nii.gz fslmaths dti_L3 thr 0 dti_L3thresh.nii.gz fslmaths dti_L3thresh sub dti_L3 dti_L3neg.nii.gz

    Visually check dti_L2neg.nii.gz and dti_L3.nii.gz

    o Use fslmaths to check for FA values >1 or

  • Suzanne Avery FSL-TBSS Analysis Guide 09/2010

    30

    data carefully in step 3 and consider a higher minimum threshold for step 4 if necessary.

    TBSS step 5 (Randomise): When using randomise the number of permutations should be at least 5000, not 500 as in the example command. Information about selecting the number of permutations is in the randomise manual under Monte Carlo Permutation Tests. 10,000 permutations is even better, but this takes much, much longer. (500 ~ 1.5 hours; 5000 ~ 10-14 hours; 10000 ~ 20-28 hours) 5000 permutations were used in the Smith et al. 2006 NeuroImage article.

    tbss_ttstat1/tbss_ttstat2: these images are displayed in fslview as t scores tbss_tfce_p_ttstat1 / tbss_tfce_p_ttstat2: These images are displayed in fslview as

    p-values, uncorrected for multiple comparisons. P-value thresholding is adjusted through the min/max threshold setting in fslview. min=.95, max=1 is equivalent to p=.05. min=.99, max=1 is equal to p=.01

    tbss_tfce_corrp_tstat1 / tbss_tfce_corrp_tstat2: these images are displayed in fslview as p-values, FWE corrected for multiple comparisons. P-value thresholding is adjusted through the min/max threshold setting in fslview. min=.95, max=1 is equivalent to p=.05. min=.99, max=1 is equal to p=.01

    tbss_non_FA: most studies will want to test for group differences in mean diffusivity (MD), parallel ADC (L1), and radial ADC (mean of L2 & L3). Since radial diffusivity is not an output of DTIfit, this must be calculated using fslmaths:

    Example: fslmaths dti_L2 add dti_L3 div 2 dti_RD.nii.gz