<div dir="ltr">Dear fieldtrippers,<div><br></div><div>I'm following the Salzburg tutorial (<a href="http://www.fieldtriptoolbox.org/tutorial/salzburg">http://www.fieldtriptoolbox.org/tutorial/salzburg</a><span class="sew1iwc8sn4inn9"></span><span class="sew8szmhvxp11k5"></span>) but using only templates (i.e., no subject MRIs) and the Talairach (with 'tal' coordinates) atlas from AFNI. </div><div><br></div><div>However, when I run </div><div><br></div><div>    atlas = ft_read_atlas('~/Documents/MATLAB/fieldtrip-20170618/template/atlas/afni/TTatlas+tlrc.HEAD');<span class="sew1iwc8sn4inn9"></span><span class="sew8szmhvxp11k5"></span><br></div><div><br></div><div><div>    cfg=[];</div><div>    cfg.method='lcmv';</div><div>    cfg.grid=template_grid;</div><div>    cfg.grid.filter=sourceavg.avg.filter;</div><div>    cfg.vol=vol;</div><div>    sourcepreS1=ft_sourceanalysis(cfg, avgpre);</div><div>    sourcepstS1=ft_sourceanalysis(cfg, avgpst);</div><div>    </div><div>    cfg = [];</div><div>    cfg.parameter = 'avg.pow';</div><div>    cfg.operation = '((x1-x2)./x2)*100';</div><div>    S1bl=ft_math(cfg,sourcepstS1,sourcepreS1);<span class="sew1iwc8sn4inn9"></span><span class="sew8szmhvxp11k5"></span></div></div><div><br></div><div><div>    templatefile = '~/Documents/MATLAB/fieldtrip-20170618/external/spm8/templates/T1.nii';</div><div>    template_mri = ft_read_mri(templatefile);</div><div>    cfg              = [];</div><div>    cfg.voxelcoord   = 'no';</div><div>    cfg.parameter    = 'pow';</div><div>    cfg.interpmethod = 'nearest';</div><div>    source_int  = ft_sourceinterpolate(cfg, S1bl, template_mri);</div><div>    %%</div><div>    cfg=[];</div><div>    parcel = ft_sourceparcellate(cfg, source_int, atlas);<span class="sew1iwc8sn4inn9"></span><span class="sew8szmhvxp11k5"></span></div></div><div><br></div><div>I get the following error</div><div><br></div><div><div>Index exceeds matrix dimensions.</div><div><br></div><div>Error in ft_sourceparcellate (line 172)</div><div>  fprintf('%d of the labeled positions are inside the brain\n',</div><div>  sum(source.inside(seg(:)~=0)));<span class="sew1iwc8sn4inn9"></span><span class="sew8szmhvxp11k5"></span></div></div><div><br></div><div>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?</div><div><br></div><div>Best regards,</div><div>Eduardo Ramirez, PhD student</div><div>University of Würzburg</div></div>