[FieldTrip] Number of shells in OpenMEEG

Martijn Vlaar - 3ME M.P.Vlaar at tudelft.nl
Fri Nov 20 10:45:42 CET 2015


Dear all,

Thanks for the helpful replies! I have just tried, and it indeed runs fine when you specify 4 conductivity. Guess I was confused by the specific error message: “More than 3 shells not allowed”. Perhaps this message can be made more accurate: “Conductivity values need to be explicitly specified when using 2 shells or more than 3 shells.”.

Regards, Martijn

From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Maité Crespo García
Sent: donderdag 19 november 2015 17:58
To: FieldTrip discussion list
Subject: Re: [FieldTrip] Number of shells in OpenMEEG

Dear Martijn,

the error happens when you don't specify the conductivity values.

Best,
Maite


El Jueves 19 de noviembre de 2015 14:07, Sarang S. Dalal <sarang.dalal at uni-konstanz.de<mailto:sarang.dalal at uni-konstanz.de>> escribió:

Dear Martijn,

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.

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.

I hope this helps,
Sarang



subjId = 'test';
vol.type = 'openmeeg';
vol.basefile = subjId;
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
vol.bnd = bnd;
switch(length(bnd)) % the number of layers in “bnd” determines whether to use 4-layer or 3-layer
    case 4
        vol.cond = [0.33 0.0041 1.79 0.33]; % scalp skull CSF brain
    case 3
        vol.cond = [0.33 0.0041 0.33]; % scalp skull brain (no CSF)
end
vol = ft_convert_units(vol,'mm'); % we do everything in MRI mm space

% we prefer to do all computations in MRI mm space, so sensor positions need to be transformed
grad = data.grad;
grad_mm = ft_convert_units(grad,'mm');
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


cfg = [];
cfg.grad                  = grad_mri;
cfg.grid.warpmni  = 'yes';
load standard_sourcemodel3d10mm; % loads in sourcemodel (i.e., MNI voxel grid)
sourcemodel  = ft_convert_units(sourcemodel,'mm');
cfg.grid.template = sourcemodel;
cfg.grid.nonlinear = 'yes'; % use non-linear normalization
cfg.mri            = mri;
cfg.unit = 'mm',

cfg.vol                  = vol;
cfg.channel = channel;
cfg.reducerank = 'no';
cfg.grid.resolution = 5; % in mm
grid              = ft_prepare_leadfield(cfg);





> Message: 9
> Date: Thu, 19 Nov 2015 10:53:55 +0100
> From: Alexandre Gramfort <alexandre.gramfort at telecom-paristech.fr<mailto:alexandre.gramfort at telecom-paristech.fr>>
> To: FieldTrip discussion list <fieldtrip at science.ru.nl<mailto:fieldtrip at science.ru.nl>>
> Subject: Re: [FieldTrip] Number of shells in OpenMEEG
> Message-ID:
>     <CADeotZrk4zSGstuFMJ=WEKqYCQVqMkFR9SBkhzQUP=XCHSAOyg at mail.gmail.com<mailto:XCHSAOyg at mail.gmail.com>>
> Content-Type: text/plain; charset=UTF-8
>
> hi,
>
> I confirm that OpenMEEG can handle more than 3 layers.
>
> Best,
> Alex
>
>
> On Thu, Nov 19, 2015 at 9:58 AM, Martijn Vlaar - 3ME
> <M.P.Vlaar at tudelft.nl<mailto:M.P.Vlaar at tudelft.nl>> wrote:
>> Dear all,
>>
>>
>>
>> I am interested in including the CSF in the forward model.
>>
>>
>>
>> In ft_headmodel_openmeeg at line 75 there is an error message: ?More than 3
>> shells not allowed?. In the OpenMEEG documentation I do not find such a
>> limitation.
>>
>>
>>
>> Could someone clarify why the OpenMEEG-related function in fieldtrip is
>> restricted to 1, 2 or 3 shells?
>>
>>
>>
>> Thank you in advance!
>>
>>
>>
>> Martijn Vlaar
>>
>>
>>
>> ________________________________
>>
>> Ir. Martijn Vlaar
>>
>> Delft University of Technology
>>
>> BioMechanical Engineering
>>
>> Mekelweg 2, 2628 CD Delft, The Netherlands
>>
>> tel: +31 (0)1527 85625
>>
>> fax: +31 (0)1527 84717
>>
>> mobile: +31 (0)618081635
>>
>>
>>
>>
>> _______________________________________________
>> fieldtrip mailing list
>> fieldtrip at donders.ru.nl<mailto:fieldtrip at donders.ru.nl>
>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip
>>
>>
>> The information in this e-mail is intended only for the person to whom it is
>> addressed. If you believe this e-mail was sent to you in error and the
>> e-mail
>> contains patient information, please contact the Partners Compliance
>> HelpLine at
>> http://www.partners.org/complianceline . If the e-mail was sent to you in
>> error
>> but does not contain patient information, please contact the sender and
>> properly
>> dispose of the e-mail.
>>
>
>
>
> ------------------------------
>
> _______________________________________________
> fieldtrip mailing list
> fieldtrip at donders.ru.nl<mailto:fieldtrip at donders.ru.nl>
> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip
>
> End of fieldtrip Digest, Vol 60, Issue 16
> *****************************************

_______________________________________________
fieldtrip mailing list
fieldtrip at donders.ru.nl<mailto:fieldtrip at donders.ru.nl>
http://mailman.science.ru.nl/mailman/listinfo/fieldtrip
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20151120/eb4a27af/attachment.html>


More information about the fieldtrip mailing list