How to upload electrode locations for computing the head model


I am working on EEG signals for my thesis, and I am using Brainstorm in order to create a head model and solve the forward problem to get a leadfield matrix.

I would like to ask about the leadfield matrix. I have my own EEG data recorded using ANTNeuro, which I preprocessed using EEGlab and then did the epoching. I have no anatomy information for my subjects, so I will be using the default anatomy on Brainstorm. My question is: do I have to import my EEG data to acquire the leadfield? Also, if the leadfield matrix depends on the anatomy and sensor position only without the EEG data, how do I put my sensor locations in Brainstorm if needed since I do not follow the 10-20 system? My sensor locations follow the "standard_waveguard64_duke".

No, you do not need to import the data. However, as you mention you must have an anatomy, and the position of the electrodes with respect to it.

The steps would be:

  1. Create a new Subject and select the option Yes, use default anatomy
  2. Right-click on the Subject > New Folder
  3. Right-click on the New Condition > Use default EEG cap > ICBM152 > ANT > ANT waveguard 64 duke
  4. Right-click on the Channel file > Compute head model

Between step 3 and 4 you may want to check the number of electrodes and their labels.

The leadfield matrix would be inside the headmodel file:

Thank you for your reply. I still have some questions, please.

While computing the head model, I got this message in the pop-up window:

"Surfaces or MEG/EEG recordings have already been imported for subject "@default_subject."

Editing the MRI orientation or the position of the NAS/LPA/RPA anatomical fiducials might break the coregestration between the different files, you might have to import everything again. THERE IS NI UNDO BUTTON - MAKE A BACKUP FIRST.

Are you sure you want to edit the MRI volume now? "

I clicked no so this popped up:
Default Anatomy

I proceeded to choose OpenMEEG and compute the head model.

My question is: Since I used the default anatomy, do I still have to fix the position of the NAS/LPA/RPA anatomical fiducials? Also, if there was a difference in the orientation of the electrodes after I displayed them, can this be fixed?

Hello, @Raymundo.Cassani

Thank you very much for your help.

The leadfield matrix that I obtained had 63 rows (electrodes) instead of 64. So I guess there is something wrong with what I did. Any suggestions where the mistake could be?

Isn't that the ANT waveguard 64 duke consist of 63 electrodes?
electrode layouts | ANT Neuro


Thank you for your reply, @Raymundo.Cassani.
There should be an electrode in the frontal region, right in the center, called 0Z. The description says 64 electrodes, as shown below, and I don't know why it shows 63. In my data, I have all 64 electrodes.

What do you suggest I do, please?

HI @ismatalmadani

Do you have the locations and the names of your EEG channels?
you can either compare the ones that you have with the ones that the Brainstorm template and find the missing one.

Or you can also import your EEG channels and use them for the leadfield computation.

Since the position for 0Z is not available in other waveguard equidistant hexagonal layouts. You can review your raw data, then import the electrode positions with the ANT waveguard 64 duke cap, this will update the positions for the 63 channels that are available, lastly you would need to add manually the location for 0Z.

EDIT: Is the position 0Z the electrode for ground (GND)? If so, isn't its time series flat?

1 Like

Thank you for your replies.

@Raymundo.Cassani The 0Z electrode is in the frontal region (placed on the forehead), and it has data, so the time series have different values.

@Raymundo.Cassani @tmedani
Here, I did not import my data to brainstorm, but I added my electrode positions. They are correct and are 64 electrodes with 0Z in the center of the forehead, but I have to fix the cap on the head now. How do I get the coordinates? I am using the default anatomy. I can set them by looking at the MRI but how do I make sure it is accurate.

Also, I will try what is suggested and update you here again.

From this figure, the locations of the electrodes are not aligned with the head template. Something is wrong, you can not perform your lead field computation.

@tmedani Since I am using the default anatomy, if I can get the coordinates of the NAS/LPA/RPA anatomical fiducials, it will be fixed. Where can I get these coordinates? I tried the ones in the tutorial but they were not for the default anatomy.

Sorry if the discussion is too long now, but I need to get done with this asap as my whole work depends on it.

@tmedani @Raymundo.Cassani
Update: I used "Refine using head points" and got this result. I want to make sure it is correct. Some sensors, as seen below, are a bit on the inside. I got this result without adding my data.
Also, could you please tell me if I have to fix the coordinates of the NAS, LPA, or RPA if the anatomy imported is the default anatomy?

I have labeled the electrodes so you can tell which ones are in front and which are inthe back

Those are stored in the MRI file

This process will find the best match between the points and the head (scalp) surface. This is commonly used when there is the subject's anatomy and points digitized from the subject. In your case unless the electrode positions come from position in the same default anatomy (which is not likely the case), it cannot be ensure the electrode positions are correct. To address this, we have already registered electrodes for many EEG caps including the one you are using, these positions are correct for the default anatomy. Proceed as mentioned here:

The fiducials are already located in the default anatomy. Check the Subject properties, right-click on the Subject > Edit subject, and check if the option Yes, use default anatomy is selected.

I will proceed with that. I want to ask if you could give me an idea of how to add the location of the missing electrode. Thank you,

Hello again @Raymundo.Cassani

I want to ask for some guidance on how to add the missing electrode, please.

After importing EEG data and then choosing the electrode positions with the ANT waveguard 64 duke cap, if I add my own locations, it still does not detect the missing electrode.

Link your data, a 64-electrode channel file will be create.
Add the locations of the electrodes using the default anatomy (if the Subject is using default anatomy).
It will update the location of 63 channels, this is to say, all but 0z

You can edit the position of 0z by editing the channel file. Coordinates are in SCS and in meters.

This electrode has no been aligned to the default anatomy, you would need to propose the position. To do this, open the MRI viewer, and click on the desired place, the SCS coordinates in millimeters are displayed in the bottom part.

Dear @Raymundo.Cassani I hope you still remember my issue.

1- I have imported my Data and a 64-electrode channel file was created. When I right-click on it and choose add EEG positions>ICBM 152> ANT> ANT duke 64, I get this:

2- Also, I would like to ask if it is correct if I import my own locations and then use MRI registration>refine using head points and the project electrodes to surface. This while using the default anatomy.

3- I want to ask if it is correct to use default anatomy and (use default EEG cap) and then add an electrode manually from the MRI registration>Edit.

I hope you help me with my issue as I am running out of time.

This happens because the imported channels do not match the names of the select cap. You can either edit the channel names, or import a file format that already contain the names.

You indicated in the initial post, that "[you] have no anatomy information for my subjects, so I will be using the default anatomy on Brainstorm." If this is the case, there is not point on refining the using head points.

It does not make much sense to me. The cap you want to use is already registered with the Default anatomy in Brainstorm, why do you want to re-do the electrode location?

The suggested path would be:

  1. Link your recordings (64 channels)
  2. Edit the channel file to rename the channels to the names in the ** ANT waveguard 64 duke** cap
  3. Add the EEG positions using: Add EEG positions > ICBM152 > ANT > ANT waveguard 64 duke. This will update the placement for 63 channels
  4. Manually adjust the position for 0z

@Raymundo.Cassani Thank you very much. I have done what you suggested. The locations got updated. then I clicked on get coordinated on the place I wanted (approximate). And then copied those coordinates to the channel file. I got this:

Thank you for your help. I hope you can confirm that this is correct.

Looks good, I'm glad you got it solved!