Skip to content
Snippets Groups Projects
Commit 87af7d40 authored by Mark Jenkinson's avatar Mark Jenkinson
Browse files

Added more docs and info

parent 50532fd0
No related branches found
No related tags found
No related merge requests found
......@@ -9,45 +9,81 @@
<HR>
<P>AVWUTILS is a set of useful command-line utilities which allow the
conversion, processing etc. of Analyze/AVW format data sets. Many of
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.
<p>The different AVWUTILS programs are:
<UL>
<LI><b>avw2ascii</b> - convert AVW to ASCII text file (or files if
<LI><b>avw2ascii</b> - convert image files to ASCII text file (or files if
data is 4D).
<br><br><LI><b>avwcc</b> - run cross-correlations between every volume in
one 4D data set with every volume in another (for investigating
similarities in ICA outputs).
<br><br><LI><b>avwchfiletype</b> - 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
<kbd>avwchfiletype NIFTI_GZ stdimg</kbd> 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.
<br><br><LI><b>avwcomplex</b> - a utility that allows 3D or 4D complex
AVW files to be split or constructed from corresponding real
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).
<br><br><LI><b>avwcpgeom</b> - copy certain parts of an AVW header (image
<br><br><LI><b>avwcpgeom</b> - copy certain parts of the header
information (image
dimensions, voxel dimensions, voxel dimensions units string, image
orientation and origin) from one AVW header to another.
<br><br><LI><b>avwcreatehd</b> - create (minimal information) AVW
header. x/y/z/tsize are image dimensions, x/y/zvoxsize are voxel
dimensions (eg in mm), tr is time between volumes (for 3D data set to
0), x/y/zorigin is co-ordinate origin (eg for Talairach space -
otherwise leave as 0 0 0), datatype is the voxel data type (the
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.
<br><br><LI><b>avwcreatehd</b> - 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 <kbd>avwhd -x</kbd>.
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 <b><i>different</i></b> from the previous versions in
that an entire image is created, and will <b><i>overwrite</i></b> any
<kbd>.img</kbd> file contents of the same image name.
<br><br><LI><b>avwedithd</b> - allows the header information in
and image to be edited in a text-based xml-style format (like the
output of <kbd>avwhd -x</kbd> 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.
<br><br><LI><b>avwfill</b> - 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.
<br><br><LI><b>avwhd</b> - report every field of an AVW header.
<br><br><LI><b>avwhd</b> - 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 <kbd>avwcreatehd</kbd>.
<br><br><LI><b>avwinterleave</b> - interleave two inputs to form a
combined image.
......@@ -55,16 +91,23 @@ combined image.
<br><br><LI><b>avwmaths</b> - simple but powerful program to allow
mathematical manipulation of images.
<br><br><LI><b>avwmerge</b> - concatenate AVW files into a single
<br><br><LI><b>avwmerge</b> - 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 AVW
multiple 3D files (eg as output by SPM) and create a single 4D image
file.
<br><br><LI><b>avwnvols</b> - report how many time points are in the
input 4D data set.
<br><br><LI><b>avworient</b> - 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 <i>always treated
as <b>radiological</b></i>. Note that this command does not
change the data storage at all - only the orientation information in
the header.
<br><br><LI><b>avwroi</b> - 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
......@@ -78,9 +121,29 @@ c) control time and space limits to the ROI.
input 3D/4D image. Of particular value is the "robust intensity range"
which calculates the 2% and 98% percentiles.
<br><br><LI><b>avwstats++</b> - just like <kbd>avwstats</kbd> but
can also calculate percentiles (e.g. <kbd>p 50</kbd> 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.
<br><br><LI><b>avwswapdim</b> - 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 <i>will not
change the left-right orientation information in the header</i>.
Therefore after swapping left-right (e.g. using <kbd>-x y z</kbd>
as arguments) the viewed image will be different. If the header
information is also swapped (by using <kbd>avworient</kbd>) 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.
<br><br><LI><b>avwval</b> - report a particular parameter (given a
particular keyword eg "dim4") from an AVW header. To see the list of
keywords run avwhd on the header and look at the first column.
particular keyword eg "dim4") from an image header. To see the list of
keywords run <kbd>avwhd</kbd> on the header and look at the first column.
<p>
<hr>
<br><br><LI><b>avwfixfloat</b> - sets all non-finite (NaN, Inf) values
and very small values (<1e-37) to zero, which helps avoid some floating
......@@ -88,14 +151,14 @@ point errors on Alpha machines. Note that this is only works for volumes
with data type = float.
<br><br><LI><b>if2avw</b> - convert some Interfile format images to
AVW. This is nowhere near a complete implementation so beware!
Analyze or Nifti. This is nowhere near a complete implementation so beware!
</UL>
<p><HR><FONT SIZE=1>Copyright &copy; 2000, University of
<p><HR><FONT SIZE=1>Copyright &copy; 2000-2004, University of
Oxford. Written by <A
HREF="http://www.fmrib.ox.ac.uk/~steve/index.html">S. Smith</A>.</FONT>
HREF="http://www.fmrib.ox.ac.uk/~steve/index.html">S. Smith</A> and M. Jenkinson.</FONT>
<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
......
......@@ -37,7 +37,6 @@ tmpbase2=`${FSLDIR}/bin/tmpnam`;
echo "# AVWEDITHD" > ${tmpbase}
echo "# This text file contains the header information for an Analyze or Nifti file" >> ${tmpbase}
echo "# Simply edit this file then save it and the header will be regenerated" >> ${tmpbase}
echo "# (note: if this editor is vi and you don't know it, quit by typing, in order, ESC Z Z )" >> ${tmpbase}
echo "# All lines starting with the hash (#) character, like this line, will be ignored" >> ${tmpbase}
echo "# Ensure that all lines intended to set values take the form: name = 'value' " >> ${tmpbase}
echo "# Note that if the file is Analyze then many settings will be ignored" >> ${tmpbase}
......@@ -72,3 +71,4 @@ cat ${tmpbase} | grep -v '^[ ]*#' | grep -v '^[ ]*$' > ${tmpbase2}
${FSLDIR}/bin/avwcreatehd ${tmpbase2} $1
/bin/rm ${tmpbase} ${tmpbase2}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment