Loading files into Matlab using SPM commands
Neuroimaging files are stored by SPM in one of two different formats - FormatAnalyze or FormatNifti.
There are two main components to these files:
* The data itself
* Descriptive header information, which stores data type, scaling, and importantly, the space: the voxel size, slice orientation (often relative to the main axes of the scanner - x left-right, y down-up and z along the bore of the magnet from foot to head end) and the origin, often relative to the isocentre of the magnet
When you are reading in a file into SPM, you must first load the header information, and then the main data. To load the header, use the Matlab line: