[FieldTrip] questions about forward calculations

Schönherr, Margit Margit.Schoenherr at uk-erlangen.de
Thu Oct 27 13:16:24 CEST 2011


Hello Alex and Cristiano,

thanks for your reply. I have used the code below to compute the BEM volume conductor, and with this I get the units I described in my mail.

mri_segment.seg = mri_segment.scalp + mri_segment.skull + 2*mri_segment.brain;
cfg_vol                = [];
cfg_vol.tissue         = [1 2 3];
cfg_vol.numvertices    = [800 1000 2000];
cfg_vol.conductivity   = [1 1/80 1];
cfg_vol.isolatedsource = true;
cfg_vol.method         = 'openmeeg';
cfg_vol.sourceunits    = 'mm';
cfg_vol.mriunits       = 'mm';
vol = ft_prepare_bemmodel(cfg_vol, mri_segment);


How can I ensure that my BEM surfaces are expressed in m? I have tried 2 possibilities which ended with an error and I had to quit openmeeg.

The first, I changed the translation vector of mri_segment.transform (division by 1000) and set mri_segment.unit = 'm' and tried the same code as above.

Second, I tried this:
cfg             = [];
cfg.method      = 'segmentation';
cfg.tissue      = [1 2 3];
cfg.numvertices = [2000 1000 800];
cfg.sourceunits = 'mm';
cfg.mriunits    = 'mm';
bnd = ft_prepare_mesh(cfg, mri_segment);

bnd(1,1).pnt = bnd(1,1).pnt / 1000;
bnd(1,2).pnt = bnd(1,2).pnt / 1000;
bnd(1,3).pnt = bnd(1,3).pnt / 1000;

vol = [];
vol.bnd = bnd;
vol.cond = [1 1/80 1];
cfg.method = 'openmeeg';
vol = ft_prepare_bemmodel(cfg, vol);

Both attempts produced this error:
| ------ om_minverser 
| ./tpf724544e_8af4_4678_aa5c_b9dc37660560.bin 
| ./tpd041303a_5fee_44ad_8d5d_8e7d4578f0d3.bin 
| ----------------------- 
Exception: Unable to open the file ./tpf724544e_8af4_4678_aa5c_b9dc37660560.bin for reading Doing my best.... 
 
This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information. 
Warning: an error ocurred while running OpenMEEG 
> In openmeeg at 121
  In ft_prepare_bemmodel at 232
Error using ==> fread
Invalid file identifier.  Use fopen to generate a valid file identifier.
Warning: File 'tp2fef7d04_3155_4852_ab97_121fa2fc7892.bin' not found. 
> In openmeeg>cleaner at 136
  In openmeeg at 123
  In ft_prepare_bemmodel at 232
Warning: File 'tp645538cf_3b4a_4e28_8a13_c061c7fca25a.bin' not found. 
> In openmeeg>cleaner at 137
  In openmeeg at 123
  In ft_prepare_bemmodel at 232


Thanks for your help!
Best,
Margit

________________________________________
Von: Micheli, C. [c.micheli at fcdonders.ru.nl]
Gesendet: Mittwoch, 26. Oktober 2011 11:24
An: Email discussion list for the FieldTrip project
Cc: Schönherr, Margit
Betreff: Re: [FieldTrip] questions about forward calculations

Hi Margit
I could replicate the behavior that you described in point 1) the last email and at the moment we are checking that all required options within FieldFrip and OpenMEEG are set correctly.
For your points 2) and 3) I could not replicate the problem. Everything should work fine if the units of the sensors and the volume conductor are consistent.
However, we are working to make units management more handy for the users, so that ambiguities like this can be solved. Please, keep posted on the mailing list to track the changes in the near future.

Could you maybe paste your source code here in the mailing list?

Cheers,
Cristiano




----- "Alexandre Gramfort" <alexandre.gramfort at inria.fr> schreef:

> Van: "Alexandre Gramfort" <alexandre.gramfort at inria.fr>
> Aan: "Email discussion list for the FieldTrip project" <fieldtrip at donders.ru.nl>, "c micheli"
> <c.micheli at fcdonders.ru.nl>, "Margit Schoenherr" <Margit.Schoenherr at uk-erlangen.de>
> Verzonden: Dinsdag 25 oktober 2011 15:41:10
> Onderwerp: Re: [FieldTrip] questions about forward calculations
>
> Hello Margit,
>
> > I have some questions regarding forward computations.
> >
> > 1) How is the definition of the EEG leadfield - does the dipole
> point from red to blue or from blue to red? I obtain different results
> when I compute the leadfield of the same dipole either with a
> 3-concentric-spheres volume conductor or with BEM (openmeeg).
>
> do you say that you get different polarity for sphere and OpenMEEG?
> if
> it's the case my only
> guess it that the triangles of the boundary meshes are not properly
> oriented. Maybe Cristiano
> who looked at this recently can comment.
>
> does the toy example behave properly? In
> external/openmeeg/openmeeg_eeg_leadfield_example.m
>
> > 2) In which units are the leadfields given? For the
> 3-concentric-spheres volume conductor, the magnitude of the field is
> 70, for BEM 2e-5.
>
> If the input meshes passed to OpenMEEG are in meters and dipole
> currents in Am then the leadfield should give EEG potentials in V.
>
> > 3) Also for MEG, the BEM leadfield is 1e-6 times smaller than the
> single sphere. For the single sphere model, the field strength is
> 1e-5. I think, this is Tesla and corresponds to a 1 Am dipole. But the
> BEM forward field of the same dipole has strength 1e-11. What is the
> unit here?
>
> Make sure your BEM surfaces are expressed in meters and not
> millimeters like it is often the
> case in MRI coordinates, and tell me if you still see some
> inconsistent results.
>
> Best,
> Alex
> --
> Alexandre Gramfort, PhD
> gramfort at nmr.mgh.harvard.edu
> Dept. of Radiology MGH Martinos Center / Harvard Medical School
> http://www-sop.inria.fr/members/Alexandre.Gramfort/
>
> _______________________________________________
> fieldtrip mailing list
> fieldtrip at donders.ru.nl
> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip




More information about the fieldtrip mailing list