DBedit - MRC CBU Imaging Wiki

Upload page content

You can upload content for the page named below. If you change the page name, you can also upload content for another page. If the page name is empty, we derive the page name from the file name.

File to load page content from
Page name
Comment
Type the odd letters out: scieNce GATHeRS knowledge fAster tHAN SOCIeTY GATHErS wisdom

location: DBedit

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