Empty trackvis header
Parameters: | endianness : {‘<’,’>’}, optional
version : int, optional
|
---|---|
Returns: | hdr : structured array
|
Notes
The trackvis header can store enough information to give an affine mapping between voxel and world space. Often this information is missing. We make no attempt to fill it with sensible defaults on the basis that, if the information is missing, it is better to be explicit.
Examples
>>> hdr = empty_header()
>>> print hdr['version']
2
>>> np.asscalar(hdr['id_string']) #23dt next : bytes
'TRACK'
>>> endian_codes[hdr['version'].dtype.byteorder] == native_code
True
>>> hdr = empty_header(swapped_code)
>>> endian_codes[hdr['version'].dtype.byteorder] == swapped_code
True
>>> hdr = empty_header(version=1)
>>> print hdr['version']
1