[FieldTrip] surface plot with atlas limited template_grid.inside
Elena Orekhova
orekhova.elena.v at gmail.com
Thu Jun 22 17:43:48 CEST 2017
Dear FT experts,
I just recently started to use Fieldtrip for my MEG data source
reconstruction.
I would like to use an atlas with my source reconstruction. I limited
template_grid.inside to the atlas, as advised in the tutorial (
http://www.fieldtriptoolbox.org/tutorial/salzburg)
%% Create template grid based on the standard head model
load(strcat(fieldtripfolder, '/template/headmodel/standard_singleshell'));
step=0.7;
cfg = [];
cfg.grid.xgrid = -20:step:20;
cfg.grid.ygrid = -20:step:20;
cfg.grid.zgrid = -20:step:20;
cfg.grid.unit = 'cm';
cfg.grid.tight = 'yes';
cfg.inwardshift = -1;
cfg.headmodel = vol;
template_grid = ft_prepare_sourcemodel(cfg);
%% Load atlas and create a binary mask
atlas = ft_read_atlas(strcat(fieldtripfolder,
'/template/atlas/aal/ROI_MNI_V4.nii') );
atlas = ft_convert_units(atlas,'cm');% assure that atlas and template_grid
are expressed in the %same units
cfg = []
cfg.atlas = atlas;
cfg.roi = atlas.tissuelabel; % here you can also specify a single label,
i.e. single ROI
cfg.inputcoord = 'mni';
mask = ft_volumelookup(cfg,template_grid);
% create temporary mask according to the atlas entries
tmp = repmat(template_grid.inside,1,1);
tmp(tmp==1) = 0;
tmp(mask) = 1;
% define inside locations according to the atlas based mask
template_grid.inside = tmp;
%%
Then I performed the source reconstruction using this template_grid and
plotted the result (induced visual gamma power) on the standard brain
surface.
The resulting surface image has ‘holes’ and it does not look correct to me.
When I do not limit the template_grid.inside to the atlas it looks much
better.
(figures are attached)
What am I doing wrong?
Best regards,
Elena
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20170622/2b26f9b2/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Example_to templatenomask.jpg
Type: image/jpeg
Size: 15192 bytes
Desc: not available
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20170622/2b26f9b2/attachment-0002.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Example_to atlas.jpg
Type: image/jpeg
Size: 16680 bytes
Desc: not available
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20170622/2b26f9b2/attachment-0003.jpg>
More information about the fieldtrip
mailing list