<div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="auto"><div id="gmail-m_2149721913610189133m_-8501710013831234821AppleMailSignature" dir="ltr"></div><div dir="ltr"><div dir="ltr"><span style="background-color:rgba(255,255,255,0)"><font face="verdana, sans-serif">Dear Toshiki,</font></span></div><div dir="ltr"><span style="background-color:rgba(255,255,255,0)"><font face="verdana, sans-serif"><br></font></span></div><div><font face="verdana, sans-serif">From that error, it seems your version of Freesurfer is referencing libraries that do not exist while executing the <i>mris_fill </i>command. To rule out that the issue is due to the call to <i>mris_fill</i> being made from within the matlab environment as <i>prepare_mesh_cortexhull</i> does, you could try to call <i>mris_fill</i> directly from within a terminal and see if it replicates, as follows: </font></div><div><br></div><div dir="ltr"><p style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">export FREESURFER_HOME=/Applications/freesurfer</span></p><p style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)">source $FREESURFER_HOME/SetUpFreeSurfer.sh</p><p style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">mris_fill -c -r 1 path_to_freesurfer/surf/lh.pial tmp.filled.mgz</span></p><p style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures"><br></span></p></div><div><font face="verdana, sans-serif"><span style="background-color:rgba(255,255,255,0)">If that reproduces the error, it might be worth consulting the Freesurfer development team concerning this. A similar issue was reported <a href="https://mail.nmr.mgh.harvard.edu/pipermail//freesurfer/2017-March/050544.html">here</a>, but it doesn't look like a fix has been suggested.</span><span style="background-color:rgba(255,255,255,0)"> Alternatively, you could try a different version of Freesurfer for creating the cortical hull</span><span style="background-color:rgba(255,255,255,0)"> (</span>freesurfer<span style="color:rgb(0,0,0);font-size:11px">-Darwin-lion-stable-pub-v5.3.0 runs fine on my mac). </span><span style="color:rgb(0,0,0);font-size:11px">Hope this helps,</span></font></div><div><span style="color:rgb(0,0,0);font-size:11px"><font face="verdana, sans-serif">Arjen</font></span></div><div><span style="color:rgb(0,0,0);font-family:Menlo;font-size:11px"><br></span></div></div><div dir="ltr"><br>On Sep 25, 2018, at 12:13 AM, 岡留敏樹 <<a href="mailto:tokadome@neuro.med.kyushu-u.ac.jp" target="_blank">tokadome@neuro.med.kyushu-u.ac.jp</a>> wrote:<br><br></div><blockquote type="cite"><div dir="ltr"><pre class="gmail-m_2149721913610189133m_-8501710013831234821gmail-"><font face="Helvetica">Hello fieldtrip experts, </font></pre><pre class="gmail-m_2149721913610189133m_-8501710013831234821gmail-"><font face="Helvetica">when trying to run ‘ft_prepare_mesh’ command from fieldtrip with MATLAB R2018a, I run into the error below.</font></pre><pre class="gmail-m_2149721913610189133m_-8501710013831234821gmail-"><font face="Helvetica">I was preprocessing MRI date according with the paper ’Nature Protocol 2018; 13: 1699-1723. <a href="http://doi.org/10.1038/s41596-018-0009-6" target="_blank">http://doi.org/10.1038/s41596-018-0009-6</a> ‘.</font></pre><pre class="gmail-m_2149721913610189133m_-8501710013831234821gmail-"><pre class="gmail-m_2149721913610189133m_-8501710013831234821gmail-"><font face="Helvetica">I’m running this on a iMac, macOS High Sierra 10.13.6, with fieldtrip-20180909, </font><span style="font-family:Helvetica">freesurfer-Darwin-OSX-stable-pub-v6.0.0-2beb96c. </span></pre><pre class="gmail-m_2149721913610189133m_-8501710013831234821gmail-"><font face="Helvetica">From past archives, I think this is because of SIP. So </font><span style="font-family:Helvetica">I disabled SIP of OSX, but I run into same errors.</span><div><font face="Helvetica">I tried different subjects, which caused similar errors. </font></div></pre><div><span style="font-family:Helvetica;white-space:normal">Any ideas would be greatly appreciated, thank you! </span></div></pre><pre class="gmail-m_2149721913610189133m_-8501710013831234821gmail-"><br></pre><pre class="gmail-m_2149721913610189133m_-8501710013831234821gmail-">[CODE]</pre><pre class="gmail-m_2149721913610189133m_-8501710013831234821gmail-">cfg = [];</pre><pre class="gmail-m_2149721913610189133m_-8501710013831234821gmail-">cfg.method = ‘cortexhull’;</pre><pre class="gmail-m_2149721913610189133m_-8501710013831234821gmail-">cfg.headshape = <path to freesurfer/surf/lh.pial>;</pre><pre class="gmail-m_2149721913610189133m_-8501710013831234821gmail-">cfg.fshome = <path to freesurfer home directory>;</pre><pre class="gmail-m_2149721913610189133m_-8501710013831234821gmail-">hull_lh = ft_prepare_mesh (cfg);</pre><pre class="gmail-m_2149721913610189133m_-8501710013831234821gmail-"><br></pre><div class="gmail-m_2149721913610189133m_-8501710013831234821page" title="Page 12"><div class="gmail-m_2149721913610189133m_-8501710013831234821layoutArea"><div class="gmail-m_2149721913610189133m_-8501710013831234821column"><p>[ERROR]</p></div></div></div><pre class="gmail-m_2149721913610189133m_-8501710013831234821gmail-"><font face="Helvetica">dyld: lazy symbol binding failed: Symbol not found: ___emutls_get_address<br></font></pre><pre class="gmail-m_2149721913610189133m_-8501710013831234821gmail-"><font color="#000000" face="Helvetica">  Referenced from: /Applications/freesurfer/bin/../lib/gcc/lib/libgomp.1.dylib
  Expected in: /usr/lib/libSystem.B.dylib

