Dipole position in MRI-coordinate-frame

External Email - Use Caution

Dear MNE-Community,

I am trying to transform the position of a dipole (by ecd-fit or
mixed-norm-estimate) to the subjects mri-coordinate system, to compare it
to source-space-activations and label and visualize it in the 3D-Brain. As
I understand, the dipole lies in the head-coordinate frame and the position
has to be transformed.
I tried the "_get_dipole_loc"-function in _3d.py but it didn't seem to work
out.
How would I get the transformation right? Or is there even a function for
this I overlooked?

Thanks a lot in advance
Martin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20190927/c53f7c0a/attachment.html

External Email - Use Caution

Hi,

have a look at:

https://mne.tools/dev/auto_tutorials/source-modeling/plot_dipole_fit.html
<https://mne.tools/dev/auto_tutorials/source-modeling/plot_dipole_fit.html#sphx-glr-auto-tutorials-source-modeling-plot-dipole-fit-py>

especially the mne.head_to_mri
<https://mne.tools/dev/generated/mne.head_to_mri.html#mne.head_to_mri>
function.

HTH
Alex

External Email - Use Caution

Hello Alex,

thank you very much, I wasn't aware of this function.
I wish you a nice and succesful coding sprint.

Kind regards
Martin

External Email - Use Caution

Hello,

thanks for your immediate response.
I saw, that the function head_to_mri transforms to MRI RAS and not Surface
RAS. But I'd like to plot the dipole-position together with a
pysurfer-surface plot and would also like to compare dipole with label
positions.
Is there a way, to transform to Surface RAS too?

Kind regards
Martin

External Email - Use Caution

hi,

you can look at the code to see how transforms are applied:

https://github.com/mne-tools/mne-python/blob/master/mne/source_space.py#L1135-L1179

HTH
Alex