Hi,
Please, help me to find out how to extract information I need. For each vertex in the geometry of the cortical surface I want an additional label that tells me which ROI this vertex belongs to. I extract all geometrical information using:
mne_read_surfaces
in matlab.
This, however, does not give me the labels for ROI of each vertex. I plan to use freesurfer atlas for ROIs, but if anyone has a general answer that is suitable for any atlas I will be happy. A step by step guide would be appreciated :)
Thanks!
-- Sergey
Hi Sergey,
In matlab you you can use read_annotation.m:
function [vertices, label, colortable] = read_annotation(filename) % [vertices, label, colortable] = read_annotation(annotfilename.annot) % % vertices expected to be simply from 0 to number of vertices - 1; % label is the vector of annotation % % colortable is empty struct if not embedded in .annot. Else, it will be % a struct. % colortable.numEntries = number of Entries % colortable.orig_tab = name of original colortable % colortable.struct_names = list of structure names (e.g. central sulcus and so\ on) % colortable.table = n x 5 matrix. 1st column is r, 2nd column is g, 3rd column % is b, 4th column is flag, 5th column is resultant integer values % calculated from r + g*2^8 + b*2^16 + flag*2^24. flag expected to be all 0.
On Fri, 7 Dec 2007, Sergey Plis wrote:
Hi,
Please, help me to find out how to extract information I need. For each vertex in the geometry of the cortical surface I want an additional label that tells me which ROI this vertex belongs to. I extract all geometrical information using:
mne_read_surfaces
in matlab.
This, however, does not give me the labels for ROI of each vertex. I plan to use freesurfer atlas for ROIs, but if anyone has a general answer that is suitable for any atlas I will be happy. A step by step guide would be appreciated :)
Thanks!
-- Sergey
Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
Thank you! Although I did not find the exact function you're describing, there is a function with the same name that has the following help:
help read_annotation
[annots] = read_annotation(fname) reads a binary annotation file into a vector
or this one
help freesurfer_read_annotation
freesurfer_read_annotation - reads a binary annotation file into a vector
[annots] = freesurfer_read_annotation(fname)
See also freesurfer_read_surf, freesurfer_read_curv, freesurfer_read_wfile
The vector returned has 7-8 digit numbers in it, and they do look like if they can be ROI labels. e.g:
label(1:1000:10000)
ans =
9182740 9182740 9182740 9182740 6558940 9182740 9221140 9182740 3957880 14433500
Now how do I tell which ROI these indices correspond to?
Thank you!
-- Sergey
On Dec 7, 2007, at 8:43 PM, Bruce Fischl wrote:
Hi Sergey,
In matlab you you can use read_annotation.m:
Thank you! Although I did not find the exact function you're describing, there is a function with the same name that has the following help:
help read_annotation
[annots] = read_annotation(fname) reads a binary annotation file into a vector
or this one
help freesurfer_read_annotation
freesurfer_read_annotation - reads a binary annotation file into a vector
[annots] = freesurfer_read_annotation(fname)
See also freesurfer_read_surf, freesurfer_read_curv, freesurfer_read_wfile
The vector returned has 7-8 digit numbers in it, and they do look like if they can be ROI labels. e.g:
label(1:1000:10000)
ans =
9182740 9182740 9182740 9182740 6558940 9182740 9221140 9182740 395788014433500
Now how do I tell which ROI these indices correspond to?
Thank you!
-- Sergey
On Dec 7, 2007, at 8:43 PM, Bruce Fischl wrote:
Hi Sergey,
In matlab you you can use read_annotation.m:
Hi Sergey,
here's read_annotation.m. It should also return the embedded colormap that's in the .annot file, including structure names. Not sure why it's not in your distribution.
cheers, Bruce
On Sat, 8 Dec 2007, Sergey Plis wrote:
Thank you! Although I did not find the exact function you're describing, there is a function with the same name that has the following help:
help read_annotation
[annots] = read_annotation(fname) reads a binary annotation file into a vector
or this one
help freesurfer_read_annotation
freesurfer_read_annotation - reads a binary annotation file into a vector
[annots] = freesurfer_read_annotation(fname)
See also freesurfer_read_surf, freesurfer_read_curv, freesurfer_read_wfile
The vector returned has 7-8 digit numbers in it, and they do look like if they can be ROI labels. e.g:
label(1:1000:10000)
ans =
9182740 9182740 9182740 9182740 6558940 9182740 9221140 9182740 395788014433500
Now how do I tell which ROI these indices correspond to?
Thank you!
-- Sergey
On Dec 7, 2007, at 8:43 PM, Bruce Fischl wrote:
Hi Sergey,
In matlab you you can use read_annotation.m:
Hi Bruce,
Thanks a lot! This one does work as described and provides me with information I need.
-- Sergey
Hi Sergey,
here's read_annotation.m. It should also return the embedded colormap that's in the .annot file, including structure names. Not sure why it's not in your distribution.
cheers, Bruce
freesurfer@nmr.mgh.harvard.edu