[FieldTrip] Adding MRI Overlay to ft_sourceplot Images

Tate, Lindsey R. lindseyrtate at ou.edu
Mon Jul 9 06:59:13 CEST 2018


Hello fieldtrip community,


I have a project with a lot of source analysis of EEG data. I'm using ft_sourceanalysis and ft_sourceplot. I would like to add standard (e.g., Colin 27) MRI slices to these images as an overlay (underlay?) for reference. Is there a way to do this? How do I align the MRI with my source space?


Example code for ft_sourceanalysis and ft_sourceplot are provided below my signature in case you need the reference.


Thank you,


Lindsey Tate
PhD Candidate
University of Oklahoma
lindseyrtate at ou.edu


///

%baseline period source analysis

cfg = [];
cfg.elec = elec ;
cfg.method = 'dics';
cfg.frequency = 25 ;
cfg.grid = grid;
cfg.headmodel = headmodel;
cfg.dics.projectnoise = 'yes';
cfg.dics.lambda = 0;
cfg.latency = -0.7490 ;
[presource25] = ft_sourceanalysis(cfg, prefreq25) %from ft_freqanalysis

%same is done for a post-stimulus period, called pmsource25; code omitted for brevity

%difference between pre- and post-stimulus periods
source25diff = pmsource25 ;
source25diff.avg.pow = (pmsource25.avg.pow - presource25.avg.pow) ./ presource25.avg.pow;

%interpolate the difference between pre- and post-stimulus periods
cfg = [];
cfg.downsample = 2;
cfg.parameter = 'avg.pow';
source25DiffInt = ft_sourceinterpolate(cfg, source25diff, grid);

%plot
cfg = [];
cfg.method = 'slice';
cfg.funparameter = 'avg.pow';
cfg.maskparameter = cfg.funparameter;
cfg.funcolorlim = [-1 2];
cfg.opacitylim = [-5 1];
cfg.opacitymap = 'rampup';
ft_sourceplot(cfg, source25DiffInt);
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20180709/b7fc43dd/attachment-0001.html>


More information about the fieldtrip mailing list