Export surfaces from BS is not in the same space as the FS subject

Dear Francois,

we are using the BS export function of surface source maps to SPM12 for further statistical analysis in PALM. When I compared the export cortex .gii file and the original fs pial files they are apparently not in the same space. Does BS do any registration to the fs surface files when generating the head model for source estimation?

Is there a way to directly export surface source maps in standard space?

See the mismatch in the attached picture.

Thanks,
Boris

There are multiple transformations applied to the surfaces when reading or saving them.
The sequence of transformations depends on the file format. When exporting surfaces as .gii, it assumes it is for exporting files in the same format and coordinate system as BrainVISA.

If you want to export back to FreeSurfer a surface initially coming from FreeSurfer (loaded with the menu "Import anatomy folder"), you should use the file format "FreeSurfer" when exporting the surface from the database explorer.

The corresponding code, in case you want to fix this manually: