Re: [Freesurfer] Cortical surface analysis

2021-05-10 Thread Douglas N. Greve

See https://surfer.nmr.mgh.harvard.edu/fswiki/CoordinateSystems

On 4/28/2021 5:18 PM, Fischl, Bruce wrote:


Yes, there is some documentation of how to do this on our website. I 
defer to Doug on the particulars


Bruce

*From:* freesurfer-boun...@nmr.mgh.harvard.edu 
 *On Behalf Of *Ornaith O Reilly

*Sent:* Wednesday, April 28, 2021 4:30 PM
*To:* Freesurfer support list 
*Subject:* Re: [Freesurfer] Cortical surface analysis

*External Email - Use Caution *

Hi Bruce,

Thanks a lot for this.  What is the difference between RAS and surface 
RAS?


Do I need to convert the surface RAS into RAS to be dealing in the 
volume space?


Kind Regards,

Ornaith

On Tue, 27 Apr 2021 at 15:44, Fischl, Bruce <mailto:bfis...@mgh.harvard.edu>> wrote:


All the surface vertices are just listed in order. The patch keep
track of which vertex it corresponds to (so you can just use
pial_surface[patch.vno] or something).

The coordinates are documented on our website and are “surface ras”.

Cheers

Bruce

*From:* freesurfer-boun...@nmr.mgh.harvard.edu
<mailto:freesurfer-boun...@nmr.mgh.harvard.edu>
mailto:freesurfer-boun...@nmr.mgh.harvard.edu>> *On Behalf Of
*Ornaith O Reilly
*Sent:* Tuesday, April 27, 2021 8:02 AM
*To:* Freesurfer support list mailto:freesurfer@nmr.mgh.harvard.edu>>
    *Subject:* Re: [Freesurfer] Cortical surface analysis

*External Email - Use Caution *

Hi Bruce,

Yes I read in the patch the way that you're suggesting and I can
access the vino for the flat map.  But how do i know the vertex
number of each vertex in the pial surface?  Are they in order ?

Also, what coordinate system is the pial surface in when its read
into FreeSurfer? Is it RAS or surface RAS?

Kind Regards,

Ornaith

On Wed, 7 Apr 2021 at 20:02, Fischl, Bruce
mailto:bfis...@mgh.harvard.edu>> wrote:

How do you read it in? If you are using the read_patch.m that
we distribute it should be stored in patch.vno if you do:

>> patch = read_patch(path_file_name)

*From:* freesurfer-boun...@nmr.mgh.harvard.edu
<mailto:freesurfer-boun...@nmr.mgh.harvard.edu>
mailto:freesurfer-boun...@nmr.mgh.harvard.edu>> *On Behalf Of
*Ornaith O Reilly
*Sent:* Wednesday, April 7, 2021 2:29 PM
*To:* Freesurfer support list mailto:freesurfer@nmr.mgh.harvard.edu>>
*Subject:* Re: [Freesurfer] Cortical surface analysis

*External Email - Use Caution *

Hi Bruce,

Thanks so much for your quick reply, I really appreciate your
help on this.

I don't understand how to recover the vertex index.

In Freeview I can see the vertex index number.  When I load in
the data to MATLAB as discussed - the only thing that I have
access to are the coordinates of the vertices - not the vertex
index.  How can I recover the vertex indices as well?

Thanks again.

Kind Regards,

Ornaith

On Tue, 6 Apr 2021 at 19:31, Fischl, Bruce
mailto:bfis...@mgh.harvard.edu>> wrote:

Hi Ornaith

The mapping uses the vertex index. That is, the vertex
index is stored in the flatmap, so you should always be
able to recover it, then look up the location of that
vertex on any other surface (of the same hemisphere/subject)

Cheers

Bruce

*From:* freesurfer-boun...@nmr.mgh.harvard.edu
<mailto:freesurfer-boun...@nmr.mgh.harvard.edu>
mailto:freesurfer-boun...@nmr.mgh.harvard.edu>> *On
Behalf Of *Ornaith O Reilly
*Sent:* Tuesday, April 6, 2021 2:19 PM
*To:* Freesurfer support list
    mailto:freesurfer@nmr.mgh.harvard.edu>>
*Subject:* Re: [Freesurfer] Cortical surface analysis

*External Email - Use Caution *

Hello FreeSurfer developers,

Thanks a lot for your help.  I have initialised the
pialxyz the way you suggested and made the flatmap in
MatLab using the read_patch function (screenshots
attached). I still don't understand how to convert
between the two.  For example how to see what point
(x,y,z) on the pial surface corresponds to what (x,y)
point on the flatmap.

Thanks a lot for your help.

Kind Regards,

Ornaith

On Tue, 16 Mar 2021 at 15:58, Douglas N. Greve
mailto:dgr...@mgh.harvard.edu>>
wrote:

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

*External Email - Use Caution *

Hello Freesurfer developers,

I am 

Re: [Freesurfer] Cortical surface analysis

2021-04-28 Thread Fischl, Bruce
Yes, there is some documentation of how to do this on our website. I defer to 
Doug on the particulars

Bruce

From: freesurfer-boun...@nmr.mgh.harvard.edu 
 On Behalf Of Ornaith O Reilly
Sent: Wednesday, April 28, 2021 4:30 PM
To: Freesurfer support list 
Subject: Re: [Freesurfer] Cortical surface analysis


External Email - Use Caution
Hi Bruce,
Thanks a lot for this.  What is the difference between RAS and surface RAS?

Do I need to convert the surface RAS into RAS to be dealing in the volume space?

Kind Regards,
Ornaith

On Tue, 27 Apr 2021 at 15:44, Fischl, Bruce 
mailto:bfis...@mgh.harvard.edu>> wrote:
All the surface vertices are just listed in order. The patch keep track of 
which vertex it corresponds to (so you can just use pial_surface[patch.vno] or 
something).

The coordinates are documented on our website and are “surface ras”.

Cheers
Bruce

From: 
freesurfer-boun...@nmr.mgh.harvard.edu<mailto:freesurfer-boun...@nmr.mgh.harvard.edu>
 
mailto:freesurfer-boun...@nmr.mgh.harvard.edu>>
 On Behalf Of Ornaith O Reilly
Sent: Tuesday, April 27, 2021 8:02 AM
To: Freesurfer support list 
mailto:freesurfer@nmr.mgh.harvard.edu>>
Subject: Re: [Freesurfer] Cortical surface analysis


External Email - Use Caution
Hi Bruce,

Yes I read in the patch the way that you're suggesting and I can access the 
vino for the flat map.  But how do i know the vertex number of each vertex in 
the pial surface?  Are they in order ?

Also, what coordinate system is the pial surface in when its read into 
FreeSurfer? Is it RAS or surface RAS?

Kind Regards,
Ornaith

On Wed, 7 Apr 2021 at 20:02, Fischl, Bruce 
mailto:bfis...@mgh.harvard.edu>> wrote:
How do you read it in? If you are using the read_patch.m that we distribute it 
should be stored in patch.vno if you do:

>> patch = read_patch(path_file_name)


From: 
freesurfer-boun...@nmr.mgh.harvard.edu<mailto:freesurfer-boun...@nmr.mgh.harvard.edu>
 
mailto:freesurfer-boun...@nmr.mgh.harvard.edu>>
 On Behalf Of Ornaith O Reilly
Sent: Wednesday, April 7, 2021 2:29 PM
To: Freesurfer support list 
mailto:freesurfer@nmr.mgh.harvard.edu>>
Subject: Re: [Freesurfer] Cortical surface analysis


External Email - Use Caution
Hi Bruce,

Thanks so much for your quick reply, I really appreciate your help on this.

I don't understand how to recover the vertex index.

In Freeview I can see the vertex index number.  When I load in the data to 
MATLAB as discussed - the only thing that I have access to are the coordinates 
of the vertices - not the vertex index.  How can I recover the vertex indices 
as well?

Thanks again.

Kind Regards,
Ornaith


On Tue, 6 Apr 2021 at 19:31, Fischl, Bruce 
mailto:bfis...@mgh.harvard.edu>> wrote:
Hi Ornaith

The mapping uses the vertex index. That is, the vertex index is stored in the 
flatmap, so you should always be able to recover it, then look up the location 
of that vertex on any other surface (of the same hemisphere/subject)

Cheers
Bruce

From: 
freesurfer-boun...@nmr.mgh.harvard.edu<mailto:freesurfer-boun...@nmr.mgh.harvard.edu>
 
mailto:freesurfer-boun...@nmr.mgh.harvard.edu>>
 On Behalf Of Ornaith O Reilly
Sent: Tuesday, April 6, 2021 2:19 PM
To: Freesurfer support list 
mailto:freesurfer@nmr.mgh.harvard.edu>>
Subject: Re: [Freesurfer] Cortical surface analysis


External Email - Use Caution
Hello FreeSurfer developers,

Thanks a lot for your help.  I have initialised the pialxyz the way you 
suggested and made the flatmap in MatLab using the read_patch function 
(screenshots attached).  I still don't understand how to convert between the 
two.  For example how to see what point (x,y,z) on the pial surface corresponds 
to what (x,y) point on the flatmap.

Thanks a lot for your help.

Kind Regards,
Ornaith



On Tue, 16 Mar 2021 at 15:58, Douglas N. Greve 
mailto:dgr...@mgh.harvard.edu>> wrote:

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 

Re: [Freesurfer] Cortical surface analysis

2021-04-28 Thread Ornaith O Reilly
External Email - Use Caution

Hi Bruce,
Thanks a lot for this.  What is the difference between RAS and surface RAS?

Do I need to convert the surface RAS into RAS to be dealing in the volume
space?

Kind Regards,
Ornaith

On Tue, 27 Apr 2021 at 15:44, Fischl, Bruce  wrote:

> All the surface vertices are just listed in order. The patch keep track of
> which vertex it corresponds to (so you can just use pial_surface[patch.vno]
> or something).
>
>
>
> The coordinates are documented on our website and are “surface ras”.
>
>
>
> Cheers
>
> Bruce
>
>
>
> *From:* freesurfer-boun...@nmr.mgh.harvard.edu <
> freesurfer-boun...@nmr.mgh.harvard.edu> *On Behalf Of *Ornaith O Reilly
> *Sent:* Tuesday, April 27, 2021 8:02 AM
> *To:* Freesurfer support list 
> *Subject:* Re: [Freesurfer] Cortical surface analysis
>
>
>
> *External Email - Use Caution*
>
> Hi Bruce,
>
>
>
> Yes I read in the patch the way that you're suggesting and I can access
> the vino for the flat map.  But how do i know the vertex number of each
> vertex in the pial surface?  Are they in order ?
>
>
>
> Also, what coordinate system is the pial surface in when its read into
> FreeSurfer? Is it RAS or surface RAS?
>
>
>
> Kind Regards,
>
> Ornaith
>
>
>
> On Wed, 7 Apr 2021 at 20:02, Fischl, Bruce 
> wrote:
>
> How do you read it in? If you are using the read_patch.m that we
> distribute it should be stored in patch.vno if you do:
>
>
>
> >> patch = read_patch(path_file_name)
>
>
>
>
>
> *From:* freesurfer-boun...@nmr.mgh.harvard.edu <
> freesurfer-boun...@nmr.mgh.harvard.edu> *On Behalf Of *Ornaith O Reilly
> *Sent:* Wednesday, April 7, 2021 2:29 PM
> *To:* Freesurfer support list 
> *Subject:* Re: [Freesurfer] Cortical surface analysis
>
>
>
> *External Email - Use Caution*
>
> Hi Bruce,
>
>
>
> Thanks so much for your quick reply, I really appreciate your help on
> this.
>
>
>
> I don't understand how to recover the vertex index.
>
>
>
> In Freeview I can see the vertex index number.  When I load in the data to
> MATLAB as discussed - the only thing that I have access to are the
> coordinates of the vertices - not the vertex index.  How can I recover the
> vertex indices as well?
>
>
>
> Thanks again.
>
>
>
> Kind Regards,
>
> Ornaith
>
>
>
>
>
> On Tue, 6 Apr 2021 at 19:31, Fischl, Bruce 
> wrote:
>
> Hi Ornaith
>
>
>
> The mapping uses the vertex index. That is, the vertex index is stored in
> the flatmap, so you should always be able to recover it, then look up the
> location of that vertex on any other surface (of the same
> hemisphere/subject)
>
>
>
> Cheers
>
> Bruce
>
>
>
> *From:* freesurfer-boun...@nmr.mgh.harvard.edu <
> freesurfer-boun...@nmr.mgh.harvard.edu> *On Behalf Of *Ornaith O Reilly
> *Sent:* Tuesday, April 6, 2021 2:19 PM
> *To:* Freesurfer support list 
> *Subject:* Re: [Freesurfer] Cortical surface analysis
>
>
>
> *External Email - Use Caution*
>
> Hello FreeSurfer developers,
>
>
>
> Thanks a lot for your help.  I have initialised the pialxyz the way you
> suggested and made the flatmap in MatLab using the read_patch function
> (screenshots attached).  I still don't understand how to convert between
> the two.  For example how to see what point (x,y,z) on the pial surface
> corresponds to what (x,y) point on the flatmap.
>
>
>
> Thanks a lot for your help.
>
>
>
> Kind Regards,
>
> Ornaith
>
>
>
>
>
>
>
> On Tue, 16 Mar 2021 at 15:58, Douglas N. Greve 
> wrote:
>
>
>
> 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?  

