[FieldTrip] issue with FieldTrip-SimBio pipeline for EEG FEM forward solution

Johannes j.vorw01 at gmail.com
Fri Feb 22 11:40:28 CET 2019


Dear Pierre,

if you are running a recent version of FieldTrip (newer than Dec 15, 2018),
there should be a check included in ft_prepare_vol_sens to avoid this
behavior, i.e., if a transfer matrix is detected in the vol-struct provided
to ft_prepare_vol_sens, it is checked if whether this fits to the indicated
sensor configuration and if this is the case no new transfer matrix is
computed. This should also work if a subset of sensors is selected. Thus,
it would be great, if you could check whether this behavior remains when
using a recent checkout of FieldTrip.

Regarding the time requirement for computing the transfer matrix - the
calculation in sb_transfer can be easily parallelized by replacing l 35 in
sb_transfer with a parfor loop, e.g., parfor(i=2:length(vol.elecnodes),8),
if you want to compute on 8 cores.

I hope this answer is helpful to you!

Best,
    Johannes

Am Do., 21. Feb. 2019 um 17:17 Uhr schrieb Pierre Bastien Megevand <
Pierre.Megevand at unige.ch>:

> Dear all,
>
>
> I think I have found an inconsistency in the way Fieldtrip handles the
> building of a FEM forward solution. I am following the procedure
> described in Vorwerk, Oostenveld et al., The FieldTrip-SimBio pipeline
> for EEG forward solutions. Biomed Eng Online. 2018 (
> https://biomedical-engineering-online.biomedcentral.com/articles/10.1186/s12938-018-0463-y).
> This procedure suggests to build the forward solution by calling the
> following Fieldtrip functions:
>
> ft_read_mri
>
> ft_volumerealign
>
> ft_volumereslice
>
> ft_volumesegment
>
> ft_prepare_mesh
>
> ft_prepare_headmodel
>
>     ft_read_header (to get electrode data)
>
>     ft_electroderealign
>
> ft_prepare_vol_sens
>
> ft_prepare_sourcemodel
>
> ft_prepare_leadfield
>
>
> My issue is the following: the FieldTrip-SimBio pipeline explicitly calls
> ft_prepare_vol_sens, which takes very long to execute (over 6 hours in the
> case of the published paper, which used about 80 electrodes). However,
> ft_prepare_leadfield later calls (line 165) prepare_headmodel, which
> itself calls (line 113) ft_prepare_vol_sens again, with the same
> parameters as far as I can tell (and again taking ages to run).
>
>
> Is this redundancy intended? If not, can it be circumvented?
>
>
> Thank you in advance,
>
>
> Pierre
>
>
> Pierre Mégevand, MD, PhD
> Senior research associate, Dept. of basic neurosciences
> Faculty of medicine, University of Geneva, Switzerland
> T. +41 76 693 65 22 | pierre.megevand at unige.ch
>
> _______________________________________________
> fieldtrip mailing list
> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip
> https://doi.org/10.1371/journal.pcbi.1002202
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20190222/bfbf8d29/attachment-0002.html>
-------------- next part --------------
_______________________________________________
fieldtrip mailing list
https://mailman.science.ru.nl/mailman/listinfo/fieldtrip
https://doi.org/10.1371/journal.pcbi.1002202


More information about the fieldtrip mailing list