nipy / PySurfer

Cortical neuroimaging visualization in Python
https://pysurfer.github.io/
BSD 3-Clause "New" or "Revised" License
239 stars 98 forks source link

visualizing head model in pysurfer #230

Closed EhsanTadayon closed 6 years ago

EhsanTadayon commented 6 years ago

Hi guys,

Is there any way to visualize head models created from MNE with pysurfer?

larsoner commented 6 years ago

Like this?

https://martinos.org/mne/dev/auto_tutorials/plot_source_alignment.html#sphx-glr-auto-tutorials-plot-source-alignment-py

EhsanTadayon commented 6 years ago

Hi,

Thanks. Yes, exactly. But, I'd like to use pysurfer rather than MNE functions. I have several electrode positions in MRI coordinate space and like to visualize it on the skull surface created from MNE.

larsoner commented 6 years ago

You can set coord_frame='mri' in plot_alignment and it will be the same coordinate space that PySurfer uses, except (IIRC) it's in m units rather than mm. So set coord_frame='mri' and divide your locations by 1000. and you should be good to go.

PySurfer does not provide functionality to visualize the BEM surfaces, so forcing PySurfer to do what you want will be harder than getting MNE to do it.

EhsanTadayon commented 6 years ago

Thanks. I appreciate it. So, I think I go with the MNE then. By any chance, do you know if there is an easy way to project the electrode coordinates in MRI space onto skull using MNE?

larsoner commented 6 years ago

You can do this with EEG electrodes, yes. You can use the eeg_sensors kwarg to do it. Let's move further discussion over to MNE, though, to relieve other PySurfer devs.