Electrode Mapping in Brainstorm without Converting to FreeSurfer

I hope this message finds you well. I am writing to seek guidance on converting electrode locations (X, Y, Z) obtained from Brainstorm into the fsaverage space of FreeSurfer. My goal is to create an electrode map on the FreeSurfer standard brain surface image.

To provide some context, I have utilized Brainstorm for my research and have acquired electrode locations in the native subject space. However, I now require these electrode locations to be projected onto the fsaverage brain surface in FreeSurfer for further analysis and visualization.

I would greatly appreciate your assistance in answering the following inquiries:

  • What steps are involved in converting the electrode locations from Brainstorm into the FSaverage space of FreeSurfer? Are there any specific considerations or requirements that I should be aware of during this process?

  • Can Brainstorm directly support the summation of electrode mapping in several patients without converting the electrode locations to the FreeSurfer space? If so, could you provide an overview of the steps or tools available within Brainstorm for achieving this electrode mapping?

I sincerely appreciate your expertise and any guidance, instructions, or resources you can provide to help me successfully convert the electrode locations from Brainstorm to the FSaverage space in FreeSurfer. Thank you very much for your time and assistance.

Kind regards,

Hi @HOno,

The requirement would be that Subject's individual anatomy has been MNI-normalized.

The aggregation of electrodes is not done automatically, but all the data that is needed is there.

The steps to follow are:

  1. Create a Subject to aggregate all the electrodes (CoReg Subject)

    • Create a new Subject: Default anatomy NO, Default channel file NO
    • In the Anatomy view, right-click on the Subject > Use Template > FsAverage > FsAverage_2020
  2. For each of the Subjects

    • Right click their Channel file > File > Export to File
    • Export the channel file as the type EEG: BIDS electrodes.tsv, MNI space mm (*.tsv)
  3. Aggregate electrodes from all Subjects

    • Create a empty text file with any name and extension .tsv, e.g.: electrodes_coreg.tsv
    • For each Subject copy their electrodes to the coreg file. You will need to edit the electrode names, so they are unique, you could add the Subject name to each electrode
    • In the Functional data view, right-click on the coreg Subject > Import channel file select type EEG: BIDS electrodes.tsv, MNI space mm (*.tsv) and select the merge .tsv file

A Forum post relevant to this: Visualizing electrodes on default anatomy


Dear Raymundo,

I've successfully combined the electrode mapping of several patients using Brainstorm, as per your instructions. Thank you for your guidance.

Now, I'm interested in summing the number of electrodes in each location on a standard brain, similar to what is depicted in Figure 1 of an linkedhttps://www.sciencedirect.com/science/article/pii/S1388245721006581 paper.

Fig. 1. The extent of non-epileptic electrode sites.

Could you provide detailed steps on how to achieve this in Brainstorm? I would be interested in knowing how to sum up the number of electrodes in each location.

I would greatly appreciate your insights on this matter.


For the moment there is not a Brainstorm process to generate such file, but it can be done manually, creating a texture surface file with that has the value of number of (electrodes per) participant for each vertex in the cortex.

There is still one parameters that need to be defined. If each electrodes is associated with one vertex, it is not likely that two electrodes will have the same vertex, thus, a buffer around each electrode need to be defined.

Do you know how was this buffer defined in the study you shared?

With this info, we can inform you better on how to create such figure

Dear Raymundo,

Thank you for your quick response.

In that study, the buffer was determined by the variables radius_r and radius_k, set to 80 and 200 respectively. for each electrode, the script uses the k-nearest neighbors (knn) function to find the vertices within a certain distance (radius_k ) from the electrode. It then selects the vertices which are within a smaller radius (radius_r ) to form a more precise area of influence around each electrode.