[FieldTrip] error in ft_prepare_headmodel

Schoffelen, J.M. (Jan Mathijs) jan.schoffelen at donders.ru.nl
Wed Jan 10 09:36:10 CET 2018


Dear Tom,

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 http://bit.ly/2DeuNlX for more info.

Best wishes,
JM


On 9 Jan 2018, at 17:27, Tom Marshall <tom.marshall at psy.ox.ac.uk<mailto:tom.marshall at psy.ox.ac.uk>> wrote:

Howdy 'Trippers,

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').

After loading and segmenting the template brain I called ft_prepare_headmodel using the suggested parameters.

cfg          = [];
cfg.method   = 'singleshell';
template_headmodel = ft_prepare_headmodel(cfg, template_seg);

This gave the following error.

Error using ft_notification (line 314)
please specificy cfg.tissue and pass an appropriate segmented MRI as input data

Error in ft_error (line 39)
  ft_notification(varargin{:});

Error in ft_prepare_headmodel (line 354)
          ft_error('please specificy cfg.tissue and pass an appropriate segmented
          MRI as input data')

So I added cfg.tissue...

cfg          = [];
cfg.method   = 'singleshell';
cfg.tissue   = 'brain';
template_headmodel = ft_prepare_headmodel(cfg, template_seg);

...and this upset fieldtrip. After printing 'smoothing brain with a 5-voxel FWHM kernel', 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).

Missing symbol '_vm_allocate' required by
'/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'
Missing symbol '_vm_deallocate' required by
'/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'.

Error in spm_smooth>smooth1 (line 105)
spm_conv_vol(P,Q,x,y,z,-[i,j,k]);

Error in spm_smooth (line 40)
    smooth1(P,Q,s,dtype);

Error in volumesmooth (line 18)
spm_smooth(output, output, fwhm);

Error in ft_datatype_segmentation (line 229)
          brain = volumesmooth(brain,    smooth,    'brain');

Error in prepare_mesh_segmentation (line 95)
    mri = ft_datatype_segmentation(mri, 'segmentationstyle', 'probabilistic',
    'hasbrain', 'yes');

Error in ft_prepare_mesh (line 147)
    bnd = prepare_mesh_segmentation(cfg, mri);

Error in ft_prepare_headmodel (line 337)
        geometry = ft_prepare_mesh(tmpcfg, data);

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...

In case it's relevant: I'm running fieldtrip-20170726 in matlab R2017a on a mac.

And ideas?

Best,
Tom
_______________________________________________
fieldtrip mailing list
fieldtrip at donders.ru.nl<mailto:fieldtrip at donders.ru.nl>
https://mailman.science.ru.nl/mailman/listinfo/fieldtrip

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20180110/aa290331/attachment-0002.html>


More information about the fieldtrip mailing list