[FieldTrip] ft_sourceplot
Benedikt Wahl
benedikt.wahl at ndcn.ox.ac.uk
Wed Jul 26 18:15:41 CEST 2023
Dear Fieldtrip Community,
I am having some problems getting my interpolated statistic to plot and end up with a strange "swiss cheese" type image (see attached picture).
Specifically, I am trying to interpolate an arbitrary statistic ("Func" below) to the template anatomical.
Func =
struct with fields:
stat: [681×1 double]
pos: [681×3 double]
label: {681×1 cell}
My functional data has a lower resolution than the MRI and so the "pos" field wont line up with the anatomical. I am thus trying to use ft_sourceinterpolate "sphere_avg" method to thus map between the two:
% load template
templatefile = [ftpath '/template/anatomy/single_subj_T1.nii'];
template_mri = ft_read_mri(templatefile);
template_mri.coordsys = 'spm';
% run interpolation
cfg = [];
cfg.interpmethod = 'sphere_avg';
cfg.parameter = 'stat';
cfg.sphereradius = 20;
cfg.downsample = 1;
src = ft_sourceinterpolate(cfg, Func, template_mri);
And then plot the resulting statistics overlaid with the anatomical in ortho view:
% plot
cfg = [];
cfg.method = 'ortho';
cfg.funparameter = 'stat';
cfg.opacitymap = 'vup';
ft_sourceplot(cfg,src);
Running the code, the coefficients don't stretch out over the whole brain (see attached picture). How could I fix that?
The code as well as the necessary variables are attached to this mail.
Thank you very much!
Benedikt Wahl
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20230726/caf92abc/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sourceplot.png
Type: image/png
Size: 121342 bytes
Desc: sourceplot.png
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20230726/caf92abc/attachment.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sourceplot_variables.mat
Type: application/octet-stream
Size: 6055 bytes
Desc: sourceplot_variables.mat
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20230726/caf92abc/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sourceplot_codepiece.m
Type: application/octet-stream
Size: 534 bytes
Desc: sourceplot_codepiece.m
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20230726/caf92abc/attachment-0001.obj>
More information about the fieldtrip
mailing list