What are "MNI Talairach" coordinates? Are they MNI or are they Talairach?

  • MNE version:1.1.1
  • operating system: Windows 10

Hi all,
I would like to convert the coordinates of one of my vertices into MNI coordinates that I would then like to input into a neuronavigation system for TMS (Brainsight to be specific). The coordinates I get using mne.vertex_to_mni() seem believable in Brainsight, but not perfect. As I looked into the source code for vertex_to_mni I noticed it uses the read_talxfm() transformation, which is labelled as “MRI (surface RAS) → MNI Talairach”. In fact, the name MNI Talairach comes up in other parts of the documentation as well, but I am a little bit confused by this - are these coordinates MNI or Talairach? These two templates should not be equivalent (in fact, they are separate options in Brainsight), and now I wonder whether the output of the talxfm transformation is really in MNI space or in Talairach space?

Thanks,
Máté

answer can be found here: https://mne.tools/stable/overview/implementation.html#meg-eeg-and-mri-coordinate-systems (though I admit not super discoverable; I found it by searching “talairach” in our docs, then on the above page Ctrl+F searching for “talairach”, but I admit that I already knew/expected the answer to be on the “algorithms & implementation details” page so I went straight to that one instead of any of the other pages that returned matches)

MNI Talairach coordinates
The definition of this coordinate system is discussed, e.g., in https://imaging.mrc-cbu.cam.ac.uk/imaging/MniTalairach. This transformation is determined during the FreeSurfer reconstruction process. These coordinates are in MNI305 space.

Thank you! I must have missed the MNI305 part when I was looking around in the docs. It is still a bit unclear to me why this would be labelled MNI Talairach. But for me, the more burning question then is whether the 9-parameter affine transformation that converts MNI305 to ICBM152 (which is described as the current standard in the field) is implemented in MNE?

Thanks again - following up on my previous message, I have found the following information on converting MNI305 into MNI152 coordinates: CoordinateSystems - Free Surfer Wiki (harvard.edu) - see point 8. I implemented the transform I found there in Python the following way, and got near-identical (but not quite perfectly the same) results as they show in their example:

def mni305to152(coordinates):
    v = np.append(coordinates,1)
    M = np.zeros((3,4))
    M[0,:] = [0.9975,-0.0073,0.0176,-0.0429]
    M[1,:] = [0.0146,1.0009,-0.0024,1.5496]
    M[2,:] = [-0.0130,-0.0093,0.9971,1.1840]
    
    return np.matmul(M,np.transpose(v))

image

I have two questions here:

  1. is this the correct transformation? The documentation that Dan linked suggests a 9-parameter transformation, but this one seems to have fewer.
  2. is this the correct way to implement it?

Thanks

I would implement it this way — equivalent results to yours (I checked) but IMO a bit simpler to read:

import numpy as np


def mni305_to_mni152(point):
    point = np.array(list(point) + [1])
    trans = np.array([[0.9975, -0.0073, 0.0176, -0.0429],
                      [0.0146, 1.0009, -0.0024, 1.5496],
                      [-0.0130, -0.0093,  0.9971, 1.1840]])
    return trans @ point

The disagreement between the values here and the values on the freesurfer page are probably down to rounding of the matrix elements; I suspect if you use the formula V152*inv(T152)*R*T305*inv(V305) you would get their exact result.

tagging @larsoner (or maybe @jstout211?) to hopefully know the answer to your other questions about the 9-parameter affine transform.

Thanks so much, that is indeed neater. And thank you for tagging the others as well.

This is more of a FreeSurfer question than anything else, but… do you say this because the transformation ends up being just a rotation + transformation without any shearing or scaling? If so then I’d guess that they did a full 9-param optimization and ended up with a result that was (close enough to) a simple rotation+translation without needing the additional degrees of freedom to get a good alignment.

As for implementing this in MNE it would be great to add it somehow – maybe as an option in vertex_to_mni to start (mni="MNI305 as the current default but you could pass "ICBM152" to get the output in that space instead for example). And/or to start any improvement to the vertex_to_mni documentation to clarify these points would be very welcome!

Thanks for your response, Eric. I must admit, my knowledge is very limited here, maybe the way I should have phrased this is that the documentation mentions a 9-parameter affine transformation, and I don’t have a strong enough background here to decide whether the matrix multiplication solution I found in another documentation fulfills this description (I am not sure how it has 9 parameters, if it does, etc.). It could very well do. If the transformation I found seems correct, I am happy to use it in my work, where the objective is to get a parcel, find its centroid, get its MNI coordinates from MNE, and get those coordinates in a form that can then be fed to a neuronavigation software that expects ICBM152 or MNE152 (these are interachangable, I hope…) coordinates. As far as I can tell, I am now very close to accomplishing these goals…!

As for the rest, I wholeheartedly agree, this would indeed be nice to have as an option in vertex_to_mni, and it would be great to have a little bit more clarity in the documentation too.