[FieldTrip] ROI-based source analysis with ft_sourcestatistics

Zito Giuseppe Angelo giuseppeangelo.zito at hest.ethz.ch
Wed Aug 24 15:53:15 CEST 2022


Dear Fieldtrip community,

I would like to bring up the topic of ROI-based source analysis. I’ve seen that many have asked about this in the last years, but I could not find an answer that worked.

I would like to restrict my ft_sourcestatistics to specific ROIs taken from the aal atlas. I implemented the code as suggested in other discussions/tutorials, but the results are identical to the ones obtained without ROI selection.
Could you please give me an advice on how to solve it?

Here is my code:

realPrePost{1} =

  struct with fields:

      freq: 5.5008
       cfg: [1×1 struct]
       dim: [15 18 15]
    inside: [4050×1 logical]
       pos: [4050×3 double]
    method: 'average'
       avg: [1×1 struct]


% Prepare cfg to run the stats
cfg                  = [];
cfg.dim              = realPrePost{1}.dim;
cfg.method           = 'montecarlo';
cfg.statistic        = 'ft_statfun_indepsamplesT';
cfg.parameter        = 'pow';
cfg.correctm         = 'cluster';
cfg.clusteralpha     = 0.05;
cfg.numrandomization = 10000;
cfg.alpha            = 0.05;
cfg.tail             = 0;

% Atlas-related cfg options
aal = ft_read_atlas('C:\toolbox\fieldtrip-20220317\template\atlas\aal\ROI_MNI_V4.nii');
cfg.atlas        = aal;
cfg.roi          = aal.tissuelabel(63:64);
cfg.avgoverroi   = 'yes';
cfg.hemisphere   = 'both'; % 'combined'

% Design matrix
designMatrix = [];
designMatrix(1,1:nReal+nSham) = [ones(1,nReal) 2*ones(1,nSham)];
cfg.design = designMatrix;
cfg.ivar = 1;
stat = ft_sourcestatistics(cfg, realPrePost{:}, shamPrePost{:});
% Load and reslice MRI template
mri = ft_read_mri('C:\toolbox\fieldtrip-20220317\template\anatomy\single_subj_T1_1mm.nii');
mri = ft_volumereslice([], mri);
cfg            = [];
cfg.downsample = 2;
cfg.parameter  = 'stat';
statPlot  = ft_sourceinterpolate(cfg, stat, mri);
% Plot source
close all
maxval = max(statPlot.stat);
cfg = [];
cfg.method        = 'ortho';
cfg.funparameter  = 'stat';
cfg.maskparameter = cfg.funparameter;
cfg.funcolorlim   = [0.5 maxval];
cfg.opacitylim    = [0.5 maxval];
cfg.opacitymap    = 'rampup';
ft_sourceplot(cfg, statPlot);

Any help would be appreciated,
Giuseppe

________________________________
Dr. Giuseppe Angelo Zito
Principal Investigator, Swiss National Science Foundation

Decision Neuroscience Lab
Department of Health Sciences and Technology (D-HEST)
ETH – Swiss Federal Institute of Technology Zurich

Winterthurerstrasse 190
8057 Zürich
Switzerland

Tel: +41 44 633 05 17
mailto: giuseppeangelo.zito at hest.ethz.ch

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


More information about the fieldtrip mailing list