Dear Carsten,

I actually see now that the option to use OpenMEEG is already in the
code of the present version 4010. If you look in spm_eeg_inv_forward
around line 88, you'll find it there. It's just not in the GUI, which
is easy to fix by adding 'OpenMEEG BEM' to the list in
spm_eeg_inv_forward_ui. I'm sure Alexandre will be glad to help you
with installation. I suspect on LINUX it's more straightforward than
on Windows.



On Mon, Feb 14, 2011 at 9:58 PM, Carsten Stahlhut
<[log in to unmask]> wrote:
> Dear Vladimir,
> Thanks for clarifying the issue with the physical units - that confirmed a
> little suspicion on my that it would probably be better for me to leave out
> the units in some plots that I did of reconstructed sources.
> Yes, indeed the platform is also one my concerns - however, I think it
> should work with Linux.
> Regarding the computation time - my impression is that it is very fast
> compared to other FEM implementations and almost just as fast as computing
> BEM solutions. I guess the reason why I suddenly found the SimBio's FEM head
> model very appealing was that in one of their recent papers (see e.g. the
> attached paper page 1926), they claim that with a grid of 2 * 2 * 2 mm^3
> they can build a FEM with 71 electrodes in less than 22 min and less than 38
> min for a sensor configuration of 258 electrodes! That's quite an
> improvement.
> All of this is performed just on a Linux-workstation - Intel Core 2 Duo
> E6600 processor (2.4 GHz) with 4 GB memory.
> Thanks for bringing the OpenMEEG software to my attention. I think that's a
> really good alternative. Yes, that would be really great if I would send me
> your code for using the OpenMEEG BEM implementation.
> Best,
> Carsten
> 2011/2/14 Vladimir Litvak <[log in to unmask]>
>> Dear Carsten
>> On Fri, Feb 11, 2011 at 11:56 PM, Carsten Stahlhut <[log in to unmask]> wrote:
>> > Dear Vladimir,
>> >
>> > I have approx three questions (or issues) that I hope you can help me
>> > out
>> > with.
>> >
>> > Do you know what the units are for the lead field matrix and the source
>> > estimates in SPM8?
>> These are two different questions.
>> > If you apply one of the EEG imaging methods (as I understood it) then
>> > the
>> > source estimates should be current density i.e. the unit should be
>> > something
>> > like A/m^2  or uA/mm^2 depending on the scaling of the EEG data and lead
>> > field matrix.
>> > And then the units of the lead field should be something like m^2 * Ohm
>> > ( =
>> > m^2 / S ).
>> In theory the forward computation done by the 'forward' toolbox should
>> be unit-blind so the units of the lead field should depend on units of
>> the head model (mm in SPM). In practice this might not be the case. We
>> recently found a difference in scaling between 'single shell' and
>> other MEG models. This will be fixed in the next update. There might
>> be something similar also for EEG. SPM is not sensitive to it but it's
>> still something worth looking into.
>> > Does this also holds for SPM8 or do there exist any type of scaling of
>> > the
>> > lead field matrix such as a normalization of the columns or something
>> > like
>> > that?
>> >
>> Yes, there are several scaling and normalization steps so the units of
>> the output images are not related to original physical units but are
>> normalize to the total power across sources and conditions.
>> > The second question is related to the lead field matrix as well. If I
>> > compare two different head models a BEM and 3-spheres model then they
>> > seem
>> > to be on two very different scales - is that really the case? Or am I
>> > missing an important step? Of course it is two very different head model
>> > assumptions so they should be quite different but I'm a bit surprised
>> > that
>> > there exists a scaling factor of 100 between the largest element in the
>> > BEM
>> > gain matrix and the 3-spheres gain matrix.
>> See above.
>> > What I just did was to load the mat-files with the gain-matrices and
>> > used
>> > the imagesc-function to show the amplitudes of the two lead field
>> > matrices.
>> >
>> > The 28th Jul 2010 you sent an answer to a post regarding head models and
>> > you
>> > here mentioned that FEM head models from SimBio might be an option in
>> > the
>> > very nice MEEGTool. I was wondering what the status is on integrating
>> > the
>> > SimBio FEM implementation with SPM, as I'm very interested to try out
>> > the
>> > FEM head models. I guess there is no reason that I will try to write the
>> > code my self if the option is almost done and will be part of the
>> > MEEGTool.
>> >
>> I am aware of some efforts to integrate SimBio support in the forward
>> toolbox. Even if this is done I don't expect it to become one of the
>> standard options in SPM because SimBio runs only on a particular Unix
>> platform (I'm not even sure it's LINUX) and I suspect has very lengthy
>> computing time. But if you compute a gain matrix for the canonical
>> mesh in SimBio you can just replace the mat file generated by SPM with
>> your file and it will be used by spm_eeg_invert. If there is
>> inconsistency in units, it shouldn't be a problem.
>> There is also a possibility to use another BEM implementation OpenMEEG
>> ( That's something
>> that works and I tested it last year, but found it impractical for
>> most users again because of difficulties with installation and long
>> computation time (about 24 h for normal mesh). The differences in the
>> lead fields with our BEM were only for a small number of vertices
>> close to the surface. But I can give you the glue code for this if you
>> want.
>> Best,
>> Vladimir
>> > Best,
>> > Carsten
>> >
>> >
>> >
> --
> Carsten Stahlhut
> Section for Cognitive Systems
> Department of Informatics and Mathematical Modelling
> Richard Petersens Plads, Building 321
> Technical University of Denmark
> DK-2800 Kongens Lyngby, Denmark