Fwd
Namespace: FWDLIB · Library: Forward Library
#include <fwd/fwd.h>
class FWDLIB::Fwd
Static-method façade that re-exposes MNEForwardSolution toolbox-equivalent entry points under their familiar mne_* names.
src/examples/ex_fwd_api/main.cpp
MNEForwardSolution back;
Fwd::read_forward_solution(solFile, back); // all 366 rows, like mne.read_forward_solution
MNEForwardSolution good;
MNEForwardSolution::read(solFile, good, false, false, {}, {}, true); // without the channels marked bad
Public Methods
~Fwd()
Destructor.
Static Methods
read_forward_solution(p_IODevice, fwd, force_fixed, surf_ori, include, exclude)
mne_read_forward_solution
Parameters:
-
p_IODevice : QIODevice & A fiff IO device like a fiff QFile or QTCPSocket.
-
fwd : MNEForwardSolution & A forward solution from a fif file.
-
force_fixed : bool Force fixed source orientation mode? (optional).
-
surf_ori : bool Use surface based source coordinate system? (optional).
-
include : const QStringList & Include these channels (optional).
-
exclude : const QStringList & Exclude these channels (optional).
Returns:
- bool — true if succeeded, false otherwise.
Example
- Full source:
src/examples/ex_fwd_api/main.cpp - Build target:
ex_fwd_api(runs under CTest) - Data: mne-cpp-test-data
Used in examples
ex_fwd_api
Forward library: coil definitions, BEM and sphere models, field maps and forward solutions.
src/examples/ex_fwd_api/main.cpp, line 196
MNEForwardSolution back;
Fwd::read_forward_solution(solFile, back); // all 366 rows, like mne.read_forward_solution
MNEForwardSolution good;
MNEForwardSolution::read(solFile, good, false, false, {}, {}, true); // without the channels marked bad
ok &= expect(back.nsource == 78 && back.nchan == 366 && good.nchan == 364 && (back.sol->data - fwd->sol->data).norm() <= 1e-6 * fwd->sol->data.norm(),
"Fwd::read_forward_solution reads all 366 rows back; bExcludeBads drops the 2 bads");
Authors of this file
- Christoph Dinh <christoph.dinh@mne-cpp.org>