[FieldTrip] Activity "outside the brain" using ft_sourceinterpolate

Loehrer at staff.uni-marburg.de Loehrer at staff.uni-marburg.de
Tue May 10 12:56:19 CEST 2022


Dear FieldTrip community,

During my analysis of EEG data, I am encountering an issue using  
ft_sourceinterpolate. In short, the paradigm performed during  
EEG-acquisition included a tapping- and a resting-state.
So far, I preprocessed the functional data using custom-made scripts  
and FieldTrip routines, which resulted in a data structure as obtained  
by ft_preprocessing. The individual MRIs were segmented using  
FreeSurfer and loaded into Brainstorm to create a BEM head model using  
OpenMEEG. Afterwards, the individual MRI, leadfield, and sourcemodel  
(based on the subjects cortical sheet) were converted to  
Fieldtrip-format using out_fieldtrip_mri and out_fieldtrip_headmodel,  
respectively. After conversion, I checked that sensors, headmodel,  
sourcemodel, and leadfield align nicely. *
The issue arises, when I call ft_sourceinterpolate with my functional  
data (cross-spectral density matrix calculated with ft_freqanalysis,  
method = mtmfft, taper = dpss; coherence computed with  
ft_sourceanalysis, method = dics, head and leadfield taken from  
Brainstorm, both in the CTF-coordinate system, thus representing a 2D  
triangulated surface mesh) and the individual MRI in CTF space  
converted to Fieldtrip-format (a 3D regular grid with 256*256*256 data  
points). Basically, what happens is that ft_sourceinterpolate calls  
ft_checkdata in line 165 to check the MRI, which itself calls  
fixinside in line 634. This script assumes that “all positions are  
inside the region of interest”, thus it creates a variable called  
“inside” with 256*256*256 ones in the anatomical data. Therefore, when  
plotting the output of ft_sourceinterpolate, I end up with “spurious”  
activity outside the brain, as there is no definition of the voxels  
within the brain in the individual MRI.

I believe that one workaround would be to create a variable “inside”  
with the voxels inside the brain as defined by the headmodel. However,  
I do not know how to convert the 2D mesh inside the  
headmodel.bnd(3).pos to a 3D volumetric information based on the  
respective MRI. Do you have any suggestions how to achieve this, or  
any other suggestions on how to avoid the “spurious” activity outside  
the brain?

I am using FieldTrip version 20211020 on Windows 10.
The code used is:

inside = false(size(leadfield_final.pos,1),1);
inside(indm1,:) =  leadfield_final.inside(indm1,:); %(where indm1 is  
the index of dipoles located in M1)

cfg                 = [];
cfg.frequency       = freq_csd.freq;
cfg.method          = 'dics';
cfg.refchan         = 'AccX';
cfg.headmodel       = headmodel_final;
cfg.sourcemodel     = leadfield_final;
cfg.sourcemodel.inside = inside;
cfg.dics.lambda       = '5%';
cfg.dics.keepfilter   = 'yes';
cfg.dics.fixedori     = 'yes';
cfg.dics.realfilter   = 'yes';
source_coh_ext_m1      = ft_sourceanalysis(cfg, freq_ext);

% Condition: Extern
cfg              = [];
cfg.parameter    = 'coh';
cfg.interpmethod = 'nearest';
cfg.coordsys     = 'ctf';
source_coh_ext_interp_m1   = ft_sourceinterpolate(cfg,  
source_coh_ext_m1, ftmri);

% plot the results
maxval = max(source_coh_ext_interp_m1.coh);

cfg               = [];
cfg.method        = 'ortho';
cfg.funparameter  = 'coh';
cfg.maskparameter = 'coh';
cfg.funcolorlim   = [0.0 maxval];
cfg.opacitylim    = [0.0 maxval];
cfg.opacitymap    = 'rampup';
ft_sourceplot(cfg, source_coh_ext_interp_m1);

Any help is very much appreciated.

Best,


Philipp


* ( additional info that might be useful: I calculated the  
transformation matrices for conversion from CTF- to MNI-space using  
the maff8-algorithm, converted the individual sourcemodels to  
MNI-space applying these transformation matrices, and mapped the  
HCP-atlas onto the sourcemodel using ft_sourceinterpolate. Employing  
this approach, I identified the dipoles/grid points located within  
several regions of interest. These dipoles will then be used as an  
input for ft_sourceanalysis, as I want to employ a DICS-beamformer to  
find the dipole that shows maximum coherence with movement.  
Subsequently, I want to use a LICS-beamformer to create a virtual  
channel time series of that dipole and continue processing the data.)


-- 
Dr. med. Philipp Löhrer

Assistenzarzt der Klinik für Neurologie
Universitätsklinikum Giessen und Marburg, Standort Marburg
Baldingerstraße
35033 Marburg



More information about the fieldtrip mailing list