<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body style="overflow-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;">
Hi Monalisa,
<div><br>
</div>
<div>Rather than calling this a ’normalization’ issue, I’d call it an ‘interpolation’ issue.</div>
<div>The anatomical image that you use for the interpolation is most likely (well actually 100% sure) defined in a coordinate system that is different from the coordinates in which the functional data is defined. </div>
<div><br>
</div>
<div>If your main goal is to have a higher resolution anatomical in the background, you either need to align the single subject anatomical image to the template’s coordinate system, or use a high resolution template image, such as the one you can find in the
 fieldtrip/template/anatomy directory.</div>
<div><br>
</div>
<div>Good luck,</div>
<div>Jan-Mathijs</div>
<div><br>
</div>
<div><br>
</div>
<div>
<div><br>
<blockquote type="cite">
<div>On 20 Jun 2024, at 08:36, MONALISA CHIKEZIE via fieldtrip <fieldtrip@science.ru.nl> wrote:</div>
<br class="Apple-interchange-newline">
<div>
<div dir="ltr">Hi All,
<div>I am Monalisa, a neuroscience master's student doing research for my thesis. I am relatively new to fieldtrip. I have a dataset obtained from stats results (obtained after using dics beamformer and parametric permutation test) which I am trying to plot
 the brain activations during the experiment. My experiment had 100 participants and I used one participant's anatomical brain as my template. However, most activations are outside the brain. I do not know if this is a normalization issue. Below is an example
 of the images I generate.</div>
<div><span id="cid:ii_lxmvozur0"><image.png></span><br>
</div>
<div><br>
</div>
<div>I used the code from this tutorial : <a href="https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.fieldtriptoolbox.org%2Ftutorial%2Fplotting%2F%23plotting-data-at-the-source-level&data=05%7C02%7Cfieldtrip%40science.ru.nl%7Cee7abd47e79a4448683608dc92f4db68%7C084578d9400d4a5aa7c7e76ca47af400%7C1%7C0%7C638546827537308225%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&sdata=G0M0Heesakdii6xSn%2FgISC4QHjL0P2qv1BOFdKn6HuU%3D&reserved=0" originalsrc="https://www.fieldtriptoolbox.org/tutorial/plotting/#plotting-data-at-the-source-level" shash="yVaeRCX8NNz4eCImf5PWnaRvuauJdt7583WIc0DW50lF1kAMkvXJt0G7vaZAsv6xuS26g/KaSnFI+/3EAbGB2intZCQ1DJEa7t+aMKiviGJnWG/iduHxga3eo1CRoQNsuwLZ37nRX1ZWt5Qd3TLpE/vrDCbZSY+aw/L3mJw8gm4=" originalsrc="https://www.fieldtriptoolbox.org/tutorial/plotting/#plotting-data-at-the-source-level" shash="n7SWXTD5Fm0vfv9LvpK6U5Ac6NKPJpU2WayONk2SpYnca++gK6xZx36/vxl3oKxfW93+iyQ7h1ZyYCsMf37moLs42iiuQDjVgXsKFy/G4dL3GqBzA2CrIu9XM3eGa0pthg0DV36AF9RlYOcIiSxKtlBZx9AnWViBgqcI2y4v/VQ=">
https://www.fieldtriptoolbox.org/tutorial/plotting/#plotting-data-at-the-source-level</a>:</div>
<div><br>
</div>
<div>My code</div>
<div>% Load results - get standard stat-results<br>
load('statresults/t_statres.mat'); <br>
</div>
<div><br>
</div>
<div>% Interpolation - get standard MRI</div>
<div>mri = ft_read_mri('Z:\EEG\sub-1_T1w.mat');  <br>
<br>
<br>
%Reslice<br>
cfg = [];<br>
mri = ft_volumereslice(cfg, mri);<br>
<br>
% Interpolate the statistical data onto the resliced MRI template<br>
cfg            = [];<br>
cfg.downsample = 2;<br>
cfg.parameter  = 'stat';<br>
cfg.interpmethod    = 'nearest';<br>
Stat_source  = ft_sourceinterpolate(cfg, t_statres , mri);<br>
<br>
% spatially normalize the data to brain sample<br>
cfg            = [];<br>
cfg.nonlinear  = 'no';<br>
cfg.spmversion = 'spm12' ;<br>
Stat_source  = ft_volumenormalise(cfg, Stat_source);<br>
<br>
<br>
save('statresults/Stat_source.mat', 'Stat_source'); <br>
%% DONE<br>
fprintf('DONE\n');<br>
</div>
<div><br>
</div>
<div>Plot code</div>
<div>cfg = [];<br>
</div>
cfg.method = 'ortho';<br>
cfg.funparameter = 'stat';<br>
cfg.maskparameter = cfg.funparameter;<br>
cfg.funcolorlim = [-2 2];  % Adjust the color limits if needed<br>
cfg.opacitylim = [-2 2];  % Adjust the opacity limits if needed<br>
cfg.opacitymap = 'rampup';<br>
cfg.anaparameter = 'anatomy';<br>
cfg.funcolormap = 'jet';<br>
<br>
ft_sourceplot(cfg, Stat_source);<br>
<br>
% Add title and save the plot<br>
title('Theta_SEMxAGE');<br>
saveas(gcf, 'Theta_EMxAGE.png');
<div>fprintf('DONE\n');<br>
</div>
<div><br>
</div>
<div>Previously, I used the template mri in fieldtrip; mri = ft_read_mri('Z:\EEG\software\fieldtrip\external\spm12\toolbox\OldNorm\T1.nii');</div>
<div><br>
</div>
<div>Using the template, I got this image. However, I wanted a sharper anatomical underlay. How do I resolve the error above?</div>
<div><span id="cid:ii_lxmvzu5f1"><image.png></span><br>
</div>
</div>
_______________________________________________<br>
fieldtrip mailing list<br>
https://mailman.science.ru.nl/mailman/listinfo/fieldtrip<br>
https://doi.org/10.1371/journal.pcbi.1002202<br>
</div>
</blockquote>
</div>
<br>
</div>
</body>
</html>