<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" id="owaParaStyle">P {margin-top:0;margin-bottom:0;}</style>
</head>
<body fpstyle="1" ocsi="0">
<div style="direction: ltr;font-family: Tahoma;color: #000000;font-size: 10pt;">Howdy 'Trippers,<br>
<br>
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>
<br>
After loading and segmenting the template brain I called ft_prepare_headmodel using the suggested parameters.<br>
<br>
<i>cfg = [];<br>
cfg.method = 'singleshell';<br>
template_headmodel = ft_prepare_headmodel(cfg, template_seg);</i><br>
<br>
This gave the following error.<br>
<br>
<i>Error using ft_notification (line 314)<br>
please specificy cfg.tissue and pass an appropriate segmented MRI as input data<br>
<br>
Error in ft_error (line 39)<br>
ft_notification(varargin{:});<br>
<br>
Error in ft_prepare_headmodel (line 354)<br>
ft_error('please specificy cfg.tissue and pass an appropriate segmented<br>
MRI as input data')</i><br>
<br>
So I added cfg.tissue...<br>
<br>
<i>cfg = [];<br>
cfg.method = 'singleshell';<br>
cfg.tissue = 'brain';<br>
template_headmodel = ft_prepare_headmodel(cfg, template_seg);</i><br>
<br>
...and this upset fieldtrip. After printing <i>'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>
<br>
<i>Missing symbol '_vm_allocate' required by<br>
'/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>
Missing symbol '_vm_deallocate' required by<br>
'/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>
<br>
Error in spm_smooth>smooth1 (line 105)<br>
spm_conv_vol(P,Q,x,y,z,-[i,j,k]);<br>
<br>
Error in spm_smooth (line 40)<br>
smooth1(P,Q,s,dtype);<br>
<br>
Error in volumesmooth (line 18)<br>
spm_smooth(output, output, fwhm);<br>
<br>
Error in ft_datatype_segmentation (line 229)<br>
brain = volumesmooth(brain, smooth, 'brain');<br>
<br>
Error in prepare_mesh_segmentation (line 95)<br>
mri = ft_datatype_segmentation(mri, 'segmentationstyle', 'probabilistic',<br>
'hasbrain', 'yes');<br>
<br>
Error in ft_prepare_mesh (line 147)<br>
bnd = prepare_mesh_segmentation(cfg, mri);<br>
<br>
Error in ft_prepare_headmodel (line 337)<br>
geometry = ft_prepare_mesh(tmpcfg, data);<br>
</i><br>
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>
<br>
In case it's relevant: I'm running fieldtrip-20170726 in matlab R2017a on a mac.<br>
<br>
And ideas?<br>
<br>
Best,<br>
Tom<br>
<i></i></div>
</body>
</html>