dyld: Symbol not found: ___emutls_get_address
  Referenced from: /Applications/freesurfer/bin/../lib/gcc/lib/libgomp.1.dylib
  Expected in: /usr/lib/libSystem.B.dylib

mris_fill -c -r 1 /Users/okadometoshiki/Desktop/SubjectUCI29/freesurfer/surf/lh.pial /private/var/folders/cc/fv5fk09d3hj5g5kx7dg7pqq80000gn/T/tp0a8d7856_136c_4156_bf73_d23f64bbf687_pial.filled.mgz: Aborted
reading filled volume...
gunzip: can't stat: /private/var/folders/cc/fv5fk09d3hj5g5kx7dg7pqq80000gn/T/tp0a8d7856_136c_4156_bf73_d23f64bbf687_pial.filled.mgz (/private/var/folders/cc/fv5fk09d3hj5g5kx7dg7pqq80000gn/T/tp0a8d7856_136c_4156_bf73_d23f64bbf687_pial.filled.mgz.gz): No such file or directory
ERROR: problem reading fname</font></pre><div class="gmail-m_2149721913610189133m_-8501710013831234821gmail-"><br></div><div class="gmail-m_2149721913610189133m_-8501710013831234821gmail-"><br></div><div class="gmail-m_2149721913610189133m_-8501710013831234821gmail-">========</div><div class="gmail-m_2149721913610189133m_-8501710013831234821gmail-"><br></div><div class="gmail-m_2149721913610189133m_-8501710013831234821gmail-">Toshiki Okadome</div></div></blockquote><blockquote type="cite"><div dir="ltr"><span>_______________________________________________</span><br><span>fieldtrip mailing list</span><br><span><a href="https://mailman.science.ru.nl/mailman/listinfo/fieldtrip" target="_blank">https://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a></span><br><span><a href="https://doi.org/10.1371/journal.pcbi.1002202" target="_blank">https://doi.org/10.1371/journal.pcbi.1002202</a></span><br></div></blockquote></div></div></div></div></div></div></div></div>