Re: [Freesurfer] Cortical surface analysis

2021-04-27 Thread Fischl, Bruce
All the surface vertices are just listed in order. The patch keep track of 
which vertex it corresponds to (so you can just use pial_surface[patch.vno] or 
something).

The coordinates are documented on our website and are “surface ras”.

Cheers
Bruce

From: freesurfer-boun...@nmr.mgh.harvard.edu 
 On Behalf Of Ornaith O Reilly
Sent: Tuesday, April 27, 2021 8:02 AM
To: Freesurfer support list 
Subject: Re: [Freesurfer] Cortical surface analysis


External Email - Use Caution
Hi Bruce,

Yes I read in the patch the way that you're suggesting and I can access the 
vino for the flat map.  But how do i know the vertex number of each vertex in 
the pial surface?  Are they in order ?

Also, what coordinate system is the pial surface in when its read into 
FreeSurfer? Is it RAS or surface RAS?

Kind Regards,
Ornaith

On Wed, 7 Apr 2021 at 20:02, Fischl, Bruce 
mailto:bfis...@mgh.harvard.edu>> wrote:
How do you read it in? If you are using the read_patch.m that we distribute it 
should be stored in patch.vno if you do:

>> patch = read_patch(path_file_name)


From: 
freesurfer-boun...@nmr.mgh.harvard.edu<mailto:freesurfer-boun...@nmr.mgh.harvard.edu>
 
mailto:freesurfer-boun...@nmr.mgh.harvard.edu>>
 On Behalf Of Ornaith O Reilly
Sent: Wednesday, April 7, 2021 2:29 PM
To: Freesurfer support list 
mailto:freesurfer@nmr.mgh.harvard.edu>>
Subject: Re: [Freesurfer] Cortical surface analysis


External Email - Use Caution
Hi Bruce,

Thanks so much for your quick reply, I really appreciate your help on this.

I don't understand how to recover the vertex index.

In Freeview I can see the vertex index number.  When I load in the data to 
MATLAB as discussed - the only thing that I have access to are the coordinates 
of the vertices - not the vertex index.  How can I recover the vertex indices 
as well?

Thanks again.

Kind Regards,
Ornaith


On Tue, 6 Apr 2021 at 19:31, Fischl, Bruce 
mailto:bfis...@mgh.harvard.edu>> wrote:
Hi Ornaith

The mapping uses the vertex index. That is, the vertex index is stored in the 
flatmap, so you should always be able to recover it, then look up the location 
of that vertex on any other surface (of the same hemisphere/subject)

Cheers
Bruce

From: 
freesurfer-boun...@nmr.mgh.harvard.edu<mailto:freesurfer-boun...@nmr.mgh.harvard.edu>
 
mailto:freesurfer-boun...@nmr.mgh.harvard.edu>>
 On Behalf Of Ornaith O Reilly
Sent: Tuesday, April 6, 2021 2:19 PM
To: Freesurfer support list 
mailto:freesurfer@nmr.mgh.harvard.edu>>
Subject: Re: [Freesurfer] Cortical surface analysis


