convert from vertex number to MNI

Hi,

I see that in mne_analyze it's possible to get the MNI coordinates for selected vertices. How can I have access to the transformation used there? In other words, if I have a list of vertices in matlab, how can I get their MNI coordinates (and vice-versa)?

Thanks,

Gus

Hi Gus,

I see that in mne_analyze it's possible to get the MNI coordinates
for selected vertices. How can I have access to the transformation
used there? In other words, if I have a list of vertices in matlab,
how can I get their MNI coordinates (and vice-versa)?

I a few easy steps:

1. Use mne_collect_transforms to make a fif file containing all the
coordinate transforms you need, see Section 9.9 in the MNE manual.

In Matlab:

2. Load the surface(s) of interest using mne_read_surfaces or
mne_read_source_spaces

3. Using mne_transform_coordinates, transform the coordinates of the
vertices in the structures returned in step 2 to the desired
coordinate frame.

I hope this helps,
Matti

Hi,

I a few easy steps:

1. Use mne_collect_transforms to make a fif file containing all the
coordinate transforms you need, see Section 9.9 in the MNE manual.

In Matlab:

2. Load the surface(s) of interest using mne_read_surfaces or
mne_read_source_spaces

3. Using mne_transform_coordinates, transform the coordinates of the
vertices in the structures returned in step 2 to the desired coordinate
frame.

When I follow these steps I get a series of errors -- I think I'm making
syntax errors somewhere along the way but can't determine where. I'm doing:

[src] =
mne_read_source_spaces('SUBJECTS_DIR/SUBJECT/bem/SUBJECT-oct-6-src.fif');

and

[trans_pos] =
mne_transform_coordinates('SUBJECT_xforms.fif',src(1,2).tris,'FIFFV_COORD_HEAD','FIFFV_COORD_MNI_TAL');

The errors include:

Error in ==> mne_transform_coordinates at 85
if (from == FIFF.FIFFV_COORD_HEAD && isempty(T0)) || isempty(T1) ||
isempty(T2) ||

??? Error using ==> eq
Matrix dimensions must agree

and

??? Error using ==> mne_transform_coordinates at 103
Input data must be in MEG head or surface RAS coordinates

depending on what I comment out in troubleshooting. Can you see anything
obvious that I've done wrong? I've been using the 2009-04-27 version of
mne_transform_coordinates that was included in MNE 2.7.0-3106. The matrix
from the SUBJECT_xforms.fif file is given below.

Thanks

Jon Houck

Coordinate transformation: MEG device -> head
         0.999839 -0.010549 -0.014511 -0.32 mm
         0.013018 0.983165 0.182259 1.43 mm
         0.012344 -0.182419 0.983144 61.88 mm
         0.000000 0.000000 0.000000 1.00
Coordinate transformation: MRI (surface RAS) -> head
         0.997896 0.029082 -0.057949 -1.16 mm
        -0.011038 0.956921 0.290140 17.67 mm
         0.063891 -0.288890 0.955228 46.51 mm
         0.000000 0.000000 0.000000 1.00
Coordinate transformation: MRI (surface RAS) -> RAS (non-zero origin)
         1.000000 0.000000 0.000000 4.31 mm
         0.000000 1.000000 0.000000 60.02 mm
         0.000000 0.000000 1.000000 3.69 mm
         0.000000 0.000000 0.000000 1.00
Coordinate transformation: RAS (non-zero origin) -> MNI Talairach
         0.972405 -0.036926 -0.098139 -2.42 mm
         0.051778 1.001975 0.163707 -71.57 mm
         0.080551 -0.169009 1.019200 0.88 mm
         0.000000 0.000000 0.000000 1.00
Coordinate transformation: MNI Talairach -> Talairach (MNI z > 0)
         0.990000 0.000000 0.000000 0.00 mm
         0.000000 0.968800 0.046000 0.00 mm
         0.000000 -0.048500 0.918900 0.00 mm
         0.000000 0.000000 0.000000 1.00
Coordinate transformation: MNI Talairach -> Talairach (MNI z < 0)
         0.990000 0.000000 0.000000 0.00 mm
         0.000000 0.968800 0.042000 0.00 mm
         0.000000 -0.048500 0.839000 0.00 mm
         0.000000 0.000000 0.000000 1.00
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20100802/58b223a8/attachment.html