FSL

### Registration within FDT

If tractography results are to be stored in any space other than diffusion space then registration must be run.

Registration within FDT uses FLIRT. When using the GUI, registration can only be applied after bedpostx has been run. Typically, registration will be run between three spaces:

- Diffusion space (using the `nodif_brain` image in the bedpostX directory.)
- Structural space (using the struct image in the bedpostX directory, e.g., the space of a high resolution T1-weighted image of the same subject)
- Standard space (by default, the MNI152 brain stored within $FSLDIR/data/standard)

Note that the structural (T1-weighted) image must have had BET applied. The `nodif_brain` image should be the brain extracted version of the nodif image that is stored in the bedpostX directory. Create this image using `fslroi` then `bet` on the data if it does not already exist. (it is important that the user checks the quality of bet results on these images and adjust the settings in bet where appropriate).

Transformation matrices, and their inverses, will be derived from diffusion to structural space and from structural to standard space. Relevant matrices will be concatenated to produce transformation matrices between diffusion and standard space. The resulting matrices are stored within the `xfms` subdirectory of the bedpostX directory and named as follows:

- diff2str.mat - from diffusion to structural space
- str2diff.mat - from structural to diffusion space
- diff2standard.mat - from diffusion to standard space
- standard2diff.mat - from standard to diffusion space
- str2standard.mat - from structural to standard space
- standard2str.mat - from standard to structural space

By default, transformation matrices between diffusion and structural space are derived using 6 degrees of freedom, the correlation ratio cost function and normal search; transformation matrices between structural and standard space are derived using 12 degrees of freedom, the correlation ratio cost function and normal search. These parameters may be adjusted if required using the drop down menus in the registration panel.