f.read.analyze.header {AnalyzeFMRI}R Documentation

read Analyze header file

Description

Reads the ANALYZE image format .hdr header file into a list.

Usage

f.read.analyze.header(file)

Arguments

file

The .hdr file to be read

Value

A list containing the information in the fields of the .hdr file.

file.name

name of the .img file

swap

TRUE or FALSE variable indicating whether files are big or little endian

....... HEADER KEY ..........
sizeof.hdr

This field implies that Analyze format was originally intended to be extensible, but in practice this did not happen, and instead the file size (and hence the value of this field) is 348. Software commonly tests the value in this field to detect whether the byte ordering is Big-Endian or Little-Endian.

data.type

character vector indicating data storage type for each voxel

db.name

database name

extents

Should be 16384, the image file is created as contiguous with a minimum extent size

session.error
regular

Must be ‘r’ to indicate that all images and volumes are the same size

hkey.un0
....... IMAGE DIMENSION ..........
dim

vector of the image dimensions: dim[1] Number of dimensions in database, usually 4; dim[2] Image X dimension (slice width), number of pixels in an image row; dim[3] Image Y dimension (slice height), number of pixel rows in slice; dim[4] Volume Z dimension (volume depth), number of slices in a volume; dim[5] Time points, number of volumes in database dim[6] ?? dim[7] ?? dim[8] ??

vox.units

3 characters to specify the spatial units of measure for a voxel (mm., um., cm.)

cal.units

7 characters to specify the name of the calibration unit i.e. pixel,voxel

unused1

??

datatype

integer indicator of data storage type for this image: 0 (None or Unknown), 1 (Binary), 2 (Unsigned-char), 4 (Signed-short), 8 (Signed-int), 16 (float), 32 (Complex), 64 (Double), 128 (RGB), 255 (All)

bitpix

number of bits per pixel: 1 (packed binary, slices begin on byte boundaries), 8 (unsigned char, gray scale), 16 (signed short), 32 (signed integers or float), or 24 (RGB, 8 bits per channel)s

dim.un0

unused

pixdim

Parallel vector to dim, giving real world measurements in mm. and ms. pixdim[1]: ?? pixdim[2]: voxel width in mm. pixdim[3]: voxel height in mm. pixdim[4]: slice thickness (interslice distance) in mm. pixdim[5]: timeslice in ms. pixdim[6]: ?? pixdim[7]: ?? pixdim[8]: ??

vox.offset

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 voxel in the file

funused1

specify the range of calibration values. SPM extends the Analyze format by using a scaling factor for the image from the header

funused2

SPM2 image intensity zero intercept

funused3

??

cal.max

Max display intensity, calibration value, values of 0.0 for both fields imply that no calibration max and min values are used

cal.min

Min display intensity, calibration value

compressed

??

verified

??

glmax

The maximum pixel values for the entire database

glmin

The minimum pixel values for the entire database

....... DATA HISTORY ..........
descrip

any text you like

aux.file

auxiliary filename

orient

planar slice orientation for this dataset: 0 transverse unflipped; 1 coronal unflipped; 2 sagittal unflipped; 3 transverse flipped; 4 coronal flipped; 5 sagittal flipped

originator

image central voxel coordinates. SPM uses this Analyze header field in an unorthodox way. originator[1]: SPM99 X near Anterior Commissure, originator[2]: SPM99 Y near Anterior Commissure, originator[3]: SPM99 Z near Anterior Commissure, originator[4]:??, originator[5]:??

generated

??

scannum

??

patient.id

??

exp.date

??

exp.time

??

hist.un0

??

views

??

vols.added

??

start.field

??

field.skip

??

omax

??

omin

??

smax

??

smin

??

See Also

f.analyze.file.summary

Examples

f.read.analyze.header(system.file("example.hdr", package="AnalyzeFMRI"))

[Package AnalyzeFMRI version 1.1-24 Index]