On 3/8/2021 11:38 AM, Ornaith O Reilly wrote:

        External Email - Use Caution        

Hello Freesurfer developers,

I am new to Freesurfer and I'm hoping that someone can help me.

My goal is to be able to visualise electrodes contacts that are on lying on the cortical surface on a flat map and a spherical map.

I've run recon-all and created the flatmap.  

I'm using Matlab to achieve this and I've loaded the information with the lines 

lhsphere = fs_read_surf('/Applications/freesurfer/7.1.1/subjects/IM-0001/surf/lh.sphere');

lhflatpatch=fs_read_patch('/Applications/freesurfer/7.1.1/subjects/IM-0001/surf/lh.full.flat.patch.3D');  

1. I want to be able to access the coordinates and show the electrons on the flat map/ sphere and I was wondering how to do this?  I understand that the vertex ID number is what relates the coordinates in the original image to these surfaces.  I am wondering how to access the vertex ID numbers ?  At the moment I think that I only have access to the vertex coordinates and the vertex faces.
The easiest way to do this is probably to map the white or pial xyz into an mgz file using mri_surf2surf, eg
mri_surf2surf  --hemi lh   --sval-xyz white --tval lh.white.xyz.mgz   --s yoursubject
You can then get the xyz of a given vertex by reading
whitexyz = MRIread('lh.white.xyz.mgz');


2. Additionally, I was wondering if there is a way to display the surface images through Matlab?  What would be the best way to show the surface with the electrons overlaid on it?
I know there are ways, but I don't know their details

The version of Freesurfer and the platform that I'm using is outlined below:
1) FreeSurfer version: freesurfer-darwin-macOS-7.1.1-20200811-8b40551 
2) Platform: macOS High Sierra 10.13.6 (17G7024)

I really appreciate any help with this as I'm really stuck. 

Thanks in advance for any help.

Kind Regards,
Ornaith O'Reilly

_______________________________________________
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer