Dipole scanning and importing
Authors: Elizabeth Bock, Francois Tadel, John C Mosher
In Brainstorm, the brain activity is typically estimated with distributed source models including thousands of dipoles, and represented as cortical maps or functional overlays on the MRI. Another commom way of representing the source activity is to consider that there is only one single dipole that is active and that can explain most of the MEG/EEG recordings.
We offer two options to estimate the position and orientation of the most significant dipole at each time point: a dipole scanning method, which selects the most significant dipole in a grid of dipoles that are already estimated, and a non-linear dipole fitting method, which searches iteratively for the dipole that explains the best the recordings. The former is described on this page, the latter in another tutorial: FieldTrip dipole fitting.
The example below uses the protocol TutorialIntroduction created in the introduction tutorials.
Select the protocol TutorialIntroduction. Go to the view "Functional data (sorted by subjects)".
In the imported Run01, right-click on the head model > Compute sources 2016 > Dipole modeling
- This option is not a distributed source model like the minimum norm, that inverts the head model and explain all recordings with all the sources at once. It represents the performance of each individual dipole, ie. its capacity to explain all the recordings at one time sample on its own.
At each point of the grid, three dipoles with orthogonal directions (x,y,z) are considered, just like the unconstrained minimum norm results.
- You can display this result in the same way as the minimum norm solutions, but you have to be cautious with the interpretation of the figure. The value at each point does not indicate the current density but the ability of the corresponding dipole to explain all the recordings. The highest values indicate the best fitting dipoles. If you see two regions with high values, it doesn't mean that there are two sources but that if there was one source only, it could be located in either of these regions.
Open the new dipole model file for the standard condition, and go to 100ms. We expect two sources to be activated (left and right auditory cortices), but we observe mostly high dipole performance only in the left hemisphere, while the distributed minimum norm solution was detecting correctly the bilateral activity. The response on the left side being much higher in amplitude than the right one, the dipoles one the left are better capable of explaining all the recordings on their own.
For more information about the impossibility to represent multiple sources with a single dipole, you can refer to the tutorial FieldTrip dipole fitting. We will keep on working with this example to illustrate the dipole scanning process, but we need to keep in mind that it will not be able to explain our recordings properly.
For a more meaningful example, refer to the tutorial EEG and epilepsy.
The process Sources > Dipole scanning searches the grid of dipoles computed previously for the most significant location. The information from the three orientations (x,y,z) are combined to get the optimal orientation at the best location.
- In Process1, select the dipole model file for the standard condition.
Run process Sources > Dipoles scanning: Time window=[60,100]ms
Double-click on the file to open it. For help on how to manipulate this view, see this tutorial.
The processed selected the most significant dipole at each time sample in the selected time window (60ms-100ms).
Displaying dipoles [TODO]
We have 25 dipoles saved in this file, one per time sample between 60ms and 100ms. You can use the Dipoles tab to display only the most significant dipoles, and change the way they are colored.
- Filter dipoles:
Goodness of fit: Select only the dipoles with the highest goodness of fit.
ConfVol: Select only the dipoles with the lowest confidence volume (for Neuromag Xfit).
Chi-sqr: Select only the dipoles with the lower fitting error (sum((recordings-model)2)).
- Display filters:
Show max goodness of fit: Select only the dipole with the highest goodness of fit (among the dipoles matching the other selection filters).
Show all times: Selects the dipoles from all the time points, otherwise only the dipole corresponding to the current time is displayed (if it matches the other selection filters).
- Color dipoles according to:
Time: The color codes for the time sample at which the dipole was estimated (mostly useful when the option "show all times" is selected). Blue dipoles correspond to the beginning of the time window we scanned (60ms in this example), and red values to the end (100ms).
Goodness of fit: The color codes for the goodness of fit, in percent between 0 and 100.
Group: When multiple groups of dipoles are available in the file, all the dipoles from the same group would be displayed with the same color. This applies to dipoles estimated with Neuromag Xfit, or for dipole files that have been merged together).
Click on the dipole to get detailed information about its position, amplitude and significance.
Significance mesures [TODO]
The various measures are computed in this way:
Neuromag Xfit and CTF DipoleFit
Brainstorm can import dipoles that have been generated using external software:
Neuromag Source Modeling module, xfit: The .bdip format is described in bdip_format.pdf. For more information about xfit and the bdip format see Neuromag Software Manuals.
CTF DipoleFit: The DipoleFit software and the .dip format is described in the CTF Software Manuals.
- Select the study where you want to import the dipole file
- Right click and select ‘Import dipoles’ (Figure 1)
For Neuromag, you will be prompted to specify the number of subsets used for dipole fitting. In most cases, this will be one. If subsets are used, as defined in the text file $HOME/.meg_analysis/xfit_selections, then the number of subsets used needs to be input when prompted. (Figure 2)
When displaying dipole files with multiple groups and/or subsets, the Loaded dipoles panel appears with a list of dipoles, grouped according to event (Group #1, Group#2, etc) and by channel subset, if used (Subset #1, Subset#2, etc.)
- Select the Group(s) to plot
- Clicking on a subset will select all Groups with that subset. For example, selecting Subset #1 will select Group #1 (1), Group #2 (1), Group #3 (1), etc.
Example 1 shows 5 subsets (channel groups of Left, Right, Anterior, Posterior, All Channels). When subset #2 is selected, dipoles fitted to the right channels are displayed. In this case, Show all time is selected for the 4 Groups (events) and colored according to Goodness of Fit
Example 2 shows all groups and subsets at one time point (0.3 ms), with goodness of fit greater than 80%, colored according to Group.
Tutorial: EEG and epilepsy: Dipole scanning
Tutorial: Dipoles: FieldTrip dipole fitting
Tutorial: Source estimation