<html><head></head><body><div style="color:#000; background-color:#fff; font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:14px"><div dir="ltr" id="yui_3_16_0_1_1447951003894_4250">Dear Martijn,</div><div id="yui_3_16_0_1_1447951003894_4336" dir="ltr"><br></div><div id="yui_3_16_0_1_1447951003894_4420" dir="ltr">the error happens when you don't specify the conductivity values.</div><div id="yui_3_16_0_1_1447951003894_4495" dir="ltr"><br></div><div id="yui_3_16_0_1_1447951003894_4506" dir="ltr">Best,</div><div id="yui_3_16_0_1_1447951003894_4507" dir="ltr">Maite<br></div> <br><div class="qtdSeparateBR"><br><br></div><div style="display: block;" class="yahoo_quoted"> <div style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 14px;"> <div style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 16px;"> <div dir="ltr"><font face="Arial" size="2"> El Jueves 19 de noviembre de 2015 14:07, Sarang S. Dalal <sarang.dalal@uni-konstanz.de> escribió:<br></font></div> <br><br> <div class="y_msg_container">Dear Martijn,<br><br>Our group routinely computes 4-layer BEM models, but we have written a new pipeline (already implemented within the official FieldTrip pipeline) to effectively replace ft_headmodel_openmeeg. Unfortunately we still need to complete the documentation, but below is an example of how to call it.<br><br>BTW, I am currently comparing the performance between 4-layer and 3-layer BEM for my own MEG data. It seems that 4-layer (i.e., with CSF) might increase the chances of spurious voxels near the brain surface; however, this could be due to imperfect segmentation or sharp edges still present in my surfaces.<br><br>I hope this helps,<br>Sarang<br><br><br><br>subjId = 'test';<br>vol.type = 'openmeeg';<br>vol.basefile = subjId;<br>vol.path = ['./' subjId '/hm/openmeeg_out']; % following files in here can be reused across sessions for same participant: hm.bin, hm_inv.bin, dsm.bin<br>vol.bnd = bnd;<br>switch(length(bnd)) % the number of layers in “bnd” determines whether to use 4-layer or 3-layer<br> case 4<br> vol.cond = [0.33 0.0041 1.79 0.33]; % scalp skull CSF brain<br> case 3<br> vol.cond = [0.33 0.0041 0.33]; % scalp skull brain (no CSF)<br>end<br>vol = ft_convert_units(vol,'mm'); % we do everything in MRI mm space<br><br>% we prefer to do all computations in MRI mm space, so sensor positions need to be transformed<br>grad = data.grad;<br>grad_mm = ft_convert_units(grad,'mm');<br>grad_mri = ft_transform_sens(coreg.meg2mri_tfm, grad_mm); % transforms the grad coordinates to mri coordinates % this is custom for our group; you may have an alternative way<br><br><br>cfg = [];<br>cfg.grad = grad_mri;<br>cfg.grid.warpmni = 'yes';<br>load standard_sourcemodel3d10mm; % loads in sourcemodel (i.e., MNI voxel grid)<br>sourcemodel = ft_convert_units(sourcemodel,'mm');<br>cfg.grid.template = sourcemodel;<br>cfg.grid.nonlinear = 'yes'; % use non-linear normalization<br>cfg.mri = mri;<br>cfg.unit = 'mm',<br><br>cfg.vol = vol;<br>cfg.channel = channel;<br>cfg.reducerank = 'no';<br>cfg.grid.resolution = 5; % in mm<br>grid = ft_prepare_leadfield(cfg);<br><br><br><br><br><br>> Message: 9<br>> Date: Thu, 19 Nov 2015 10:53:55 +0100<br>> From: Alexandre Gramfort <<a ymailto="mailto:alexandre.gramfort@telecom-paristech.fr" href="mailto:alexandre.gramfort@telecom-paristech.fr">alexandre.gramfort@telecom-paristech.fr</a>><br>> To: FieldTrip discussion list <<a ymailto="mailto:fieldtrip@science.ru.nl" href="mailto:fieldtrip@science.ru.nl">fieldtrip@science.ru.nl</a>><br>> Subject: Re: [FieldTrip] Number of shells in OpenMEEG<br>> Message-ID:<br>> <CADeotZrk4zSGstuFMJ=WEKqYCQVqMkFR9SBkhzQUP=<a ymailto="mailto:XCHSAOyg@mail.gmail.com" href="mailto:XCHSAOyg@mail.gmail.com">XCHSAOyg@mail.gmail.com</a>><br>> Content-Type: text/plain; charset=UTF-8<br>> <br>> hi,<br>> <br>> I confirm that OpenMEEG can handle more than 3 layers.<br>> <br>> Best,<br>> Alex<br>> <br>> <br>> On Thu, Nov 19, 2015 at 9:58 AM, Martijn Vlaar - 3ME<br>> <<a ymailto="mailto:M.P.Vlaar@tudelft.nl" href="mailto:M.P.Vlaar@tudelft.nl">M.P.Vlaar@tudelft.nl</a>> wrote:<br>>> Dear all,<br>>> <br>>> <br>>> <br>>> I am interested in including the CSF in the forward model.<br>>> <br>>> <br>>> <br>>> In ft_headmodel_openmeeg at line 75 there is an error message: ?More than 3<br>>> shells not allowed?. In the OpenMEEG documentation I do not find such a<br>>> limitation.<br>>> <br>>> <br>>> <br>>> Could someone clarify why the OpenMEEG-related function in fieldtrip is<br>>> restricted to 1, 2 or 3 shells?<br>>> <br>>> <br>>> <br>>> Thank you in advance!<br>>> <br>>> <br>>> <br>>> Martijn Vlaar<br>>> <br>>> <br>>> <br>>> ________________________________<br>>> <br>>> Ir. Martijn Vlaar<br>>> <br>>> Delft University of Technology<br>>> <br>>> BioMechanical Engineering<br>>> <br>>> Mekelweg 2, 2628 CD Delft, The Netherlands<br>>> <br>>> tel: +31 (0)1527 85625<br>>> <br>>> fax: +31 (0)1527 84717<br>>> <br>>> mobile: +31 (0)618081635<br>>> <br>>> <br>>> <br>>> <br>>> _______________________________________________<br>>> fieldtrip mailing list<br>>> <a ymailto="mailto:fieldtrip@donders.ru.nl" href="mailto:fieldtrip@donders.ru.nl">fieldtrip@donders.ru.nl</a><br>>> <a href="http://mailman.science.ru.nl/mailman/listinfo/fieldtrip" target="_blank">http://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><br>>> <br>>> <br>>> The information in this e-mail is intended only for the person to whom it is<br>>> addressed. If you believe this e-mail was sent to you in error and the<br>>> e-mail<br>>> contains patient information, please contact the Partners Compliance<br>>> HelpLine at<br>>> <a href="http://www.partners.org/complianceline" target="_blank">http://www.partners.org/complianceline </a>. If the e-mail was sent to you in<br>>> error<br>>> but does not contain patient information, please contact the sender and<br>>> properly<br>>> dispose of the e-mail.<br>>> <br>> <br>> <br>> <br>> ------------------------------<br>> <br>> _______________________________________________<br>> fieldtrip mailing list<br>> <a ymailto="mailto:fieldtrip@donders.ru.nl" href="mailto:fieldtrip@donders.ru.nl">fieldtrip@donders.ru.nl</a><br>> <a href="http://mailman.science.ru.nl/mailman/listinfo/fieldtrip" target="_blank">http://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><br>> <br>> End of fieldtrip Digest, Vol 60, Issue 16<br>> *****************************************<br><br>_______________________________________________<br>fieldtrip mailing list<br><a ymailto="mailto:fieldtrip@donders.ru.nl" href="mailto:fieldtrip@donders.ru.nl">fieldtrip@donders.ru.nl</a><br><a href="http://mailman.science.ru.nl/mailman/listinfo/fieldtrip" target="_blank">http://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><br><br></div> </div> </div> </div></div></body></html>