FSLUTILSMiscellaneous FSL Image Utilities | ![]() |
FSLUTILS is a set of useful command-line utilities which allow the conversion, processing etc. of Analyze and Nifti format data sets. Many of them work on both 3D and 4D data. For each of these programs, type just the program name to get the usage help.
The different FSLUTILS programs are:
avg152
standard images - equivalent to the appropriate
sform or qform in a Nifti file having a negative
determinant).
In Nifti files it is possible to independently report or modify the qform or sform fields. However, the FSL4.1 output routines will try to keep qform and sform matrices the same whenever one would otherwise be unset. Therefore it is not possible, for instance, to delete only the qform, as if the sform is set then doing this will result in the qform being set equal (or nearly equal) to the sform. This is currently done to aid interoperability with other packages. However, if both qform and sform are given different values then these are preserved by the output routines.
This command does not change the data storage at all - only the
orientation information in the header.
The new orientation of the data is specified by selecting what the
new axes should represent. This can either be done in terms of the
old axes (x y z -x -y -z) or in terms of anatomical labels
when this information is available (in a Nifti image where
either the sform or qform is set). The anatomical labels are RL LR AP
PA SI IA. This latter form is the most convenient to achieve a given
orientation. For example:
fslswapdim
invol RL PA IS outvol
will create a volume outvol
with axial slicing the same as the standard template images. Note
that the anatomical label version will not allow the left-right
convention to be changed.
Ordinarily fslswapdim will change the orientation information in the header as well as reordering the data. This is so that the anatomical labels stay attached to the same parts of the image and not fixed to the voxel coordinates. Hence, reordering a coronal image to axial slicing should keep the labels correctly attached to the relevant parts of the image, as long as they were correct initially. If the initial labels are incorrect (see the labels in fslview or fslhd) then fslorient needs to be used in conjunction with fslswapdim in order to correct this.
When fslswapdim is given arguments that will change the left-right orientation it will issue a warning that the left-right orientation is being flipped. It will also try to modify the orientation information in the header, but not in a way that swaps this left-right orientation in the header. Hence there is a net change in orientation as the data is swapped while the header is not. If the swap occurs on the x-axis then nothing is done to the header at all. Otherwise, the axis which is being swapped, together with the x-axis, have their orientation changed. In this way the handedness of the header is preserved, the labels associated with the y-axis and z-axis follow the image change, but the x-axis labels do not. It is recommended that if a left-right swap is desired (and this should only be done if the reconstruction is initially incorrect) then the arguments -x y z should be used as this is the simplest form of swapping since it only affects the x-axis data and no labels or header information is changed.
Major change from FSL3.3: all programs previously called avwsomething are now called fslsomething. All old C programs have now been replaced with C++ programs, hence all programs with a "++" at the end of the name have had the "++" removed.