Question about electrode implantation

I am trying to visualize ECOG electrodes from several subjects on the cortical surface color-labeled according to my own system. I was wondering if the brainstorm toolbox function "channel_project_scalp" is what brainstorm does when you click the dropdown menu for "Contacts" and select "project on cortex". The dropdown menu way works really well to project all electrodes on the cortex but using the function in a script does a very poor job.

The function channel_project_scalp() is the one that is used, with the arguments:

  • Vertices: Vertices from the Subject's default Cortex surface
  • ChanLoc: Location of the electrodes

The menu Project on cortex calls the function ProjectContacts() in panel_ieeg.m using 'cortexmask' as surface. See the code here