How to show the Results on the Surface of Scalp

Hello ,
I have constructed a new L (Lead Field Matrix) and J (Source) for a single time “m”
How can I show the source on the scalp using these two parameters?
I am looking for the code that gets these two matrices L and J and provides me the image corresponding to location of the source on the scalp

Thank you
Best
Younes

Hi Younes,

You can display source matrices on a cortex surface using function view_results_matrix.m, but there is no function designed for projecting source results on the cortex.
You could try using function bst_project_sources.m, but keep in mind it is not meant for that.

Francois

Hello Francois
I cant find this function:

Also cant I use the same projection used in source simulation matrix?
Once we simulate a data in process_simulate_recordings.m file we get a file called "F" which is the simulated data, how does this F gets projected? maybe I can use that!

Can you show me the line where projection to the surface (Generating the 3D plot take place?) Maybe I can change my result in a way that matches the format of the projection?

thank you

I cant find this function: view_results_matrix.m

Sorry for the mistake, the function is named: view_surface_matrix.m

Once we simulate a data in process_simulate_recordings.m file we get a file called “F” which is the simulated data, how does this F gets projected? maybe I can use that!

You can display EEG data on the head surface: right-click on the recordings > EEG > Display on scalp.
This corresponds to the function: view_surface_data.m

Can you show me the line where projection to the surface (Generating the 3D plot take place?) Maybe I can change my result in a way that matches the format of the projection?

The surface is created here: brainstorm3/toolbox/gui/figure_3d.m at master · brainstorm-tools/brainstorm3 · GitHub
And updated here when changing time: brainstorm3/toolbox/gui/figure_3d.m at master · brainstorm-tools/brainstorm3 · GitHub
I'm sorry if this is the answer you expect, I'm not sure what you mean with "projection" here...

Francois

Thank you @Francois for your reply.
I am sorry that my question was not clear.
I am looking for the function/functions that plot the source on the cortex.

  1. When we simulate a source the function that show the location of the source on the cortex

  2. When we estimate the source using one of the methodss (i.e sLoreta) , the function that illustrate the observed Source J on the cortex (the plot).

Thank you
Best
Younes

The functions are: view_surface_matrix.m and view_surface_data.m
Read the file headers for help.

If you create new cortex maps with your scripts, the easier is maybe to save them as new files in the Brainstorm database (use the existing source files as examples), this way you will be able to display them with with the interface.
If you save new files in the database folder, you need to register them so that the database explorer shows them. There are many solutions but the easier to start with is maybe to simply reload the folder (right-click > Reload)

1 Like