Electrode position using a head 3d scan

Hello, I am trying to import a 3d scan of a subject to brainstorm so I can manually add each electrode guided by that 3d scan. Is it possible?

Can you please to describe better what you have in input and what you would like to have in output?

I am trying to localize epileptic spikes. So, I do have an individual brain MRI but I do not have a digitizer. I am able to scan subjects heads and create 3d hed model with the extension(.obj). I was hoping to import the (obj) file to brainstorm and then add the electrodes to that model. Once I am done, I am hoping to use the created electrode position on the subject head model that is created from the MRI file. That way I do not need a digitizer. When I try to "import surface" it allowed me to choose the ".obj" file but I got an error message about only being able to handle polygon obj files. Is there anyway you can help me with that. I apologize if I am still not clear on what Issue I and dealing with.

I do something similar, using 3D optical scanner I make the *.stl polygon object (similar to your *.obj). Importing to slicer software. Doing the labels at the electrodes. And then exporting as markups list, having the coordinates in the slicer space. the only harder part is to transform these coordinates to the subject MRI space. you can make it manually in BS or use some markups as fiducial points and do rigid transforms

1 Like

I do have an individual brain MRI but I do not have a digitizer.

If you have the subject MRI:

  • Import it in Brainstorm
  • Generate the head surface (or process it with CAT12, or FreeSurfer....) => You'll get a much cleaner scalp surface, with no hair (much easier to position the electrodes)
  • In the functional view, create a link to your EEG recordings.
  • Right-click on the channel file > Add EEG positions > ICBM152 > If your EEG cap is not listed, pick something close to your cap (or Generic > ASA 10-05).
  • If you get a message saying that some electrodes are not found, it is because the names are not matching between your recordings and the template. Right-click on the channel file > Edit channel file > Select all the channel with type EEG_NO_LOC, right-click > Set channel type > EEG.
  • Right-click on the channel file > MRI Registration > Edit: rotate/translate/project on the scalp/add or remove electrodes... Read the tooltip of the buttons in the toolbar for help. Click OK to save the modifications.
  • If you want the coordinates saved in a text file: right-click on the channel file > File > Export to file > Pick a simple format, like "EEG: ASCII: Name,XYZ".

The solution proposed by @jezdip2 (use another software to create a list of 3D points based on the 3D scanner surface), can work as well. The registration back into the SCS coordinate system of Brainstorm is complicated to do manually, but automatic if you include the three fiducials (NAS,LPA,RPA) in your list of points. When loading the file, if the three fiducials can be found, they are removed from the list of points and used to compute the rigid transformation to the coordinate system used in Brainstorm (SCS/CTF).
https://neuroimage.usc.edu/brainstorm/CoordinateSystems

Hello Francois,

I was able to create a list of electrodeposition in 3D Slicer and save it as cvs file. I edited the file and kept only the XYZ position and the electrode name. I did include LPA,RPA, NAS. In Brainstorm, I opened the file as ASCII XYZ,name. The position of the electrodes was way off the head and the three points(LPA,RPA, NAS) were not part of the electrode list. How do I align the imported LPA,RPA, NAS with the head model points and how do I do the coordination transformation you mentioned in your reply. Again, I really appreciate your help, I am a medical doctor and not familiar with these concepts but trying to learn.

Waleed

When importing a list positions including 3 labels LPA/RPA/NAS, Brainstorm removes the corresponding 3D positions from the list and use them to compute the transformation to the Brainstorm coordinate system (SCS).

If you don't see these points in the list of imported points, this is a good sign, it means that they have been used to compute the transformation matrix to the SCS coordinates (a coordinate system that relies only on these three fiducial points).
If it doesn't align correctly the electrodes on the head, it means that they haven't been defined correctly.

Post here the text file you created if you can't figure out where your error is coming from.
A few screen captures always help.

I was able to create a list of electrodeposition in 3D Slicer and save it as cvs file.

Out of curiosity, may I ask why you decided not to use the actual head surface from the MRI, as suggested in my previous post?
After importing the coordinates from your csv file from slicer, you will have to align/project the electrodes on this head surface either way.

Thank you for the reply, brainstorm did make use the three points to align the electrodes with the head created from the individual MRI. I am only using it because I do not have the individual electrodes positions. We use 10-10 system mainly for seizure localization. So,, you do not think that I need to use an individual electrodeposition and the template is enough?

Waleed

I do not have the individual electrodes positions. We use 10-10 system mainly for seizure localization. So,, you do not think that I need to use an individual electrodeposition and the template is enough?

The more realistic positions the better.
If you do not have these positions at all, one solution is to use positions from one of the templates available in Brainstorm, and then adjust manually the electrodes on the head of the subject (rotate/translate/resize then project on the surface).

If you can see clearly the electrodes in the 3D head surface scan you have, and already found a solution to improve the electrode localization (and if it doesn't take you a week per subject in manual processing), then go for it.