NIFTI format

 See for a complete specification of this file format.

This format is “generally” supported on input and output.  However, there are some limitations.

  • jip does not support image matrix dimensions above 4.

  • Supported file types on input include signed 16-bit and 32-bit integers, unsigned 8-bit and 16-bit integers, 32-bit floats, and 32-bit floating complex pairs.

  • Supported file types on output through the “jip” executable include 16-bit (short) integers, and 32-bit floats as either single points (magnitude) or pairs (complex).

  • Off-diagonal elements are not preserved in in the transformation matrix between voxels and coordinates. This is because the internal representation of coordinates is one that is linear versus voxels. For instance, if “i” is the voxel index in the x direction, then

                                  x = origin_x + resolution_x * direction_x * i

What does this mean in practice?  The display program will always give the proper coordinates for a NIFTI file. However, when a file is read with "jip" and output as a new file, the new file will always have voxel indices (i,j,k) that are aligned or anti-aligned with (x,y,z) coordinates. So, the process of registering a data file to a given space (Paxinos, etc.) will put the output into coordinates aligned (or anti-aligned) with voxels.  For this reason, you should NOT use templates that have rotations between (i,j,k) indices and (x,y,z) coordinates.

Joseph B. Mandeville, Athinoula A. Martinos Center for Biomedical Imaging at MGH/MIT/Harvard