Coordinates in brainstorm

Hi, I read CoordinatesSystem in brainstorm, if I used a Freesurfer anatomy folder when locating SEEG, the world coordinates I export is in RAS coordinates, as we know, if we want to plot electrodes in the pial, we need Surface RAS coordinates, aka the tkras, so I need to transform the World coordinates to Surface RAS coordinates with vox2ras and vox2tkras.
Is my understanding wrong somewhere?

Thanks!
Barry

When importing the anatomy folder, Brainstorm converts everything to its own coordinate systems, described the tutorial you reference, no matter from what program it was generated.
Surface coordinates are always saved in SCS coordinates in Brainstorm.

if we want to plot electrodes in the pial, we need Surface RAS coordinates

Plot in which environment?
The conversion you need to do depends mainly on the software in which you want to import your coordinates.
Please give some more background on what you are currently trying to do, and describe exactly where and how you are stuck.

Hi, I was trying to plot the electrodes with pial from freesurfer directly with python.
I used nibabel to read the lh.pial and rh.pial, then get the coordinates of vertices and the connection. so I can plot the pial brain using some opengl package, like mayavi or pyvista.
Then I plot the SEEG electrodes at the same time.
Coordinates of the brain are in the Freesurfer surface RAS, which is a little different from RAS, so I am not sure if I should transform the world coordinstes to surface ras, and how.

Unfortunately, I won't be able to help you much out of Brainstorm.
For exporting the SEEG coordinates, I guess you have only one possibility, which is to convert them to the scanner-based coordinate of the input file:
cs_convert(sMRI, 'scs', 'world', xyz)

I don't know how to guide you from there on. If you want details on how this transformation is read and stored in Brainstorm, see function in_mri_mgh.m:

There is an export function to FreeSurfer surface format, however I'm not sure how correct this is, I don't think it has been used much. Maybe the transformation and/or its label are wrong. But it might inspire you for more tests:

1 Like