External Email - Use Caution
Hello FreeSurfer developers,

Thanks a lot for your help.  I have initialised the pialxyz the way you 
suggested and made the flatmap in MatLab using the read_patch function 
(screenshots attached).  I still don't understand how to convert between the 
two.  For example how to see what point (x,y,z) on the pial surface corresponds 
to what (x,y) point on the flatmap.

Thanks a lot for your help.

Kind Regards,
Ornaith



On Tue, 16 Mar 2021 at 15:58, Douglas N. Greve 
mailto:dgr...@mgh.harvard.edu>> wrote:

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 

Re: [Freesurfer] Cortical surface analysis

2021-04-27 Thread Ornaith O Reilly
External Email - Use Caution

Hi Bruce,

Yes I read in the patch the way that you're suggesting and I can access the
vino for the flat map.  But how do i know the vertex number of each vertex
in the pial surface?  Are they in order ?

Also, what coordinate system is the pial surface in when its read into
FreeSurfer? Is it RAS or surface RAS?

Kind Regards,
Ornaith

On Wed, 7 Apr 2021 at 20:02, Fischl, Bruce  wrote:

> How do you read it in? If you are using the read_patch.m that we
> distribute it should be stored in patch.vno if you do:
>
>
>
> >> patch = read_patch(path_file_name)
>
>
>
>
>
> *From:* freesurfer-boun...@nmr.mgh.harvard.edu <
> freesurfer-boun...@nmr.mgh.harvard.edu> *On Behalf Of *Ornaith O Reilly
> *Sent:* Wednesday, April 7, 2021 2:29 PM
> *To:* Freesurfer support list 
> *Subject:* Re: [Freesurfer] Cortical surface analysis
>
>
>
> *External Email - Use Caution*
>
> Hi Bruce,
>
>
>
> Thanks so much for your quick reply, I really appreciate your help on
> this.
>
>
>
> I don't understand how to recover the vertex index.
>
>
>
> In Freeview I can see the vertex index number.  When I load in the data to
> MATLAB as discussed - the only thing that I have access to are the
> coordinates of the vertices - not the vertex index.  How can I recover the
> vertex indices as well?
>
>
>
> Thanks again.
>
>
>
> Kind Regards,
>
> Ornaith
>
>
>
>
>
> On Tue, 6 Apr 2021 at 19:31, Fischl, Bruce 
> wrote:
>
> Hi Ornaith
>
>
>
> The mapping uses the vertex index. That is, the vertex index is stored in
> the flatmap, so you should always be able to recover it, then look up the
> location of that vertex on any other surface (of the same
> hemisphere/subject)
>
>
>
> Cheers
>
> Bruce
>
>
>
> *From:* freesurfer-boun...@nmr.mgh.harvard.edu <
> freesurfer-boun...@nmr.mgh.harvard.edu> *On Behalf Of *Ornaith O Reilly
> *Sent:* Tuesday, April 6, 2021 2:19 PM
> *To:* Freesurfer support list 
> *Subject:* Re: [Freesurfer] Cortical surface analysis
>
>
>
> *External Email - Use Caution*
>
> Hello FreeSurfer developers,
>
>
>
> Thanks a lot for your help.  I have initialised the pialxyz the way you
> suggested and made the flatmap in MatLab using the read_patch function
> (screenshots attached).  I still don't understand how to convert between
> the two.  For example how to see what point (x,y,z) on the pial surface
> corresponds to what (x,y) point on the flatmap.
>
>
>
> Thanks a lot for your help.
>
>
>
> Kind Regards,
>
> Ornaith
>
>
>
>
>
>
>
> On Tue, 16 Mar 2021 at 15:58, Douglas N. Greve 
> wrote:
>
>
>
> 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 i

Re: [Freesurfer] Cortical surface analysis

2021-04-07 Thread Fischl, Bruce
How do you read it in? If you are using the read_patch.m that we distribute it 
should be stored in patch.vno if you do:

>> patch = read_patch(path_file_name)


From: freesurfer-boun...@nmr.mgh.harvard.edu 
 On Behalf Of Ornaith O Reilly
