<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><pre style="white-space: pre-wrap; font-variant-ligatures: normal; orphans: 2; widows: 2;" class="">Hi Everyone, 

<pre style="white-space: pre-wrap; font-variant-ligatures: normal;" class="">When running ft_prepare_headmodel I have been getting the following error for a couple of participants: </pre><pre style="white-space: pre-wrap; font-variant-ligatures: normal;" class="">"Error using ft_prepare_headmodel (line 279) the compartment nesting cannot be determined”.</pre>I have plotted the meshes (Brain, CSF, Skull, Scalp) for these participants (ft_plot_mesh), and it seems that the error only occurs for subjects where the scalp mesh appears to have the skull inside. </pre><pre style="white-space: pre-wrap; font-variant-ligatures: normal; orphans: 2; widows: 2;" class="">I tried improving the contrast of the MRI on FSL (using fast -B <filename>), and running decouplesurf several times to check whether any of the layers are overlapping, but this hasn’t resolved the problem. I have also tried removing the indices where the skull and scalp overlap. However, this resulted in the scalp disappearing entirely, leaving only the skull behind.</pre><pre style="white-space: pre-wrap; font-variant-ligatures: normal; orphans: 2; widows: 2;" class="">I was wondering whether anyone had experienced similar issues? I have been unable to find anything similar online.  
<br class=""></pre><pre style="white-space: pre-wrap; font-variant-ligatures: normal; orphans: 2; widows: 2;" class="">Thank you in advance,</pre><pre style="white-space: pre-wrap; font-variant-ligatures: normal; orphans: 2; widows: 2;" class="">
Kara</pre><div class=""><br class=""></div></body></html>