AVWUTILS - Miscellaneous Image Utilities
|
|
AVWUTILS is a set of useful command-line utilities which allow the
conversion, processing etc. of Analyze/AVW 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 AVWUTILS programs are:
- avw2ascii - convert image files to ASCII text file (or files if
data is 4D).
- avwcc - run cross-correlations between every volume in
one 4D data set with every volume in another (for investigating
similarities in ICA outputs).
- avwchfiletype - used to change the file type of
an image (e.g. from ANALYZE_GZ to NIFTI). The first argument is
the desired file type (one of ANALYZE, ANALYZE_GZ, NIFTI, NIFTI_GZ,
NIFTI_PAIR, NIFTI_PAIR_GZ) and the second is the input file. If
no third argument is given then the input file is converted in place.
This in place conversion removes the original files: e.g. for an
Analyze file called stdimg then
avwchfiletype NIFTI_GZ stdimg would replace stdimg.hdr and
stdimg.img with stdimg.nii.gz. Note that having multiple copies of
an image with the same basename and different filetypes (e.g. stdimg.nii.gz
and stdimg.hdr and stdimg.img) creates many problems for determining
what images to read, and in general will cause FSL programs to stop.
- avwcomplex - a utility that allows 3D or 4D complex
image files to be split or constructed from corresponding real
components (either Cartesian or polar). The initial flag indicates
what kind of processing is done. In addition, two optional arguments
at the end specify the first and last 3D volumes to be processed when
the input is 4D (default is to do all volumes).
- avwcpgeom - copy certain parts of the header
information (image
dimensions, voxel dimensions, voxel dimensions units string, image
orientation/origin or qform/sform info) from one image to another.
Note that only copies from Analyze to Analyze or Nifti to Nifti
will work properly. Copying from different files will result in
loss of information or potentially incorrect settings.
- avwcreatehd - creates a new image header along
with a zero intensity data image. There are two forms of input:
one takes a list of minimal information on the command line, the
other takes in an xml-style file, as written by avwhd -x.
The information required in the first version is: x/y/z/tsize for
image dimensions, x/y/zvoxsize for voxel
dimensions (eg in mm), tr for time between volumes (for 3D data set to
0), x/y/zorigin for co-ordinate origin (eg for Talairach space -
otherwise leave as 0 0 0), datatype for the voxel data type (the
commonest are: 1=binary, 2=unsigned char, 4=signed short, 8=signed
int, 16=float).
Note that this is different from the previous versions in
that an entire image is created, and will overwrite any
.img file contents of the same image name.
- avwedithd - allows the header information in
and image to be edited in a text-based xml-style format (like the
output of avwhd -x but with redundant fields removed
and some help text provided). Note that
the default text editor used is pico, but other editors can be
specified by the second argument.
- avwfill - fill non-brain parts of a 4D data set
with data copied from inside the brain and adjust time series
accordingly - useful for programs which need a complete rectangular
matrix filled with usable but null data.
- avwhd - report every field of an Analyze or
Nifti header (note that the fields are different although some
are common, e.g. pixdims). The option "-x" produces an xml-style
output which can be used in conjunction with avwcreatehd.
- avwinterleave - interleave two inputs to form a
combined image.
- avwmaths - simple but powerful program to allow
mathematical manipulation of images.
- avwmerge - concatenate image files into a single
output. This concatenation can be in time, or in X, Y or Z. All image
dimensions (except for the one being concatenated over) must be the
same in all input images. For example, this can be used to take
multiple 3D files (eg as output by SPM) and create a single 4D image
file.
- avwnvols - report how many time points are in the
input 4D data set.
- avworient - reports or sets the left-right
orientation information in a file. Note that only in Nifti files
can the orientation be changed - Analyze files are always treated
as radiological. Note that this command does not
change the data storage at all - only the orientation information in
the header.
- avwroi - extract region of interest (ROI) from an
image. You can a) take a 3D ROI from a 3D data set (or if it is
4D, the same ROI is taken from each time point and a new 4D data set
is created), b) extract just some time points from a 4D data set, or
c) control time and space limits to the ROI.
- avwsplit - split a 4D file into lots of 3D files
(eg for inputting to SPM).
- avwstats - report certain summary statistics for an
input 3D/4D image. Of particular value is the "robust intensity range"
which calculates the 2% and 98% percentiles.
- avwstats++ - just like avwstats but
can also calculate percentiles (e.g. p 50 gives the median),
and the centre of gravity. In addition, it can take an aribitrary mask
as input so that statistics are only calculated within the mask.
- avwswapdim - re-orders the data storage to permit
changes between axial, saggital and coronal slicing. It can also
be used to swap the left-right order of the data, but will not
change the left-right orientation information in the header.
Therefore after swapping left-right (e.g. using -x y z
as arguments) the viewed image will be different. If the header
information is also swapped (by using avworient) then
the image will display as it originally did, although the data
will be stored in a different order. This command is recommended
for changing neurologically-ordered data into radiologically-ordered
data.
- avwval - report a particular parameter (given a
particular keyword eg "dim4") from an image header. To see the list of
keywords run avwhd on the header and look at the first column.
- avwfixfloat - sets all non-finite (NaN, Inf) values
and very small values (<1e-37) to zero, which helps avoid some floating
point errors on Alpha machines. Note that this is only works for volumes
with data type = float.
- if2avw - convert some Interfile format images to
Analyze or Nifti. This is nowhere near a complete implementation so beware!
Copyright © 2000-2004, University of
Oxford. Written by S. Smith and M. Jenkinson.