Sent: Wednesday, April 7, 2021 2:29 PM
To: Freesurfer support list 
Subject: Re: [Freesurfer] Cortical surface analysis


External Email - Use Caution
Hi Bruce,

Thanks so much for your quick reply, I really appreciate your help on this.

I don't understand how to recover the vertex index.

In Freeview I can see the vertex index number.  When I load in the data to 
MATLAB as discussed - the only thing that I have access to are the coordinates 
of the vertices - not the vertex index.  How can I recover the vertex indices 
as well?

Thanks again.

Kind Regards,
Ornaith


On Tue, 6 Apr 2021 at 19:31, Fischl, Bruce 
mailto:bfis...@mgh.harvard.edu>> wrote:
Hi Ornaith

The mapping uses the vertex index. That is, the vertex index is stored in the 
flatmap, so you should always be able to recover it, then look up the location 
of that vertex on any other surface (of the same hemisphere/subject)

Cheers
Bruce

From: 
freesurfer-boun...@nmr.mgh.harvard.edu<mailto:freesurfer-boun...@nmr.mgh.harvard.edu>
 
mailto:freesurfer-boun...@nmr.mgh.harvard.edu>>
 On Behalf Of Ornaith O Reilly
Sent: Tuesday, April 6, 2021 2:19 PM
To: Freesurfer support list 
mailto:freesurfer@nmr.mgh.harvard.edu>>
Subject: Re: [Freesurfer] Cortical surface analysis


External Email - Use Caution
Hello FreeSurfer developers,

Thanks a lot for your help.  I have initialised the pialxyz the way you 
suggested and made the flatmap in MatLab using the read_patch function 
(screenshots attached).  I still don't understand how to convert between the 
two.  For example how to see what point (x,y,z) on the pial surface corresponds 
to what (x,y) point on the flatmap.

Thanks a lot for your help.

Kind Regards,
Ornaith



On Tue, 16 Mar 2021 at 15:58, Douglas N. Greve 
mailto:dgr...@mgh.harvard.edu>> wrote:

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<mailto:Freesurfer@nmr.mgh.harvard.edu>

MailScanner has detected a possible fraud attempt from "secure-web.cisco.com" 
claiming to be 
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer<https://secure-web.cisco.com/1Ogp5ZeoS72_H9fgRPteNOma_J9hPaTfdzd6HC3IGubCY3vT-6900ngXdEssiUKOEN83iJbaRuxNMiShdLlOKXEsjibjQ3746iu4iSesiMAO7FM0u9JNkAiZ3RbN0TT8aAzo0QUe3wE1wLOfCaW_LV58ZUFvu4Jp8VcRYtLlFq2jaZ4IhvfVwk9EAHZ2f2uNFvgXVQwrjI8lddgCE_MHRU2_3rGmlnYXAhqWlm22ouXXjaE7nx7oKhyinkx8WQ1Qz1t7wnWmQku8NFdH3eu0s6Q/https%3A%2F%2Fmail.nmr.mgh.harvard.edu%2Fmailman%2Flistinfo%2Ffreesurfer>

___
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu<mailto:Freesurfer@nmr.mgh.harvard.edu>
MailScanner has detected a possible fraud attempt from "secure-web.cisco.com" 

Re: [Freesurfer] Cortical surface analysis

2021-04-06 Thread Fischl, Bruce
Hi Ornaith

The mapping uses the vertex index. That is, the vertex index is stored in the 
flatmap, so you should always be able to recover it, then look up the location 
of that vertex on any other surface (of the same hemisphere/subject)

Cheers
Bruce

From: freesurfer-boun...@nmr.mgh.harvard.edu 
 On Behalf Of Ornaith O Reilly
Sent: Tuesday, April 6, 2021 2:19 PM
To: Freesurfer support list 
Subject: Re: [Freesurfer] Cortical surface analysis


External Email - Use Caution
Hello FreeSurfer developers,

Thanks a lot for your help.  I have initialised the pialxyz the way you 
suggested and made the flatmap in MatLab using the read_patch function 
(screenshots attached).  I still don't understand how to convert between the 
two.  For example how to see what point (x,y,z) on the pial surface corresponds 
to what (x,y) point on the flatmap.

Thanks a lot for your help.

