How to edit or create an Analyze Image Header

Symptoms:

You have a data set that needs to be viewed in a tool such as afni that uses analyze headers, or you have an analyze-formatted data set whose header data are incorrect.

What to do:

Type:
> EditAnalyzeHeader -o NewHeaderName

or:

> EditAnalyzeHeader -i OldHeaderName -o NewHeaderName

EditAnalyzeHeader presents a simple (and old-fashioned) menu driven interface to access and change the contents of al of the fields in the analyze header. If you do not supply either an input or output header, EditAnalyzeHeader will give you the option of saving over an existing analyze header. A ".proc" file is created that logs all of the changes you make.

The source is now available for EditAnalyzeHeader.c


Sample session transcript:

	
[Albert:/samples/analyze] mscohen% EditAnalyzeHeader -i E2174S4.hdr
No output header specified. Over-write E2174S4.hdr?: y

Editing "E2174S4.hdr" -- Select a field to change, by number

        1 - Description: ["ICBM-1999"]
        2 - Patient ID: ["1038"]
        3 - Scan number: ["0"]
        4 - xsize [256] and ysize [256]
        5 - number of slices [14]
        6 - number of time points [1]
        7 - pixel size  [0.859 x 0.859 mm]
        8 - slice spacing [2.000 mm]
        9 - tr [0.000] (for some programs)
        10 - binary data type [signed short]
        11 - bits/pixel [16]
        12 - orientation []
        13 - global maximum [512] and minimum [0] intensities
        14 - More Analyze Header fields...
        15 - UC flag fields...
        ---------
        0. Done
8

Enter the slice to slice spacing (center to center) in mm: 1.5

        1 - Description: ["ICBM-1999"]
        2 - Patient ID: ["1038"]
        3 - Scan number: ["0"]
        4 - xsize [256] and ysize [256]
        5 - number of slices [14]
        6 - number of time points [1]
        7 - pixel size  [0.859 x 0.859 mm]
        8 - slice spacing [1.500 mm]
        9 - tr [0.000] (for some programs)
        10 - binary data type [signed short]
        11 - bits/pixel [16]
        12 - orientation []
        13 - global maximum [512] and minimum [0] intensities
        14 - More Analyze Header fields...
        15 - UC flag fields...
        ---------
        0. Done
	

Back to HowTo pages
This page is maintained by Mark Cohen [updated 12.28.02]