Getting MNI Coordinates for each vertex from source grid

Hi, I've tried to extrapolate from the instructions for computing MNI coordinates (at each source location) from cortical surface (using cs_convert function), but the computation from volume based source grid seems a bit more convoluted. Within this structure I found only a GridLoc matrix, which doesn't appear to strictly correspond with vertices. There is also no head model.

I'm also curious if I'm right in assuming that per-subject head models computed from the group analysis source grid should have the same mni-coordinate per source. In other words, I can do direct statistical comparisons on the subject-wise data without projecting to default anatomy? Or am I mistaken here?

I have a somewhat time-sensitive question about getting correct MNI coordinates from volumentric "source grid". I've tried to extrapolate from the instructions for computing MNI coordinates (at each source location) from cortical surface (using cs_convert function), but the computation from volume based source grid seems a bit more convoluted. Within this sourcegrid structure I found only a GridLoc matrix, which doesn't appear to strictly correspond with vertices. There is also no head model.

GridLoc is the actual volume source grid, and indeed, it does not correspond to surface vertices.

I'm also curious if I'm right in assuming that per-subject head models computed from the group analysis source grid should have the same mni-coordinate per source. In other words, I can do direct statistical comparisons on the subject-wise data without projecting to default anatomy? Or am I mistaken here?

Correct, if you used a group-level grid, the grids are matching point-to-point across subjects.
You can still use the menu "Project source" to get all the results transferred in the same place.

Hi Francois,

Thanks for your response.

However it is still not clear at all to me whether the coordinate system of the volume source grid matches with that of (cortical) vertices (and I can therefore use the cs_convert function). I just would like to convert my sources to MNI coordinates. Can you tell me how best to approach this?

Thanks,
Tim

All the 3D coordinates you would find in files in the Brainstorm database are in the same "Brainstorm Subject Coordinate System":
https://neuroimage.usc.edu/brainstorm/CoordinateSystems

You can convert the GridLoc positions found in the headmodel file from SCS to MNI exactly like the Vertices from the cortex surface.

Ok. Thanks Francois!

Hi Francois,

I'm comparing gridloc values from the sources obtained from subject-wise MNE and the original group analysis source grid. These values are very different! To me this seems like an indication that subject wise and group level volumes are not coherent, even though the subject head model has been computed from the default volume.

Can you please comment on this?

Best,
T

Then I guess you're doing something wrong.

Here is the test I've just done (from the Epilepsy tutorial dataset):
Exported the MNI and subject MRI
Exported the Subject and subject Headmodel

image image

>> gridMNI = cs_convert(mriMNI, 'scs', 'mni', hmMNI.GridLoc);
>> gridSubj = cs_convert(mriSubj, 'scs', 'mni', hmSubj.GridLoc);  
>> max(max(abs((gridMNI - gridSubj) ./ gridMNI)))
ans =
    2.2110e-11

=> 0.0000000001% error between the original grid on the template brain and the warped grid on the subject anatomy, when converting back to MNI space.

Thanks Francois!

So I suppose the SCS coordinate system reflects differences that are negligible or near negligible in MNI space.

I appreciate the clarification.

Best,
Tim

Hi Francois,

I have followed the instructions here, and am still unable to convert SCS coordinates to MNI using the cs_convert function as described in the link. Using only the Source Grid of group Analyses and Default MRI, I run: >> gridMNI = cs_convert(MRI, 'scs', 'mni', hm.GridLoc);

The resulting values are all on the order of 10e-3 and clearly do not represent an accurate MNI trasformation, when I click "check source grid" the sources are displayed uniformly throughout the head as expected.

Any help would be greatly appreciated.

The resulting values are all on the order of 10e-3

Brainstorm manipulates everything in international units. What you see here as meters, just multiple them by 1000 to get MNI coordinates in millimeters:
https://neuroimage.usc.edu/brainstorm/CoordinateSystems#Converting_between_coordinate_systems

ah. Thanks Francois!