Installation
1. Download dti_preprocess from here (current version 2.0).
2. Log in as root, and save the downloaded dti_preprocess in the directory whereever search path is set (e.g. /usr/bin/).
3. Type
chmod +x /usr/bin/dti_preprocessThis makes it possible for every FSL user to run dti_process. Just typing
dti_preprocessor
dti_preprocess -helpin the terminal will show the usage or help page.
Example usage 1 (test calculation)
dti_preprocess -k dti.img -f fm.img -m mag.img -t 0.76 -e 100This performs test dewarping only for b=0 image. The flag -d is followed by 4D DTI data (dwi.img, whose first volume must be b=0 image), -f: by fieldmap image (fm.img in units of rad/sec), -m: by fieldmap magnitude image (mag.img), -t: by dwell time (0.76 ms) for DTI, and -e: by TE (100 ms) for DTI. The calculation finishes in a relatively shorter time, so that you can check whether all the parameters you use (dwell time, unwarp direction, reslicing resolution, etc.) are optimal before doing full calculation (see Example usage 2). Note that the fieldmap image (fm.img) must be unwrapped in phase and have units of rad/sec. This usually requires site/scanner/sequence specific preprocessing (see prelude/fugue in FSL web), but Siemens users may want to use ph2fm_siemens. To see the results of dti_preprocess, point your browser at the report.html in the output directory (default ourputdir= ./dti).
Example usage 2 (full calculation)
dti_preprocess -k dti.img -f fm.img -m mag.img -t 0.76 -e 100 -b bvals -r bvecsThis performs full calculation of dti data, and it takes longer time. You need additional flags -b and -r, each followed by text file, bvals and bvecs, which contains information of b-values or MPG vectors, respectively. These text files must be formatted as described below. The final outputs (unwarped data, DTI estimates, signal loss image etc.) will be all stored in the output directory (default = ./dti). This output directory can be directly used as an input for the subsequent Baysian estimation of the local diffusion parameters (bedpostx in FSL). The signal loss image (nodif_sigloss) can also be used as a weight image when registering images between DTI and other modalities (e.g. fMRI image or structural T1 image).
-u [x, x-, y, y-, z, or z-] : unwarp direction (default: y-) -s [num] : %signal loss threshold for B0 unwarping (default: 10) -v [num] : reslice resolution in mm (default: no reslicing) -K [img] : mask file for dti image (by default, this is calculated by bet) -M [img] : mask file for fieldmap magnitude image (by default, this is calculated by bet) -d [dir] : directory to save outputs (default: ./dti) -F : Use the actual directory name given (i.e. do not add + to make a new directory) -R [num] : reference volume (default : 0th volume) -4 : 3-step registration in mcflirt (slow but more accurate, default is 3-step) -l : use flirt instead of mcflirt (much slower but more accurate) -n : do not register between fieldmap and dti data -B : correct b-vector file using rotation parameters (output bvecsecc) -U : do not mask DTI imagesOutputs
bvecs, bvals: vector file and b-value file. dti_FA, dti_L1, dti_L2, dti_L3, dti_V1, dti_V2, dti_V3, dti_MD, dti_MO, dti_S0, dti_V1, dti_V2, dti_V3, dti_sse: outputs of dtifit. dti_preprocess: a directory including all the intermediate files. nodif, nodif_brain, nodif_brain_mask: non-diffusion-weighted (b=0) images. nodif_sigloss: signal loss images of non-diffusion-weighted (b=0) image. This image might be useful for weighting registration. report.html: report of dti_preprocess in html format.Example results
ph2fm_siemens
Convert Siemens phase difference image (obtained by a sequence, "gre_field_mapping") to unwrapped fieldmap in units of rad/sec. The output can be used when you use dti_preprocess with the flag of -f.
Usage: ph2fm_siemens input.img output.img TE_difference(in msec) [option]
bvecswap
Swap axis or sign of bvec file.
Usage: bvecswap input_bvecs-file a b c output_bvecs-filewhere a,b,c represent the new x,y,z axes in terms of the old axes. They can take values of -x,x,y,-y,z,-z. The input_bvecs-file must be formatted for use in FDT.
makedwi
Generate diffusion-weighted image from dwi data.
Usage: makedwi dwi-data bval-file