Coordinates in SimNIBS


Coordinates in SimNIBS are always world coordinates in subject space. Coordinates are given in millimiters and along x, y and z axis.

The origin and the alignment of the axes can vary in head models ran with headreco. In head models ran with mri2mesh, the coordinates are based on the conform coordinate system used in FreeSurfer.

Voxel to SimNIBS Coordinates

The head meshing procedures create a NifTI file called m2m_subID/T1fs_conform.nii.gz. This file contains a transformed T1 image of the subject, with the world coordinates used by SimNIBS.

Please notice that mri2mesh changes the coordinate system of the input T1 image, while headreco does not change it by default.

MNI Transformations

During head meshing, SimNIBS calculates 6 degrees-of-freedom, 12 degrees-of-freedom and non-linear MNI transformations. They are stored in the m2m_subID/toMNI/ folder. SimNIBS uses these transformations when transforming simulation results to MNI space (see the Simulation Options Window and map_to_mni attribute).

Command line Utilities

SimNIBS has several command line utilities to transform data and coordinates between MNI and Subject space

Python and MATLAB Functionas

We also provide Python and MATLAB interfaces to transform coordinates between MNI and Subject Space. Those have the signature

  • mni2subject_coords(coords_mni, subdir, transformation_type)

    • coords_mni is a set of coordinates in MNI space

    • subdir is the subject segmentation directory, for example m2m_ernie

    • (Optional) transformation_type is the type of transformation, can be nonl (default), 12dof or 6dof.

And equivalently to subject2mni_coords.