<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<font face="monospace">Hi Jason<br>
<br>
Sorry for the late reply.<br>
</font>
<ol>
<li><font face="monospace">Yes, the leadfield is calculated for
the x, y, and z components.</font></li>
<li><font face="monospace">Just omit the ground electrode. The
electrodes in the forward solution should correspond to the
electrodes </font><font face="monospace">in your data. Please
be aware that due to the way the forward problem is solved
with TDCSLEADFIELD </font><font face="monospace"><font
face="monospace">(using reciprocity)</font>, you will need
to multiply by -1 when using it for EEG source analysis. Also,
the number of channels in the leadfield is one less than in
the cap file because one of them is used as reference during
the simulation. You will need to add this yourself afterwards
(all zeros). In the hdf5 file, the attributes </font><font
face="monospace"><font face="monospace">'reference_electrode'
and </font></font><font face="monospace"><font
face="monospace"><font face="monospace">'electrode_names'</font></font>
in mesh_leadfield/leadfields/tdcs_leadfield should tell you
which electrode was used as reference and </font><font
face="monospace"><font face="monospace">the names of all the
electrodes, respectively. Also, if you use an average
reference in your inverse analysis, remember to also convert
the forward solution to an average reference.</font></font></li>
<li><font face="monospace">We are currently working on SimNIBS 4.0
but it is not quite there yet. It will probably be a while
before it is released but I do not know the exact plans. To my
knowledge, we do not plan to implement inverse solvers in
SimNIBS as there are plenty of great implementations available
already, however, we do plan to allow people to interface with
other packages. I believe we will support MNE-Python and
perhaps FieldTrip. That way you should be able to integrate
forward solutions from SimNIBS with inverse solvers from these
software packages.</font><br>
</li>
</ol>
<font face="monospace">Let me know if anything is unclear.<br>
<br>
Best wishes,<br>
<br>
Jesper<br>
<br>
________________________________<br>
From: Jason Leung<br>
Sent: March 10, 2021 11:49 AM<br>
To: discuss at simnibs.org <discuss at simnibs.org><br>
Subject: SimNIBS for EEG Source Reconstruction<br>
<br>
Hello,<br>
<br>
I am trying to use SimNIBS for EEG source reconstruction and I
have a few questions.<br>
<br>
1. I noticed that the leadfield matrix created with
TDCSLEADFIELD that is stored in the hdf5 file has dimensions: [3 x
number of nodes x number of EEG electrodes]. I was wondering what
the first dimension of 3 here represents. Is it the current
density split into the X, Y, Z components?<br>
2. I'm trying to import my own EEG cap for the leadfield
calculations. In the EEG cap CSV file, I noticed that reference
electrode is labelled as 'ReferenceElectrode' as compared to other
electrodes which are just labelled 'Electrode'. Is there another
label for the ground electrode or should I just omit it from the
CSV file?<br>
3. I noticed Oula mentioned that SimNIBS 4.0 is available from
this abstract
submission<a class="moz-txt-link-rfc2396E" href="https://ww4.aievolution.com/hbm2001/index.cfm?do=abs.viewAbs&abs=2104"><https://ww4.aievolution.com/hbm2001/index.cfm?do=abs.viewAbs&abs=2104></a>.
According to the abstract, SimNIBS 4.0 supports lead-field
calculations, which allows the improved head modeling to be
integrated into EEG source reconstruction algorithms. I was
wondering where we could download and install version 4.0, since
the latest one I can find is version 3.2. I'm also interested to
know if this new version of SimNIBS come with EEG source inversion
algorithms (i.e. MNE, LORETA) as well. Currently, I'm looking into
how I can read the leadfield computed by TDCSLEADFIELD() into
fieldtrip to do source inversion, but if SimNIBS 4.0 comes with
support for these algorithms as well that would be very nice!<br>
<br>
Thanks a lot for the amazing software package and I really
appreciate your help!<br>
<br>
Jason<br>
</font>
</body>
</html>