Common example usage for Command-line Programs |
flirt -in invol -ref refvol -out outvol -omat invol2refvol.mat -dof 6
where invol, refvol, outvol
are the input, reference and
output volume filenames respectively, invol2refvol.mat
is the
filename for the saved ascii transformation matrix.
Naturally, any filenames you wish to use can be chosen.
Note that -dof
was used as the default would otherwise
be 12. The default cost function is Correlation Ratio, which normally
works well for all images.
Also note that the .mat
extension is not compulsory
and any filename and extension can be used. The transformation files
are simply stored as ascii matrices, and so other conventions can be
used (which might be better for MATLAB users to avoid confusion)
although the .mat
extension is the default within FEAT.
flirt -in newvol -ref refvol -out outvol -init invol2refvol.mat -applyxfm
Note that the previous transformation matrix is used with the -init
command and that the size of the otput volume is determined by refvol
although its contents are not used.
flirt -in inslice -ref refslice -out outslice -omat i2r.mat -2D
flirt -in inslice -ref refslice -out outslice -omat i2r.mat -2D -schedule ${FSLDIR}/etc/flirtsch/sch2D_6dof
The schedule file specifies what transformations/DOF are allowed and how the
optimisation is performed.
Note that several other schedule files could be used - including 3D
translation only schedules etc. These are all stored in
${FSLDIR}/etc/flirtsch
convert_xfm -omat refvol2invol.mat -inverse invol2refvol.mat
convert_xfm -omat AtoC.mat -concat BtoC.mat AtoB.mat
Note that the transform after the -concat
is treated
as the second transformation in the concatenation.