[FieldTrip] non-existent mat in BEM headmodel

"Jörn M. Horschig" jm.horschig at donders.ru.nl
Thu Mar 28 09:43:29 CET 2013


Hi Ricardo,

I assume that you are using the dipoli method? I recently discovered 
that when the method fails, the error is caught and printed as a normal 
fprintf message to the command window. Most likely it complained about 
your segmentation or that something is wrong with the triangulation. I 
am not sure about the other BEM methods, but you can check the code 
whether a similar thing is done there.

In my limited experience, independent of what BEM method you are using,  
this is solved by checking the segmentation again and making sure that 
all boundaries (skull, scalp, brain) are close, i.e. that there are no 
holes in the brain. Let me know if this is it for you.

Best,
Jörn

On 3/27/2013 5:10 PM, Ricardo Moura wrote:
> Dear all
> I am creating a BEM model for eeg, following the appropriate tutorial, 
> but I have a problem when preparing the headmodel. The output I have 
> from the ft_prepare_headmodel command does not contain the "mat", and 
> so, when I try to generate the leadfield, it returns an error message 
> due to non existent "mat". I saw that other users had similar problem, 
> but I haven't found a solution though. So, what is wrong with my script?
>
> Thanks a lot in advance!
> Best,
> Ricardo
>
>
>
>
> load standard_mri.mat
> mri_orig=mri;
> disp(mri)
>
> % Segmenting the data
> cfg = [];
> cfg.output= {'scalp','skull','brain'};
> segmentedmri  = ft_volumesegment(cfg, mri_orig);
> disp(segmentedmri)
> save segmentedmri segmentedmri
>
> % MESH
> cfg=[];
> cfg.tissue={'brain','skull','scalp'};
> cfg.numvertices = [3000 2000 <tel:%5B3000%202000> 1000];
> bnd=ft_prepare_mesh(cfg,segmentedmri);
> disp(bnd(1))
>
> % Head Model = variavel vol
> cfg        = [];
> cfg.method ='bem_dipoli'; %dipoli singlesphere
> vol        = ft_prepare_headmodel(cfg, segmentedmri);
>
>
> >> disp(vol)
>              bnd: [1x3 struct]
>             cond: [0.3300 0.0041 0.3300]
>     skin_surface: 1
>           source: 3
>             type: 'dipoli'
>             unit: 'mm'
>              cfg: [1x1 struct]
>
>
>
>
>
> _______________________________________________
> fieldtrip mailing list
> fieldtrip at donders.ru.nl
> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip


-- 
Jörn M. Horschig
PhD Student
Donders Institute for Brain, Cognition and Behaviour
Centre for Cognitive Neuroimaging
Radboud University Nijmegen
Neuronal Oscillations Group
FieldTrip Development Team

P.O. Box 9101
NL-6500 HB Nijmegen
The Netherlands

Contact:
E-Mail: jm.horschig at donders.ru.nl
Tel:    +31-(0)24-36-68493
Web: http://www.ru.nl/donders

Visiting address:
Trigon, room 2.30
Kapittelweg 29
NL-6525 EN Nijmegen
The Netherlands

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20130328/a52842d1/attachment-0001.html>


More information about the fieldtrip mailing list