makeaheader
This program will generate a header (.hdr file) based
upon information that you provide.
makeaheader
filename
filetype
x-dim
y-dim
z-dim
x-size
y-size
z-size
File types (just use the corresponding number):
- where the following definitions apply:
-
- filename
- the name of the header file to be created
- filetype
- a number from the following list:
- 0--8 bits/pixel (values 0 to 255)
- 1--16 bits/pixel unsigned short ints (values 0 to 65535)
- 2--16 bits/pixel short ints (values 0 to 32767)
- 3--16 bits/pixel short ints (values -32767 to 32767)
- x-dim
- the x dimension of the image file in pixels
- y-dim
- the y dimension of the image file in pixels
- z-dim
- the z dimension of the image file in pixels
- x-size
- the x size of voxels in the image file
- y-size
- the y size of voxels in the image file
- z-size
- the z size of voxels in the image file
makeaheader mri 2 256 256 140 1.0 1.0 1.5
- This command will generate a header file mri.hdr that specifies 16 bit data with
a global minimum of zero and global maximum of 32767, x and y dimensions of 256 with 1 mm
voxels in plane and a z dimension of 140 with 1.5 mm thick planes
- If voxel sizes have to be rounded-off, the smallest voxel size should be rounded
downwards and the other two voxels sizes (if different from the smallest voxel size)
should be rounded upwards to assure that
interpolation to cubic voxels will function
properly.
- Headers should only be constructed using this program on platforms with the same endianness as the original
data in order for automatic byte-swapping to be performed correctly when the header and
data are loaded and read.. For example, you
should not move image data from a Sun machine to a PC and then make the header on a PC
See also: Generic error messages
- filetype must be 0, 1, 2 or 3
-
- specify one of these values
- x_dim must be a positive integer
-
- provide a positive integer (not zero)
- x_size must be a positive number
-
- provide a positive number
- y_dim must be a positive integer
-
- provide a positive integer
- y_size must be a positive number
-
- provide a positive number
- z_dim must be a positive integer
-
- provide a positive integer
- z_size must be a positive number
-
- provide a positive number
Modified: July 22, 2002
© 2001-2002 Roger P. Woods, M.D.(rwoods@ucla.edu)