dbedit
dbedit is a program written by John Ashburner a long time ago, that he has kindly given us permission to distribute. You can get the source, and Sun / Windows binaries at http://imaging.mrc-cbu.cam.ac.uk/downloads/Dbedit/dbedit.tar.gz. To compile on Unix, run the command:
gcc -o dbedit dbedit.c anautils.c
To compile on Windows, get hold of the Cygwin utilities and gcc compiler - see the Cygwin / mex file page for some tips that may be relevant. Then compile with the command line (which expects Cygwin to be on your path):
gcc -mno-cygwin -o dbedit.exe dbedit.c anautils.c
dbedit shows and sets fields in the Analyze header from the command line. The usage is:
dbedit file.hdr atr1 [=val1] |all [atr2 [=val2] [atr3 [=val3] ..]]
To see all the possible fields in a header, and the names that dbedit uses, type:
dbedit
To see all the values of the fields in a particular analyze header:
dbedit myfile.hdr all
To set a field in a header, such as the size of the voxel dimensions in Z:
dbedit myfile.hdr "dime.pixdim [3] =5"
(the inverted commas are needed to hide the square brackets from the Unix shell)
Matthew Brett 24/1/01