<div dir="ltr">Dear Simon,<div><br></div><div>I tested this before and now re-tested again using the versions of FT and BEMCP which come with SPM and should be quite recent. For SPM cortical mesh where we take special measures to make sure that it's far enough from the boundary the correlation coefficients between BEMCP and 3-spheres model are all above 0.9. You say you varied the depth but have you varied it enough? What 'enough' is depends on the density of your head meshes. For SPM meshes it was more than 6mm from the boundary. The difference between different BEM methods is how close you can get to the boundary without breaking. BEMCP is the simplest method which is not very good in this respect. dipoli or OpenMEEG will also break but closer to the surface.</div><div><br></div><div>Best,</div><div><br></div><div>Vladimir</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Nov 16, 2016 at 1:07 PM, Simon Van Eyndhoven <span dir="ltr"><<a href="mailto:Simon.VanEyndhoven@esat.kuleuven.be" target="_blank">Simon.VanEyndhoven@esat.kuleuven.be</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Dear all,<br>
<br>
I recently started using FieldTrip in order to simulate pseudo-realistic EEG recordings from e.g. a set of dipoles located in the brain.<br>
Therefore, I tried to follow the tutorial on the construction of a BEM head model based on an anatomical MRI scan and an electrode set: <a href="http://www.fieldtriptoolbox.org/tutorial/headmodel_eeg_bem" rel="noreferrer" target="_blank">http://www.fieldtriptoolbox.or<wbr>g/tutorial/headmodel_eeg_bem</a> .<br>
<br>
The problem is that I don't succeed to reproduce the head model that is distributed as a template in the FieldTrip toolbox: '/template/headmodel/standard_<wbr>bem.mat'. I start from the template MRI scan in FieldTrip ('standard_mri.mat') and use the following code (taken from the tutorial).<br>
<br>
---<br>
% Load MRI data and electrode setup<br>
mri = importdata('standard_mri.mat')<wbr>;<br>
elec = ft_read_sens('standard_1020.el<wbr>c')<br>
<br>
% Segment the MRI volume<br>
cfg = [];<br>
cfg.output = {'brain','skull','scalp'};<br>
segmentedmri = ft_volumesegment(cfg, mri);<br>
<br>
% Create a mesh<br>
cfg = [];<br>
cfg.tissue = {'brain','skull','scalp'};<br>
cfg.numvertices = [1500 1000 500];<br>
bnd = ft_prepare_mesh(cfg,segmentedm<wbr>ri);<br>
<br>
% Construct the headmodel<br>
cfg = [];<br>
cfg.conductivity = [0.3300 0.0041 0.3300];<br>
cfg.method = 'dipoli';<br>
vol = ft_prepare_headmodel(cfg, bnd);<br>
---<br>
<br>
The following error is thrown:<br>
<br>
"Fatal error in dipoli: during computation of B-matrix;<br>
vertex 916 of /tmp/tp39371164882184732_1.tri touches triangle 811 of /tmp/tp39371164882184732_2.tri<wbr>"<br>
<br>
I've tried to create meshes with different numbers of vertices (e.g. the combination from the website tutorial 'numvertices = [3000 2000 1000]' produces the same error): for some combinations this problem does not occur, luckily. However, I wonder how the template model (that used the aforementioned number of vertices) got created successfully; I want to make sure that I work in the correct way and don't forget something.<br>
<br>
Can anyone shed some light on this issue, or hint what might be wrong/missing in the implementation above, compared to the template results that are provided in the FieldTrip distribution?<br>
<br>
Moreover, I've tried to create the head model using the 'bemcp' method as well. As a test, I placed a dipole close to the scalp surface, near a particular electrode. It is hence expected that the recorded amplitudes are highest for electrodes in the vicinity of this electrode. This effect is correctly reproduced when performing the computation of the forward problem using the 'standard_bem.mat' head model mentioned above (using the 'dipoli' method). By contrast, the output of the forward problem using the bemcp-based head model shows a topographic distribution with many positive 'peaks' and negative 'troughs', spread kind of randomly over the scalp surface. Since neither the segmentation step nor meshing step changed (only the final step, namely the creation of the volume conduction model), I have no clue why this problem occurs. I've looked around in the discussion list's archives for possible causes:<br>
- it is reported that the bemcp method does not behave well if the dipole is located (very) close to the skull: I ruled this out for my problem by varying this distance<br>
- one user (Debora Desideri) reported a problem with the bemcp-method that appears to be very similar to mine, but there was no reply to her problem...<br>
- another user (John Richards) calls for caution when using the bemcp-method, stating that it behaves poorly sometimes<br>
<br>
Has anyone experienced similar issues when using the 'becmp' method and maybe found an explanation for this?<br>
<br>
Thanks in advance for any help!<br>
<br>
Best regards,<br>
<br>
-- <br>
Simon Van Eyndhoven<br>
<br>
PhD researcher<br>
Stadius Center for Dynamical Systems, Signal Processing and Data Analytics<br>
KU Leuven, Dept. Electrical Engineering (ESAT)<br>
<br>
email: <a href="mailto:simon.vaneyndhoven@esat.kuleuven.be" target="_blank">simon.vaneyndhoven@esat.kuleuv<wbr>en.be</a><br>
<br>
______________________________<wbr>_________________<br>
fieldtrip mailing list<br>
<a href="mailto:fieldtrip@donders.ru.nl" target="_blank">fieldtrip@donders.ru.nl</a><br>
<a href="https://mailman.science.ru.nl/mailman/listinfo/fieldtrip" rel="noreferrer" target="_blank">https://mailman.science.ru.nl/<wbr>mailman/listinfo/fieldtrip</a><br>
</blockquote></div><br></div>