Dear Szabolcs,
if the gifti files are in template space you can use atlas information
from the annotation files:
[vertices, label, colortable, csv] =
cat_io_FreeSurfer('read_annotation',fname);
The parameter label then codes the atlas regions and csv is a cell array
with the ROI id’s and names.
Assume your data are called „data“ and are same length as label
(please take care of the different atlases in 32k and 164k space):
for i=1:length(csv)
ind = find(label == csv{i,1});
mean_data(i) = mean(data(ind));
end
Best,
Christian
Christian Gaser, Ph.D.
Professor of Computational Neuroscience/Neuroimaging
Biomagnetic Center
Structural Brain Mapping Group
Department of Neurology
Jena University Hospital
Am Klinikum 1, D-07747 Jena, Germany
Tel: ++49-3641-9325778 Fax: ++49-3641-9325772
e-mail: [log in to unmask]
http://www.neuro.uni-jena.de
On 13 Aug 2019, at 15:56, Szabolcs David wrote:
> Dear Christian,
>
> Thanks a lot, I was not clear with the description: these are gii
> files
> from CAT not from FS. With the 'gifti' matlab command I read all
> individual
> subjects' resampled cortical thickness gii-s, like
> s15.mesh.thickness.resampled.subject_ID.gii, used the cdata for the
> fitting
> and saved the vertexwise coefficients. So these are (regular? cat12
> style?
> not sure about the term) gii files including both hemispheres, from
> which I
> would like get the surface atlas based mean values.
>
> Best,
> Szabolcs
>
> On Sun, Aug 11, 2019 at 11:23 PM Christian Gaser <
> [log in to unmask]> wrote:
>
>> Dear Szabolcs,
>>
>> On Thu, 8 Aug 2019 17:25:27 +0200, Szabolcs David <
>> [log in to unmask]> wrote:
>>
>>> Dear Christian,
>>>
>>> I did some custom vertexwise fitting/modeling between cortical
>>> thickness
>>> (CT) values and clinical scores of patients, for which I used the
>>> already
>>> template resampled CT and now I have some 'coefficients' on the
>>> merged
>>> surface. Is there a way to calculate surface ROI-based means of
>>> these
>>> scalars via the surface atlases (DK, HCP, etc.)? The 'Extract ROI
>>> based
>>> surface values' tool expect separate hemispherical data.
>>
>> If, the scalars are in native space in Freesurfer format, you can
>> also
>> apply the surface ROIs. The function cat_io_Freesurfer can be used
>> for that
>> purpose.
>>>
>>> Best,
>>> Szabolcs
>>>
>>
>>
>>
|