| flirt Command-line Program and Utilities
|
|
INTRODUCTION
This document gives a brief description of the various command line
programs available in the FLIRT component of FSL. A description of
the GUI interface is also available.
For each of the programs described here, a usage message which describes
the full list of available options can be obtained by running the
program with no options.
flirt
flirt is the main program that performs affine registration. It takes
an input (-in) and a reference
(-ref) volume, and then calculates the affine
transformation that registers the input to the reference. The
transformation can be saved as a 4x4 affine matrix
(-omat) or as a MEDx transform
(-omedx). The transform can be applied to
the input volume to create an output (-out)
which will be in alignment with the reference volume.
In addition, FLIRT can also be used to apply a saved transformation to
a volume (-applyxfm and -out). For
this usage the reference volume must still be specified as this sets
the voxel and image dimensions of the resulting volume.
New Features:
- Cost Function Weighting
- Weighting volumes can be specified
using -refweight, -inweight (or both). This allows the cost
function to have a different weighting at each voxel, which is useful
for excluding areas (weight=0) of no interest, or increasing the
weighting around important structures such as the ventricles. Note
that this is different from masking the original images, as masking introduces
artificial boundaries whereas weighting does not.
- Different Interpolation Methods
- This includes Nearest Neighbour and
a family of Sinc-based methods (three window types - rectangular, Hanning and
Blackman) with configurable window width. The interpolation is only used
for the final transformation (and in applyxfm), not in the registration
calculations.
- 2D Rigid-Body Mode
- This allows 2D to 2D registrations to be performed.
This is selected with the -2D option. Note that
it does not perform any search in this mode, and cannot deal with 2D to 3D
registrations.
convert_xfm
convert_xfm is a utility that is used to convert between different
transformation file formats. It can read and write ascii 4x4 matrices
and MEDx transforms as well as reading MINC transform files. In
addition, it can be used to concatenate two transforms (using
-concat with the second transform) or to find the
inverse transformation (using -inverse).
As MEDx transformations require voxel dimensions, the input and
reference volume corresponding to the transformation must be specified
when using this command. However, if only ascii files are used, the
-matonly option can be used, in which case no volumes
need to be specified.
img2imgcoord
img2imgcoord is a utility that calculates the corresponding
coordinate positions (in voxels or mm) within a destination volume
given the original coordinates in the source volume and the transformation
from the source to the destination volume. This is useful for finding
corresponding anatomical/functional locations. Note that the source
coordinates need to be stored in a file as three numbers per line, space
separated.
img2talcoord
img2talcoord is a similar utility to img2imgcoord
except that the destination volume coordinates are treated as Talairach
space coordinates. This requires the Talairach volume to have the
origin coordinates and voxel dimensions entered in the correct analyse
header fields. (Note that this has only been tested with the standard
images contained in fsl/etc/standard - there is no guarantee with other
images, as the origin is not a standard analyse header field)
tal2imgcoord
tal2imgcoord is the complementary utility to img2talcoord.
It works the same way but transfers coordinates from Talairach space to
the other image (IMG) space.
applyxfm4d
applyxfm4D is a utility that transforms a 4D time series by
applying known affine transformations to them. It can be used with a
single transformation applied to all, or using a directory of
transformation files in the form MAT_XXXX (where XXXX stands for the
volume number, starting with 0000). Note that it always uses
trilinear interpolation, while appropriate options (-applyxfm and
-init) to FLIRT can be used to apply transformations to single volumes
with other interpolation methods. A reference volume is required in
order to determine the matrix size and FOV for the final volume.
rmsdiff
rmsdiff is a utility that calculates the Root Mean Square deviation
(in millimetres) between two transformations. That is, it compares
two transformations (normally two possible registrations of the same
volume pair) to see how much they differ. This is useful to compare
alternative registrations. Note that this cannot be used with MEDx
transformations.
avscale
avscale is a utility that displays the decomposed elements of an
affine matrix. It displays the rotation/translation matrix, the
individual axis scalings, the individual skews, the average scaling,
and the forward and backward halfway transformations. In order to set
the centre of rotation it requires the input volume (also called the
reslice volume).
Mark Jenkinson
Copyright © 2000-2001, University of Oxford