Coordinate system in surface file

Dear all,

I have a subject with individual anatomy for which I loaded the anatomy folder of a FreeSurfer recon-all analysis. I correctly marked fiducials and landmarks and computed the MNI coordinates.

In a script I need the coordinates of the surface (pial downsampled to 15K vertices).

I can successfully load the coordinates by using bst_memory and the surface file as follows:

sf = bst_memory(‘LoadSurface’, rs.SurfaceFile);

Now my question is: are the coordinates in the field sf.Vertices (and other fields) already in MNI or do I need to run a cs_convert as follows:

cs_convert(sMri, ‘scs’, ‘mni’, sf.Vertices);

Thank you very much in advance.

D.

All the coordinates saved in Brainstorm database for individual subjects are saved in subject coordinates (SCS). The registration with the MNI template is a simple 4x4 transformation matrix that is saved in the MRI file.

To get the MNI coordinates of all the vertices of the cortex, you need indeed to call cs_convert just like you mentioned. This will apply the 4x4 MNI transformation computed previously to all the points.

Dear Francois,

thank you very much for you quick answer !

I have only another short question. Where is the SCS -> MNI matrix stored?
Can I export SCS coordinates of vertices and transform them later using the exported matrix? As an affine transformation should be like R_mni = A * R_scs …

Many thanks !

D.

The transformations are stored in the MRI file:
https://neuroimage.usc.edu/brainstorm/Tutorials/ExploreAnatomy#On_the_hard_drive:_MRI

SCS=>MNI gets decomposed in two transformations: SCS=>MRI + MRI=>MNI.
See the code of cs_convert.m for further help.