<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">Hi Ricardo,<br>
<br>
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.<br>
<br>
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.<br>
<br>
Best,<br>
Jörn<br>
<br>
On 3/27/2013 5:10 PM, Ricardo Moura wrote:<br>
</div>
<blockquote
cite="mid:CAO6XY+KFLe4+8S0ev7mu+Ga2NfyX8GjTh9wc+XxKHy-yPPPvZw@mail.gmail.com"
type="cite">
<div dir="ltr">
<div>
<div>Dear all<br>
<div>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?</div>
<div><br>
</div>
<div>Thanks a lot in advance!</div>
<div>Best,</div>
<div>Ricardo</div>
</div>
</div>
<div><br>
<br>
<br>
<br>
load standard_mri.mat<br>
mri_orig=mri;<br>
disp(mri)<br>
<br>
% Segmenting the data<br>
cfg = [];<br>
cfg.output= {'scalp','skull','brain'};<br>
segmentedmri = ft_volumesegment(cfg, mri_orig);<br>
disp(segmentedmri)<br>
save segmentedmri segmentedmri<br>
<br>
% MESH <br>
cfg=[];<br>
cfg.tissue={'brain','skull','scalp'};<br>
cfg.numvertices = <a moz-do-not-send="true"
href="tel:%5B3000%202000" value="+5530002000"
target="_blank">[3000 2000</a> 1000];<br>
bnd=ft_prepare_mesh(cfg,segmentedmri);<br>
disp(bnd(1)) <br>
<br>
% Head Model = variavel vol<br>
cfg = [];<br>
cfg.method ='bem_dipoli'; %dipoli singlesphere<br>
vol = ft_prepare_headmodel(cfg, segmentedmri); <br>
<br>
<br>
>> disp(vol)<br>
</div>
bnd: [1x3 struct]<br>
cond: [0.3300 0.0041 0.3300]<br>
skin_surface: 1<br>
source: 3<br>
type: 'dipoli'<br>
unit: 'mm'<br>
cfg: [1x1 struct]<br>
<br>
<div><br>
<br>
</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
fieldtrip mailing list
<a class="moz-txt-link-abbreviated" href="mailto:fieldtrip@donders.ru.nl">fieldtrip@donders.ru.nl</a>
<a class="moz-txt-link-freetext" href="http://mailman.science.ru.nl/mailman/listinfo/fieldtrip">http://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a></pre>
</blockquote>
<br>
<br>
<pre class="moz-signature" cols="72">--
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: <a class="moz-txt-link-abbreviated" href="mailto:jm.horschig@donders.ru.nl">jm.horschig@donders.ru.nl</a>
Tel: +31-(0)24-36-68493
Web: <a class="moz-txt-link-freetext" href="http://www.ru.nl/donders">http://www.ru.nl/donders</a>
Visiting address:
Trigon, room 2.30
Kapittelweg 29
NL-6525 EN Nijmegen
The Netherlands</pre>
</body>
</html>