[FieldTrip] Issue with cortical sheet atlasing using Freesurfer and HCP-WB - with solution

tibor.auer at gmail.com tibor.auer at gmail.com
Wed Oct 20 13:14:23 CEST 2021


Dear FieldTrippers,

 

I came across an issue when atlasing the source-level measures and the
sourcemodel was estimated using FreeSurfer cortical sheet.

 

The typical code to read the corresponding FreeSurfer annotation uses
ft_read_atlas:

 

    atlaslh = ft_read_atlas({'label/lh.aparc.DKTatlas','surf/lh.pial'
},'format','freesurfer_aparc');

    atlasrh = ft_read_atlas({'label/rh.aparc.DKTatlas','surf/rh.pial'
},'format','freesurfer_aparc');

    sourceatlas = rmfield(atlaslh,'rgba');

    sourceatlas.pos = vertcat(atlaslh.pos, atlasrh.pos);

    sourceatlas.tri = vertcat(atlaslh.tri, atlasrh.tri+size(atlaslh.pos,1));

    sourceatlas.aparclabel =
vertcat(spm_file(atlaslh.aparclabel,'prefix','lh_'),spm_file(atlaslh.aparcla
bel,'prefix','rh_'));

    sourceatlas.aparc = vertcat(atlaslh.aparc,
atlasrh.aparc+numel(atlaslh.aparclabel));

 

The issue, however, is that the positions do not correspond to those of the
sourcemodel. It is not a FieldTrip issue, but a more generic one. E.g. FSL:
JISCMail - FSL Archives
<https://www.jiscmail.ac.uk/cgi-bin/webadmin?A2=fsl;19c45d5b.1803> . FSL
solves the issue by asking for a reference image (typically a volume from
the same FreeSurfer processing). Based on the FSL codes for fsleyes
<https://open.win.ox.ac.uk/pages/fsl/fsleyes/fsleyes/apidoc/_modules/fsleyes
/displaycontext/meshopts.html>  and fsl.data.mghimage
<https://git.fmrib.ox.ac.uk/fsl/fslpy/-/blob/master/fsl/data/mghimage.py> ,
I managed to implement something similar in MATLAB:

 

    fsmri = MRIread('mri/T1.mgz');

    sourceatlas = ft_transform_geometry(fsmri.vox2ras/fsmri.tkrvox2ras,
sourceatlas);

 

After transformation, the sourceatlas will be aligned to the sourcemodel.

 

Kind regards,

Tibor 

 

Auer, Tibor M.D. Ph.D.

Research Fellow

School of Psychology, Faculty of Health and Medical Sciences

University of Surrey, Guildford GU2 7XH

 <mailto:T.Auer at surrey.ac.uk> T.Auer at surrey.ac.uk

 
<https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Ftwitter.c
om%2FTiborAuer&data=04%7C01%7Ct.auer%40surrey.ac.uk%7C5f32dba325f5422f5c5a08
d8becc029f%7C6b902693107440aa9e21d89446a2ebb5%7C0%7C0%7C637469131016806177%7
CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiL
CJXVCI6Mn0%3D%7C1000&sdata=wkpejqTmmo%2Fe4JA9QIaA6Z3%2BzipbFY%2FCEmRXC9UvKJs
%3D&reserved=0> @TiborAuer

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20211020/cf80c86c/attachment.htm>


More information about the fieldtrip mailing list