brainconn icon indicating copy to clipboard operation
brainconn copied to clipboard

Compatibility with EEG/fNIRS Montage

Open alapo opened this issue 3 years ago • 5 comments

I was curious to know if anyone has ever tried to use this package to create a montage figure which is typically published alongside fNIRS/EEG articles.

I was hoping to import a file with a list of labeled 10-20 locations which could get mapped and labelled onto the figure. Resulting to something similar to the figure below. 1020-wiki - merged

alapo avatar Feb 16 '22 14:02 alapo

Hi - changing the background to something like this should be easy to do, but to make this use flexible, the locations would have to be linked to standard x/y/z coordinates. Are these sensor/electrode locations in EEG/fNIRS standardised? and is there a coordinate system used?

sidchop avatar Feb 18 '22 19:02 sidchop

During processing with EEGLab (the standard processing for EEG data) we do import a .ced file which contains location data which includes

  • x, y, z
  • theta and sph_theta
  • radius and sph_radius
  • sph_phi

I have attached an example file below. OpenBCI-10-20_2.zip

How would one go about changing the background to something like this?

Thanks for the great package.

alapo avatar Feb 22 '22 16:02 alapo

Hi,

Sorry for the delay in this. I have added a option to customise the background in brainconn. You can change the background passing a path to a .png/.jpeg/.tiff and make adjustments to the image size and position using the bg_* options:

brainconn(atlas ="schaefer300_n7", conmat = x, background = "../custom_backgroung/eeg_back.png", view = "back", bg_xmax = -9, bg_xmin = 4, bg_ymax = 10, bg_ymin = -8)

This is probably not the final solution as it can be a bit annoying to adjust background positions. Also, the coordinate system is still MNI..

sidchop avatar Apr 21 '22 00:04 sidchop

I've looked into this a bit more, and I think you are right. The best way is to have a way to convert 10-5 locations into MNI. Are you able to guide me on how to convert x,y,z coordinates into an input that brainconn will accept?

If this is a bit unclear, I have uploaded a video showing my thought process. IMAGE ALT TEXT HERE

resources.zip

alapo avatar May 02 '22 17:05 alapo

Hi, I would like to use this package on my EEG data. Can you please updates me with your case? Did it work with you

Faialismail avatar Sep 05 '23 12:09 Faialismail