Kind Regards,
Ornaith



On Tue, 16 Mar 2021 at 15:58, Douglas N. Greve 
mailto:dgr...@mgh.harvard.edu>> wrote:

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<mailto:Freesurfer@nmr.mgh.harvard.edu>

MailScanner has detected a possible fraud attempt from "secure-web.cisco.com" 
claiming to be 
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer<https://secure-web.cisco.com/1Ogp5ZeoS72_H9fgRPteNOma_J9hPaTfdzd6HC3IGubCY3vT-6900ngXdEssiUKOEN83iJbaRuxNMiShdLlOKXEsjibjQ3746iu4iSesiMAO7FM0u9JNkAiZ3RbN0TT8aAzo0QUe3wE1wLOfCaW_LV58ZUFvu4Jp8VcRYtLlFq2jaZ4IhvfVwk9EAHZ2f2uNFvgXVQwrjI8lddgCE_MHRU2_3rGmlnYXAhqWlm22ouXXjaE7nx7oKhyinkx8WQ1Qz1t7wnWmQku8NFdH3eu0s6Q/https%3A%2F%2Fmail.nmr.mgh.harvard.edu%2Fmailman%2Flistinfo%2Ffreesurfer>

___
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu<mailto:Freesurfer@nmr.mgh.harvard.edu>
MailScanner has detected a possible fraud attempt from "secure-web.cisco.com" 
claiming to be 
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer<https://secure-web.cisco.com/1Ogp5ZeoS72_H9fgRPteNOma_J9hPaTfdzd6HC3IGubCY3vT-6900ngXdEssiUKOEN83iJbaRuxNMiShdLlOKXEsjibjQ3746iu4iSesiMAO7FM0u9JNkAiZ3RbN0TT8aAzo0QUe3wE1wLOfCaW_LV58ZUFvu4Jp8VcRYtLlFq2jaZ4IhvfVwk9EAHZ2f2uNFvgXVQwrjI8lddgCE_MHRU2_3rGmlnYXAhqWlm22ouXXjaE7nx7oKhyinkx8WQ1Qz1t7wnWmQku8NFdH3eu0s6Q/https%3A%2F%2Fmail.nmr.mgh.harvard.edu%2Fmailman%2Flistinfo%2Ffreesurfer>
___
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer

Re: [Freesurfer] Cortical surface analysis

2021-04-06 Thread Ornaith O Reilly
External Email - Use Caution

Hello FreeSurfer developers,

Thanks a lot for your help.  I have initialised the pialxyz the way you
suggested and made the flatmap in MatLab using the read_patch function
(screenshots attached).  I still don't understand how to convert between
the two.  For example how to see what point (x,y,z) on the pial surface
corresponds to what (x,y) point on the flatmap.

Thanks a lot for your help.

Kind Regards,
Ornaith




On Tue, 16 Mar 2021 at 15:58, Douglas N. Greve 
wrote:

>
>
> 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 
> listfreesur...@nmr.mgh.harvard.eduhttps://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
>
>
> ___
> Freesurfer mailing list
> Freesurfer@nmr.mgh.harvard.edu
> https://secure-web.cisco.com/1Ogp5ZeoS72_H9fgRPteNOma_J9hPaTfdzd6HC3IGubCY3vT-6900ngXdEssiUKOEN83iJbaRuxNMiShdLlOKXEsjibjQ3746iu4iSesiMAO7FM0u9JNkAiZ3RbN0TT8aAzo0QUe3wE1wLOfCaW_LV58ZUFvu4Jp8VcRYtLlFq2jaZ4IhvfVwk9EAHZ2f2uNFvgXVQwrjI8lddgCE_MHRU2_3rGmlnYXAhqWlm22ouXXjaE7nx7oKhyinkx8WQ1Qz1t7wnWmQku8NFdH3eu0s6Q/https%3A%2F%2Fmail.nmr.mgh.harvard.edu%2Fmailman%2Flistinfo%2Ffreesurfer
___
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer

Re: [Freesurfer] Cortical surface analysis

2021-03-16 Thread Douglas N. Greve



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


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

[Freesurfer] Cortical surface analysis

2021-03-08 Thread Ornaith O Reilly
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.

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?

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