fsl flirt code example
Example 1: fsl flirt
#!/bin/sh
flirt -in atlas -datatype int -ref MNI152_T1_0.5mm_brain \
-interp nearestneighbour \
-init stand1stand0.5.mat -applyxfm -out atlas_0.5mm
Example 2: fsl flirt
#!/bin/sh
: <<COMMENTBLOCK
Purpose: Run flirt to reslice an image into a new space
Input: img = image to be resliced,
ref = a reference image (we will reslice INTO this new space)
-init mat = a mat (matrix) file that expresses the relationship between
the input space and the output space
Output: -out = image in new space
COMMENTBLOCK
flirt -in img -datatype float -ref ${ref} -init ${mat} \
-applyxfm -out ${output}
Example 3: fsl flirt
#!/bin/sh
flirt -in anat_CT_axial -ref anat_CT_axial -applyisoxfm 1 -out anat_CT_axial_1mm
flirt -in anat_CT_axial -ref anat_CT_axial -applyisoxfm 0.5 -out anat_CT_axial_0.5mm