Transforms fields in mesh files to nifti files.

Usage example

  1. Open a simulation results folder, for example ernie/simu if you ran ernie_simu.mat

  2. Run

msh2nii ernie_TDCS_1_scalar.msh ../m2m_ernie/T1fs_conform.nii.gz ernie_TDCS_1

  1. This will create the ernie_TDCS_1_E.nii.gz, ernie_TDCS_1_J.nii.gz, ernie_TDCS_1_normE.nii.gz, and ernie_TDCS_1_normJ.nii.gz files.

  2. The files are in the same space as the ../m2m_ernie/T1fs_conform.nii.gz file

Further notes

  • Type msh2nii -h for more information and options.

  • This tool equivalent to selecting the Interpolate to a nifti volume option in the GUI or set map_to_vol to true in the SESSION structure.

  • Can also be used to create tissue masks with the --create_masks argument.