Fieldtrip on Brainstorm

Dear Brainstorm Developers,

I am encountering a problem when trying to use FieldTrip dipole fitting on Intracranial EEG data.
When I run "FielTrip: ft_dipolefitting" on the imported iEEG epochs I can only chose to put for "sensor type" EEG or MEG, if I put "ECOG" Brainstorm/FieldTrip won't process it and gives this error:

Thus I edited the iEEG channel file and changed the "ECOG" channel types to "EEG", and then I did as follows:

But I still received this error:

I've been using a one layer BEM model (OpenMEEG BEM(volume) when performing dipole scanning for iEEG using Brainstorm.
However, with FieldTrip, a head model such as a "3-shell sphere" is required for dipole fitting of EEG data.
When I try to compute the "3-shell sphere" headmodel to the iEEG edf channel file, the option does not exist, I can only choose "OpenMEEG BEM'', as you can see.

Does anyone have any suggestion as to how to make fieldtrip dipolefitting work on iEEG data?
I understand that a "3-shell sphere" headmodel isn't compatible with ECOG or SEEG channels and data, is there another way to have a headmodel that could work with FieldTrip?

Thank you all in advance,
Michel

Hi Michel,

To my knowledge, there is no forward model for SEEG or ECOG that can be computed from FieldTrip. Therefore, no dipole fitting is possible, as the first warning you got mentioned: “Only MEG and EEG sensor types are supported at this moment”. You can ask the question to the FieldTrip developers if you want further details about this. If they have better solutions to recommend, we could work together on adding them to Brainstorm.

Even if you had access to forward models for intracranial electrodes, source reconstruction (dipole fitting or distributed sources) is probably not the best way to process iEEG recordings. With intracranial recordings, you already have access to the source activity, no need to damage your data with the approximate models we use in non-invasive imaging.

Cheers,
Francois

1 Like

Hello Francois,

Thank you very much for your reply, this was very helpful.

I would like to also ask about using OpenMEEG BEM models for FieldTrip dipole fitting on non-invasive data. The only model that works with MEG is the “overlapping spheres (volume)” and with EEG is the “3-shell sphere (volume)”.
Is there any way to use the OpenMEEG BEM models for MEG/EEG FieldTrip dipole fitting on Brainstorm?

Thank you,
Michel

Hi Michel,

The forward model used by FieldTrip is actually not used from Brainstorm but recomputed at each iteration of the dipole fitting procedure. It sets one dipole somewhere, computes a forward model for this dipole, simulates the corresponding EEG or MEG recordings, then moves the dipole in order to minimize the residuals (simulation - actual recordings), and computes everything again. The forward model is estimated at each step, possibly tens or hundreds of times. Computing a realistic BEM model at each iteration is not an option.

The only information we pass from Brainstorm to FieldTrip for the dipole fitting is the position of the spheres (the “head model” in FieldTrip). The actual forward solution is not used.

Francois

1 Like

Hi All,

I'm Ioanna and I'm a PhD student in Queen Mary University of London, doing EEG research on music learning and creativity :slight_smile:

My question is on using Brainstorm and FieldTrip interchangeably to do beamforming analysis on EEG data recorded by a 64-channel EGI system.

I haven't found an option to compute the cross-spectral density matrix for the beamforming in Brainstorm. On the other hand, Brainstorm was really good in creating a head model for the 64-channel EGI system my data were recorded with.

Therefore, I was wondering if I could:

  1. Calculate the cross-spectral density in Fieldtrip (ft_freqanalysis)
  2. Create the head model in Brainstorm
  3. Run the source analysis in Fieldtrip (ft_sourceanalysis) using the head model from Brainstorm

How can I use the head model (as computed in Brainstorm) in FieldTrip for the ft_sourceanalysis function?

Any help/suggestion/idea is more than welcome!

Thanks so much in advance,
Ioanna

Hi Ioanna,

Indeed, there are still many missing bridges between Brainstorm and FieldTrip.
You could probably find some inspiration in the code of process_ft_sourceanalysis.m:

In general, you can convert structures from Brainstorm to FieldTrip with the functions out_fieldtrip_....m, and from FieldTrip to Brainstorm with in_..._fieldtrip.m.
There are maybe some configurations that are not handled correctly by these conversion functions, let me know and I'll trying fixing them.

Please let me know if you find a way to do what you need with these functions. And if you feel like helping us improving the software, you're more than welcome to post your contributions as new PR on the Brainstorm github repository.

Cheers,
François