v2.0.0
Loading...
Searching...
No Matches
fwd_types.h File Reference

std::function aliases for the generic dipole field / potential / field-gradient callbacks driving the source-space loop. More...

#include <fiff/fiff_types.h>
#include <mne/mne_types.h>
#include "fwd_coil_set.h"
#include <mne/mne_ctf_comp_data_set.h>
#include <Eigen/Core>
#include <functional>
Include dependency graph for fwd_types.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Typedefs

using fwdFieldFunc
using fwdVecFieldFunc
using fwdFieldGradFunc

Detailed Description

std::function aliases for the generic dipole field / potential / field-gradient callbacks driving the source-space loop.

SPDX-License-Identifier: BSD-3-Clause Copyright (c) 2017-2026 MNE-CPP Authors

Author
Christoph Dinh chris.nosp@m.toph.nosp@m..dinh.nosp@m.@mne.nosp@m.-cpp..nosp@m.org; Lorenz Esch loren.nosp@m.z.es.nosp@m.ch@tu.nosp@m.-ilm.nosp@m.enau..nosp@m.de; Gabriel Motta gabri.nosp@m.elbe.nosp@m.nmott.nosp@m.a@gm.nosp@m.ail.c.nosp@m.om
Since
0.1.0
Date
March 2017

The compute_forward driver iterates over every dipole position in a source space and, at each step, calls a field function and an optional gradient function. The field function evaluates the scalar magnetic flux (MEG) or electric potential (EEG) produced at a sensor for a given dipole moment Q, while the vector variant emits the full 3 × N_coil lead-field block in one call. The gradient function adds the spatial derivatives ∂B/∂r needed by signal-space-separation and Levenberg-Marquardt dipole fitting.

Wrapping all three behind std::function lets the solver swap an infinite-medium analytic kernel (e.g. Sarvas), a BEM kernel, or a compensation-aware wrapper (FwdCompData) without templating the call sites; this matches the function-pointer dispatch used in MNE-C compute_forward.c.

Definition in file fwd_types.h.

Typedef Documentation

◆ fwdFieldFunc

using fwdFieldFunc
Initial value:
std::function<int(const Eigen::Vector3f& rd, const Eigen::Vector3f& Q,
FWDLIB::FwdCoilSet& coils, Eigen::Ref<Eigen::VectorXf> res, void *client)>
Container of FwdCoil instances acting both as the in-memory image of the coil_def....

Definition at line 47 of file fwd_types.h.

◆ fwdFieldGradFunc

Initial value:
std::function<int(const Eigen::Vector3f& rd, const Eigen::Vector3f& Q,
FWDLIB::FwdCoilSet& coils, Eigen::Ref<Eigen::VectorXf> res,
Eigen::Ref<Eigen::VectorXf> xgrad, Eigen::Ref<Eigen::VectorXf> ygrad, Eigen::Ref<Eigen::VectorXf> zgrad, void *client)>

Definition at line 51 of file fwd_types.h.

◆ fwdVecFieldFunc

Initial value:
std::function<int(const Eigen::Vector3f& rd,
FWDLIB::FwdCoilSet& coils, Eigen::Ref<Eigen::MatrixXf> res, void *client)>

Definition at line 49 of file fwd_types.h.