[FieldTrip] Interpolation using Talairach atlas

Uri Eduardo Ramírez Pasos urieduardo at gmail.com
Fri Jan 19 14:44:37 CET 2018


Dear fieldtrippers,

I'm following the Salzburg tutorial (
http://www.fieldtriptoolbox.org/tutorial/salzburg) but using only templates
(i.e., no subject MRIs) and the Talairach (with 'tal' coordinates) atlas
from AFNI.

However, when I run

    atlas =
ft_read_atlas('~/Documents/MATLAB/fieldtrip-20170618/template/atlas/afni/TTatlas+tlrc.HEAD');

    cfg=[];
    cfg.method='lcmv';
    cfg.grid=template_grid;
    cfg.grid.filter=sourceavg.avg.filter;
    cfg.vol=vol;
    sourcepreS1=ft_sourceanalysis(cfg, avgpre);
    sourcepstS1=ft_sourceanalysis(cfg, avgpst);

    cfg = [];
    cfg.parameter = 'avg.pow';
    cfg.operation = '((x1-x2)./x2)*100';
    S1bl=ft_math(cfg,sourcepstS1,sourcepreS1);

    templatefile =
'~/Documents/MATLAB/fieldtrip-20170618/external/spm8/templates/T1.nii';
    template_mri = ft_read_mri(templatefile);
    cfg              = [];
    cfg.voxelcoord   = 'no';
    cfg.parameter    = 'pow';
    cfg.interpmethod = 'nearest';
    source_int  = ft_sourceinterpolate(cfg, S1bl, template_mri);
    %%
    cfg=[];
    parcel = ft_sourceparcellate(cfg, source_int, atlas);

I get the following error

Index exceeds matrix dimensions.

Error in ft_sourceparcellate (line 172)
  fprintf('%d of the labeled positions are inside the brain\n',
  sum(source.inside(seg(:)~=0)));

This is probably due to the spm8 template having too few 'pos' values. Do
you know of other mri template that would work with the AFNI atlas?

Best regards,
Eduardo Ramirez, PhD student
University of Würzburg
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20180119/77d3a5e1/attachment-0001.html>


More information about the fieldtrip mailing list