WB_EEG_CalcLeadfield_standardBEM is a tool to generate conduction model of the head based on boundary element method (BEM) using standard MRI T1 image, and computes the forward model for many dipole locations on a 2D brain mesh or regular 3D grid and stores it for efficient inverse modelling using FieldTrip for EEG. The coordinates of head model is standard MNI space, and the electrodes will be aligned later to the existing standard head model. Some codes obtained from FieldTrip 20181025 and EEGLAB were integrated. More details of leadfield calculation can be seen in the FieldTrip toolbox (http://www.fieldtriptoolbox.org/).
Fig. 9: A standard headmodel used in the tool. The conductivity of tissues are: brain = 0.33, skull = 0.0041 and scalp = 0.33; and the number of vertices of tissues are: brain = 1500 points, skull = 1000 points and scalp = 500 points.
seleChanns: number with indices of the selected EEG channels (e.g. ‘[1:4,7:30]’ or ‘all’). Default is ‘all’;
0: XYZ coordinates is the electorde array with their Cartesian x (the left ear is defined as -x axis), y (the nasion is the +y axis), z coordinates in three columns.
1: XYZ coordinates is the electorde array with their Cartesian x (the nasion is the +x axis), y (the left ear is the +y axis), z coordinates in three columns. Default is 1.
gridresolution: The grid resolution of dipoles (sources) inside the brain. If it is empty or <=0, the default dipoles are vertices which are little smaller than brain, and the orientations of dipoles are their normal vector directions, i.e. the normals of the brain mesh. If it >0 (unit is mm), the dipoles are distributed on regular 3D grid inside brain mesh. The orientations of dipoles are X, Y and Z orientations, i.e. there are X, Y and Z oriented dipoles. Default is ‘’.
A standard headmodel using ‘dipoli’ method based on BEM were used in this tool. The headmodel contains a standard Boundary Element Method volume conduction model of the head that can be used for EEG forward and inverse computations. The geometry is based on the “colin27” template that is described further down. The BEM model is expressed in MNI coordinates in mm. A very similar BEM volume conduction model (based on the same template data) is described and validated by Fuchs et al. in Clin Neurophysiol. 2002 May; 113(5):702-12. More details can see: http://www.fieldtriptoolbox.org/template/headmodel/.
vol: headmodel used in the function;
vol.bnd: mesh of scalp, skull and brain;
vol.cond: conductivity of tissues, order is [scalp, skull and brain];
vol.type: BEM method used (default is ‘dipoli’);
vol.unit:unit of head model coordinates.
(1)The “colin27” anatomical MRI and its relation to the TT and MNI template atlas is described in detail on http://imaging.mrc-cbu.cam.ac.uk/imaging/MniTalairach The original construction of the averaged MRI is detailed in [http://www.ncbi.nlm.nih.gov/pubmed/9530404| Holmes CJ, Hoge R, Collins L, Woods R, Toga AW, Evans AC. Enhancement of MR images using registration for signal averaging. J Comput Assist Tomogr. 1998 Mar-Apr;22(2):324-33.]
(2)Most of electrode location files are supported (More details can be seen in readlocs() in EEGLAB):
'.loc' or '.locs' or '.eloc': polar coordinates;
'.sph': Matlab spherical coordinates;
'.elc': Cartesian 3-D electrode coordinates scanned using the EETrak software;
'.elp': Polhemus-.'elp' Cartesian coordinates;
'.elp': BESA-'.elp' spherical coordinates: Need to specify 'filetype','besa';
'.xyz': Matlab/EEGLAB Cartesian coordinates;
'.asc', '.dat': Neuroscan-.'asc' or '.dat' Cartesian polar coordinates text file;
'.sfp': BESA/EGI-xyz Cartesian coordinates;
'.ced': ASCII file saved by pop_chanedit() in EEGLAB.
The standard headmodel:
FieldTrip toolbox and Forward Problem:
http://www.fieldtriptoolbox.org/worksho ... rdproblem/
http://www.fieldtriptoolbox.org/tutoria ... eg&s=bem
For each subject/electrode file, output is a MATLAB .mat file (lf_*.mat) in which contains a structure lf including leadfield and parameter settings and a structure elec_aligned including aligned electrodes and parameter settings. Meanwhile, a *.png figure file of alignment will be provided to check electrode alignment.
lf: leadfield results;
lf.leadfieldMatrix: leadfield matrix saved as (channels × sources);
lf.label: channel labels;
lf.dim: dimension of dipole (source) grid;
lf.unit: unit of head model coordinates;
lf.pos: positions of dipoles;
lf.mom: nomrals of dipoles (3 × sources);
lf.normals: nomrals of dipoles (sources × 3);
lf.inside: Boolean value of whether the lf.pos inside the brain;
lf.cfg: configuration of leadfield calculation;
lf.leadfield: leadfield saved as cell;
elec_aligned: aligned electrode coordinates;
elec_aligned.elecpos: aligned electrode positions;
elec_aligned.label: channel labels;
elec_aligned.cfg: configuration of alignment.
Fig. 10: An example result of alignment. The left figure shows the electrodes are not on the scalp, and the right figure shows the electrodes are well aligned.
Fig. 11: An example result of leadfield calculated by the tool. The left figure shows 1500 sources/dipoles (black points) and electrodes (purple points).The red arrow shows a source/dipole with orientation (the dipole orientation is its normal vector direction). The right figure shows the leadfield distribution of the example dipole.
Information and resources about the WeBrain tools
1 post • Page 1 of 1
Who is online
Users browsing this forum: No registered users and 1 guest