<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div></div><div>Hi Tom, </div><div><br></div><div>As another work around, you could try using spm12 functionality. cfg.spmversion = ‘spm12’ if the function supports it, or by manually putting it on the path with ft_hastoolbox. There may be differences in the algorithm/outcome between versions, so you may want to be consistent in its use across subjects.</div><div><br></div><div>Best,</div><div>Arjen</div><div><br>On Jan 10, 2018, at 12:36 AM, Schoffelen, J.M. (Jan Mathijs) <<a href="mailto:jan.schoffelen@donders.ru.nl">jan.schoffelen@donders.ru.nl</a>> wrote:<br><br></div><blockquote type="cite"><div>

<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">


Dear Tom,
<div class=""><br class="">
</div>
<div class="">To me, this looks like a platform/MATLAB version specific issue with the compiled mex-files. Anecdotally, MATLAB2017a on a Mac suffers from not knowing to handle the precompiled stuff that comes with FieldTrip/SPM. Either you could use a lower
 matlab version (e.g. 2016b, which as far as I know does not suffer from this), or you could try and recompile the affected mex-files from the original c-code with the matlab mex-command. See <a href="http://bit.ly/2DeuNlX" class="">http://bit.ly/2DeuNlX</a> for
 more info.</div>
<div class=""><br class="">
</div>
<div class="">Best wishes,</div>
<div class="">JM</div>
<div class=""><br class="">
</div>
<div class=""><br class="">
<div>
<blockquote type="cite" class="">
<div class="">On 9 Jan 2018, at 17:27, Tom Marshall <<a href="mailto:tom.marshall@psy.ox.ac.uk" class="">tom.marshall@psy.ox.ac.uk</a>> wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<div style="font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; direction: ltr; font-family: Tahoma; font-size: 10pt;" class="">
Howdy 'Trippers,<br class="">
<br class="">
I got a weird error when trying to create a template headmodel using ft_prepare_headmodel (basically just following the steps in the tutorial 'Creating a sourcemodel for source-reconstruction of MEG or EEG data').<br class="">
<br class="">
After loading and segmenting the template brain I called ft_prepare_headmodel using the suggested parameters.<br class="">
<br class="">
<i class="">cfg          = [];<br class="">
cfg.method   = 'singleshell';<br class="">
template_headmodel = ft_prepare_headmodel(cfg, template_seg);</i><br class="">
<br class="">
This gave the following error.<br class="">
<br class="">
<i class="">Error using ft_notification (line 314)<br class="">
please specificy cfg.tissue and pass an appropriate segmented MRI as input data<br class="">
<br class="">
Error in ft_error (line 39)<br class="">
  ft_notification(varargin{:});<br class="">
<br class="">
Error in ft_prepare_headmodel (line 354)<br class="">
          ft_error('please specificy cfg.tissue and pass an appropriate segmented<br class="">
          MRI as input data')</i><br class="">
<br class="">
So I added cfg.tissue...<br class="">
<br class="">
<i class="">cfg          = [];<br class="">
cfg.method   = 'singleshell';<br class="">
cfg.tissue   = 'brain';<br class="">
template_headmodel = ft_prepare_headmodel(cfg, template_seg);</i><br class="">
<br class="">
...and this upset fieldtrip. After printing<span class="Apple-converted-space"> </span><i class="">'smoothing brain with a 5-voxel FWHM kernel'</i>, it hung for 10-15 minutes, then threw an error with lots of 'Missing symbol' statements (see below - there are
 a few hundred more, I just copypasted the last two).<br class="">
<br class="">
<i class="">Missing symbol '_vm_allocate' required by<br class="">
'/usr/lib/closure/libclosured.dylib->/usr/lib/system/libdyld.dylib->/usr/lib/system/libsystem_platform.dylib->/usr/lib/system/libsystem_pthread.dylib->/usr/lib/system/libcache.dylib->/usr/lib/libgcc_s.1.dylib->/Users/marshall/Documents/MATLAB/fieldtrip-20170726/external/spm8/spm_conv_vol.mexmaci64'<br class="">
Missing symbol '_vm_deallocate' required by<br class="">
'/usr/lib/closure/libclosured.dylib->/usr/lib/system/libdyld.dylib->/usr/lib/system/libsystem_platform.dylib->/usr/lib/system/libsystem_pthread.dylib->/usr/lib/system/libcache.dylib->/usr/lib/libgcc_s.1.dylib->/Users/marshall/Documents/MATLAB/fieldtrip-20170726/external/spm8/spm_conv_vol.mexmaci64'.<br class="">
<br class="">
Error in spm_smooth>smooth1 (line 105)<br class="">
spm_conv_vol(P,Q,x,y,z,-[i,j,k]);<br class="">
<br class="">
Error in spm_smooth (line 40)<br class="">
    smooth1(P,Q,s,dtype);<br class="">
<br class="">
Error in volumesmooth (line 18)<br class="">
spm_smooth(output, output, fwhm);<br class="">
<br class="">
Error in ft_datatype_segmentation (line 229)<br class="">
          brain = volumesmooth(brain,    smooth,    'brain');<br class="">
<br class="">
Error in prepare_mesh_segmentation (line 95)<br class="">
    mri = ft_datatype_segmentation(mri, 'segmentationstyle', 'probabilistic',<br class="">
    'hasbrain', 'yes');<br class="">
<br class="">
Error in ft_prepare_mesh (line 147)<br class="">
    bnd = prepare_mesh_segmentation(cfg, mri);<br class="">
<br class="">
Error in ft_prepare_headmodel (line 337)<br class="">
        geometry = ft_prepare_mesh(tmpcfg, data);<br class="">
</i><br class="">
It seems like the problem is somewhere deep down in spm commands that fieldtrip is calling, so maybe nobody has a clue. I'm hoping somebody has seen this before and knows of a fix...<br class="">
<br class="">
In case it's relevant: I'm running fieldtrip-20170726 in matlab R2017a on a mac.<br class="">
<br class="">
And ideas?<br class="">
<br class="">
Best,<br class="">
Tom<br class="">
<i class=""></i></div>
<span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">_______________________________________________</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">
<span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">fieldtrip
 mailing list</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">
<a href="mailto:fieldtrip@donders.ru.nl" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;" class="">fieldtrip@donders.ru.nl</a><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">
<a href="https://mailman.science.ru.nl/mailman/listinfo/fieldtrip" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;" class="">https://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a></div>
</blockquote>
</div>
<br class="">
</div>


</div></blockquote><blockquote type="cite"><div><span>_______________________________________________</span><br><span>fieldtrip mailing list</span><br><span><a href="mailto:fieldtrip@donders.ru.nl">fieldtrip@donders.ru.nl</a></span><br><span><a href="https://mailman.science.ru.nl/mailman/listinfo/fieldtrip">https://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a></span></div></blockquote></body></html>