External Email - Use Caution
Hi Loïc,
you can load the atlases using `read_annotation` in Matlab, then of course use them for whatever purpose you like (including in surfstat). This code should get you started:
subjects_dir = '/data/mystudy'; subject_id = 'subject1'; hemi = 'lh';
aparc_file_this_hemi = fullfile(subjects_dir, subject_id, 'label', sprintf("%s.aparc.annot", hemi)); [vertices, label, colortable] = read_annotation(aparc_file_this_hemi); fprintf("Read aparc parcellation file '%s' containing %d regions.\n", aparc_file_this_hemi, length(colortable.struct_names)); for sidx = 1:length(colortable.struct_names) region = colortable.struct_names{sidx}; struct_code = colortable.table(sidx, 5); vertices_of_struct_roi = find(label == struct_code); fprintf("Found region '%s' with %d verts.\n", region, length(vertices_of_struct_roi)); end
To color the regions in surfstat, you would then need to set a colormap that has the correct number of colors (36 for Desikan, I think), using the colortable variable.
Best,
Tim
On May 23, 2019 at 11:35 AM Loïc Daumail loic.daumail@gmail.com wrote:
External Email - Use CautionHi Bruce,
I am coming back to this request as I was wondering: would it be possible to load freesurfer surface atlases in surfstat in order to label my surfaces? Is their format compatible? I saw surfstat only accepts a limited array of formats...
Thanks, Best,
Loïc
Le lun. 20 mai 2019 à 16:15, Bruce Fischl fischl@nmr.mgh.harvard.edu a écrit :
sure. All the fsaverages are in the same space (they are subsets of fsaverage) On Mon, 20 May 2019, Loïc Daumail wrote:
External Email - Use CautionHi Bruce,
Thanks for your response. Is it also fine for fsaverage5 surface or I
need to switch my data to
fsaverage?
Thanks,
Sincerely,
Loïc
Le lun. 20 mai 2019 à 15:52, Bruce Fischl fischl@nmr.mgh.harvard.edu
a écrit :
Hi Loic if you are on the fsaverage surface you can save the -log10(p)values
using save_mgh.m, then load them in freeview and threshold them or whatever cheers Bruce On Mon, 20 May 2019, Loïc Daumail wrote: > > External Email - Use Caution > > Also, one more thing: > > My data is on fsaverage5 resolution. > > Thanks in advance, > > Sincerely, > > Loïc > > Le lun. 20 mai 2019 à 09:49, Loïc Daumail <loic.daumail@gmail.com> a écrit :
> Dear Freesurfer community, > > I obtained score matrices of surfaces after performing diffusionembedding map on fMRI
data. > > I am now using the SurfStat toolbox(Matlab) in order to obtainp-value maps to compare
between > two groups. > > After obtaining the p-value map, I would like to label thesurface in order to
identify the > regions of significant difference between both groups. > > Would it be possible to use Freview in order to do it? > If so, which format should I use for my SurfStatP output p-valuemap?
> How would you do it, (tools to convert into a specific format,surfaces and atlas to
load on > Freeview, which format for those ones)? > I would be very grateful if you could detail a bit, as I am newto these tools!
> > Thanks in advance, > > Loïc Daumail > > >_______________________________________________ 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 mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer