analyzeheader - Create or read an Analyze 7.5 header file.
SYNOPSIS
analyzeheader
[options]
DESCRIPTION
Analyze image header, provides support for the most common header fields. Some fields,
such as patient_id, are not currently supported. The program allows three nonstandard
options: the field image_dimension.funused1 is the image scale. The intensity of each
pixel in the associated .img file is (image value from file) * scale. Also, the origin of
the Talairach coordinates (midline of the anterior commisure) are encoded in the field
data_history.originator. These changes are included for compatibility with SPM.
All headers written with this program are big endian by default.
The header subjectB.hdr is identical to subjectA.hdr except that its data type is float.
Get the data / voxel dimensions of an image as a string, suitable for passing to another
Camino program.
analyzeheader -printimagedims subjectA.hdr
The above command prints the data and voxel dimensions of the image, "-datadims 128 128
60 -voxeldims 1.7 1.7 2.3". This can be used with Camino programs that require this
information. For example,
where program is one of: shredder, scanner2voxel, vcthreshselect, pdview, track. The
program will print the args for the relevant program and exit. The list of suggested args
for all of these programs is available via the following command:
analyzeheader -readheader image.hdr
OPTIONS
-readheader <file>
Reads header information from file and prints to stdout. If this option is not
specified, then the program writes a header based on the other arguments.
-printimagedims <file>
Prints image data and voxel dimensions as Camino arguments and exits.
-printprogargs <file> <prog>
Prints data dimension (and type, if relevant) arguments for a specificCamino program,
where prog is one of shredder, scanner2voxel, vcthreshselect, pdview, track.
-printintelbyteorder <file>
Prints 1 if the header is little-endian, 0 otherwise.
-printbigendian <file>
Prints 1 if the header is big-endian, 0 otherwise.
-initfromheader <file>
Reads header information from file and intializes a new header with the values
read from the file. You may replace any combination of fields in the new header by
specifying subsequent options.
-datadims <x> <y> <z>
Dimensions of the data in the img file, in voxels.
| double> The char datatype is 8 bit (not the 16 bit char of Java), as specified by
the Analyze 7.5 standard. The byte, ushort and uint types are not part of the Analyze
specification but are supported by SPM.
-offset <value>
According to the Analyze 7.5 standard, this is the byte offset in the .img file at which
voxels start. This value can be negative to specify that the absolute value is applied
for every image in the file.
-gl <min> <max>
Minimum and maximum greylevels. Stored as shorts in the header.
-scaleslope <value>
Intensities in the image are scaled by this factor by SPM and MRICro. Default is 1.0.
-scaleinter <value>
Constant to add to the image intensities. Used by SPM and MRIcro.
-description <string>
No spaces, max length 79 bytes. Will be null terminated automatically.
-centre <x> <y> <z>
Voxel specifying origin of Talairach coordinate system for SPM, default [0 0 0].
-intelbyteorder
Write header in intel byte order (little-endian).
-networkbyteorder
Write header in network byte order (big-endian). This is the default for new headers.