Source model display and output

Hello Francois,

I managed to get a 2D projection of the 3D source images of the cortex. I did it using Mollweide projection just like they did in this paper: Hemispherically-Unified Surface Maps of Human Cerebral Cortex: Reliability and Hemispheric Asymmetries - PMC.
I used the vertex coordinates from the anatomy data and the corresponding values from the functional data. I also added this functionality for projection scouts onto the 2D surface.

I wrote the following functions to do it:
flatten_source: the main function that generates the 2D images of the two hemispheres and gets the 2D coordinates of the scouts.
Mollweide_proj: function that projects latitude and longitude coordinates (spherical coordinates) to the xy coordinates of a 2D Mollweide projection.
add_convhull: this function can get the coordinates of a convex hull for the scouts, which can be useful for visualisation
tess_hemisplit: function already available in brainstorm to get the indices of the right and left hemisphere coordinates

I am aware that the functions are written for the purpose I needed them for, so if you have any questions let me know.

add_convhull.m (2.1 KB)
flatten_source.m (5.7 KB)
mollweide_proj.m (1.7 KB)
tess_hemisplit.m (5.0 KB)