[FieldTrip] EEG source analysis Leadfield issue

Elisa Tatti Elisatatti at msn.com
Fri Dec 4 20:42:29 CET 2020


Good evening,
hope you are all doing fine!
We are trying to compute the source analysis on our 180 channels EEG recording and we are experiencing some issues.
Unfortunately, we don't have either single-subject MRI and the electrode position registration, therefore we are relying on Fieldtrips' sourcemodel and headmodel files.

We first aligned our EEG channel location to the headmodel (standard_BEM) using the command:


elec= freqPre.elec;

headtemp= ft_convert_units(headmodel,'cm');



cfg = [];

cfg.method    = 'project';

cfg.elec      = elec;

cfg.channel   = lay.label;

cfg.headshape = headtemp.bnd;

elec_aligned = ft_electroderealign(cfg);

and checked the solution using the function ft_prepare_vol_sens


cfg= [];

cfg.headmodel= headtemp; %structure with volume conductor definition

cfg.sens     = elec_aligned; %elec_aligned; %structure with gradiometer or electrode definition

[headmodel, elec_new] = ft_prepare_vol_sens(headtemp, elec_aligned);



We then loaded the sourcemodel "standard_sourcemodel3d10mm.mat" from the Fieldtrip sourcemodel template and computed the leadfield with the following command:



cfg                  = [];

cfg.elec             = elec_new;

cfg.headmodel        = headmodel;

cfg.sourcemodel      = sourcemodel;

cfg.resolution       = 1;

cfg.sourcemodel.unit = 'cm';

sourcemodel_and_leadfield = ft_prepare_leadfield(cfg);


Although the leadfield structure contains values in mV, when we try to plot the leadfield (as displayed in this Fieldtrip tutorial:https://www.fieldtriptoolbox.org/workshop/oslo2019/forward_modeling/)  our voltage distribution is zero.

We also tried to change the source index but we are never able to obtain a voltage distribution.


Are we missing a necessary step? Does somebody have any advice?


Any advice would be greatly appreciated!


Thank you in advance for your attention.


Elisa and Francesca




Below we report the code we used to plot the leadfield:


figure('units', 'normalized', 'outerposition', [0 0 0.5 0.5])
source_index = 1200; %% a superficial sources
sensory_dipole_current = 100e-9; % Am (realistic)

n_sensors = length(elec_realigned.label);

inside_sources = find(sourcemodel_and_leadfield.inside);
inside_index = inside_sources(source_index);
lead = sourcemodel_and_leadfield.leadfield{inside_index};
xs = zeros(1, n_sensors);
ys = zeros(1, n_sensors);
zs = zeros(1, n_sensors);
voltages = zeros(1, n_sensors);
titles = {'Lead field (x)' 'Lead field (y)' 'Lead field (z)'};

% get the xyz and norm

for sensor_index = 1:n_sensors
    this_x = lead(sensor_index, 1);
    this_y = lead(sensor_index, 2);
    this_z = lead(sensor_index, 3);
    this_norm = norm(lead(sensor_index, :));
    xs(sensor_index) = this_x * sensory_dipole_current;
    ys(sensor_index) = this_y * sensory_dipole_current;
    zs(sensor_index) = this_z * sensory_dipole_current;
    voltages(sensor_index) = this_norm * sensory_dipole_current;
end

% plot xyz
axes = {xs ys zs};

for axis_index = 1:3
    this_axis = axes{axis_index};
    subplot(1, 3, axis_index)
    hold on
    ft_plot_topo3d(elec_realigned.chanpos, this_axis, 'facealpha', 0.8)
    if strcmp(headmodel.type, 'dipoli')
        caxis([-10e-6, 10e-6])
    end
    c = colorbar('location', 'southoutside');
    c.Label.String = 'Lead field (V)';
    axis tight
    ft_plot_mesh(mesh_brain, 'facealpha', 0.10);
    ft_plot_sens(elec_realigned, 'elecsize', 20);
    title(titles{axis_index})
    plot3(sourcemodel_and_leadfield.pos(inside_index, 1), ...
      sourcemodel_and_leadfield.pos(inside_index, 2), ...
      sourcemodel_and_leadfield.pos(inside_index, 3), 'bo', ...
      'markersize', 20, 'markerfacecolor', 'r')
end

% plot norm

figure('units', 'normalized', 'outerposition', [0 0 0.5 0.85])
hold on
ft_plot_topo3d(elec_realigned.chanpos, voltages, 'facealpha', 0.8)
if strcmp(headmodel.type, 'dipoli')
    caxis([0, 10e-6])
end
c = colorbar('location', 'eastoutside');
c.Label.String = 'Lead field (V)';
axis tight
ft_plot_mesh(mesh_brain, 'facealpha', 0.10);
ft_plot_sens(elec_realigned, 'elecsize', 20);
title('Leadfield magnitude')
plot3(sourcemodel_and_leadfield.pos(inside_index, 1), ...
  sourcemodel_and_leadfield.pos(inside_index, 2), ...
  sourcemodel_and_leadfield.pos(inside_index, 3), 'bo', ...
  'markersize', 20, 'markerfacecolor', 'r')

view(-90, 0)



Elisa Tatti, Ph.D

Post Doctoral Research Fellow

CUNY, School of Medicine

160 Convent ave

10031

New York City, NY



Tel. +1 3472043952



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


More information about the fieldtrip mailing list