Skip to content.

Neuroimaging Informatics Technology Initiative

Personal tools
You are here: Home » NIfTI-1 Data Format » Support » SPM5 and NIfTI-1

SPM5 and NIfTI-1

Document Actions
The status of NIfTI-1.1 support in the SPM5 package.

SPM5 now supports input and output of NIfTI-1.1 files.

SPM5 can directly handle only the following data types: 8-bit byte (DT_UINT8 and DT_INT8), 16-bit signed short (DT_UINT16 and DT_INT16), 32-bit int (DT_INT32 and DT_UINT32), 32-bit float (DT_FLOAT32) and 64-bit complex (DT_COMPLEX64). Gzipped files can not be directly read into SPM, as the software allows random access for both reading and writing of image data. These images should be "gunzip"ped before reading.

Most fields in the NIFTI-1.1 headers are currently ignored on reading, and set to default values on writing. Currently, the only fields that are not ignored are the minimum set of fields described in the NIfTI-1 FAQ, plus the fields relating to sform and qform.

SPM assumes that each volume has a single "voxel-to-world" affine mapping associated with it. If sform_code is defined, then SPM will use the sform matrix - otherwise it will use the qform matrix. If the qform_code is not defined, then anything can happen. For this reason, it is a very good idea to ensure that at least one of these matrices contains accurate information.

On writing, the qform_code and sform_code are set to 2 in the SPM5 release (indicating that they are aligned with some other image). This seemed like a reasonable default. The same matrices are written into both the sform and qform. If qform can not represent this matrix properly, then some approximation is used instead.

Extensions are ignored (because different packages use different extensions - which leads to possible incompatibility among packages). Instead, SPM5 writes any additional data into a Matlab 6.5 format ".mat" file, which other packages will ignore. Currently, this only includes orientation changes arising from the realignment of fMRI time series, if the data is all contained within the same file.

Created by John Ashburner
Last modified 2006-02-01 06:36

Powered by Plone

This site conforms to the following standards: