You are on page 1of 1

3/16/24, 11:02 PM charm — SimNIBS g75fd674e') documentation

charm
Note:
Charm replaces headreco or mri2mesh that were included in older SimNIBS versions.

Description
charm reconstructs a tetrahedral head mesh from T1- and T2-weighted structural MR images. It runs also with only a
T1w image, but it will achieve more reliable skull segmentations when a T2w image is supplied.

Usage example
1. Open a terminal and go to the ernie/ folder of the example data set.
2. Run the reconstruction:

charm ernie org/ernie_T1.nii.gz org/ernie_T2.nii.gz

The subject ID (subID) ernie is given as first argument. Charm will create a folder named m2m_ernie/ that
contains the segmentation results and the final head mesh ernie.msh. The input images are given as final argu‐
ments (first the T1, then the T2).

Alternatively, the reconstruction can be run with only the T1w image as input, but this can result in a less accu‐
rate skull region:

charm ernie org/ernie_T1.nii.gz

3. Check the segmentation. Click on the final segmentation viewer in the results.html (to be found in the m2m-
folder of the subject). The viewer shows the outlines of the reconstructed tissue compartments, enabling a visual
check whether the outlines are accurate.

Further notes
If you encounter spurious segmentation results this could be due to a suboptimal affine registration between the
anatomical image(s) and the atlas. Please see the tutorial Fixing the Affine Registration.
Please see the tutorial How to manually edit a head model in case manually fixes to the segmentation are needed.

References
Puonti O, Van Leemput K, Saturnino GB, Siebner HR, Madsen KH, Thielscher A. (2020). Accurate and robust
whole-head segmentation from magnetic resonance images for individualized head modeling. Neuroimage,
219:117044.

https://simnibs.github.io/simnibs/build/html/documentation/command_line/charm.html 1/1

You might also like