Skip to content

Commit 5b3f77b

Browse files
authored
Update EEGLAB_and_MEG_data.md
1 parent 72624ab commit 5b3f77b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tutorials/misc/EEGLAB_and_MEG_data.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,15 +79,15 @@ Then we select MEG channels since this dataset contains both EEG and MEG data. U
7979

8080
Then call menu item <span style="color:brown">Tools > Source localization using DIPFIT > Create a head model from an MRI</span>. A window asks you to choose an MR head image, and the following GUI appears. In this example, we use file name "sub-01_ses-mri_acq-mprage_T1w.nii.gz" from the anat folder.
8181

82-
![Screen Shot 2022-12-11 at 3 35 19 PM](https://user-images.githubusercontent.com/1872705/206955411-513057c1-46e4-4f7c-ab77-c11493feedb0.png)
82+
![Screenshot 2025-10-28 at 13 53 16](https://github.com/user-attachments/assets/95e421ef-18c1-49c1-a3fb-f32beb3e8722)
8383

8484
This will first pop up the fiducials. The fiducials are automatically aligned with the MR head image in this example. However, it is always good to check the alignment. We can see below that the fiducials are where we would expect them to be (the thin blue lines indicate their positions).
8585

8686
![Screen Shot 2022-12-11 at 3 37 03 PM](https://user-images.githubusercontent.com/1872705/206935920-b0f5e662-8571-40af-bba3-709eed80e306.png)
8787

8888
Then the MRI is segmented into the brain, skull, and scalp, and meshes are extracted. It is important to note that it is better to use Freesurfer to segment MRI and create meshes, as it is a more precise (albeit more time-consuming process). The [pop_dipfit_headmodel.m](http://sccn.ucsd.edu/eeglab/locatefile.php?file=pop_dipfit_headmodel.m) uses the "bemcp" method, a module external to Fieldtrip, to extract meshes. Again, this is the most cross-platform compatible solution but might not be the best one.
8989

90-
![Screen Shot 2022-12-11 at 7 39 20 PM](https://user-images.githubusercontent.com/1872705/206955695-e1522efe-793e-4fcc-a3ed-4b8573db67cf.png)
90+
![Screenshot 2025-10-28 at 13 54 28](https://github.com/user-attachments/assets/149060b8-ec2e-4c98-b8c6-26de5691ddd2)
9191

9292
Once this is done, call menu item <span style="color:brown">Tools > Source localization using DIPFIT > Head model and settings</span>. We can see that the head model, MRI, and associated coordinate landmarks are blanked out. The graphic interface also shows that we are editing a custom head model in the Fieldtrip format.
9393

@@ -107,7 +107,7 @@ When the anatomical MRI is not available, not all is lost. For example, this [pu
107107

108108
One way to fix this and use a template head model is to use the location of the EEG channels when they are available. EEG channels are usually scanned in the same coordinate space as the MEG sensors, so aligning and stretching the MEG head model to match the channel coordinates should be able to fix the problem above. A *headshape.pos* file is also sometimes available along with the MEG. It contains data points lying on the head of the subject and may be used to align the MEG sensor space to the anatomical MRI. However, this file may also be used to align and stretch the EEGLAB template MEG boundary element model to match the subject's head. To use this file, create a random data array on the MATLAB command line with the same number of scanned positions *a=rand(150, 1000);* and import it as a MATLAB array. Then, call the channel editor and import the *headshape.pos* file as an *SFP* file. You can then align the scanned position with the BEM head model. Write down the homogeneous transformation matrix and reuse it for the MEG model alignment.
109109

110-
Using templace head model for MEG
110+
Using template head models for MEG
111111
---------------------------------
112112
Although it is preferable to use the subject's MRI, it is possible to use the template MNE head model with MEG data. The alignment between the head model and the sensors may be performed using Fiducials. EEG and MEG will use the same boundary element model. For MEG, only the inner surface of the model is being used. Model fitting is performed using FieldTrip.
113113

0 commit comments

Comments
 (0)