51 rmag = Eigen::Matrix<float, Eigen::Dynamic, 3, Eigen::RowMajor>::Zero(
np, 3);
52 cosmag = Eigen::Matrix<float, Eigen::Dynamic, 3, Eigen::RowMajor>::Zero(
np, 3);
53 w = Eigen::VectorXf::Zero(
np);
57 for (
int k = 0; k < 3; k++) {
72 if (!p_FwdCoil.
chname.isEmpty())
74 if (!p_FwdCoil.
desc.isEmpty())
80 this->
np = p_FwdCoil.
np;
87 this->
r0 = p_FwdCoil.
r0;
88 this->
ex = p_FwdCoil.
ex;
89 this->
ey = p_FwdCoil.
ey;
90 this->
ez = p_FwdCoil.
ez;
106 qWarning() << ch.
ch_name <<
"is not an EEG channel. Cannot create an electrode definition.";
110 qWarning(
"Inappropriate coordinate transformation in fwd_create_eeg_el");
116 res = std::make_unique<FwdCoil>(1);
118 res = std::make_unique<FwdCoil>(2);
121 res->desc =
"EEG electrode";
133 res->coord_frame = t.
to;
140 res->rmag.row(0) = res->r0.transpose();
141 res->cosmag.row(0) = res->r0.transpose();
142 res->cosmag.row(0).normalize();
148 res->rmag.row(1) = res->ex.transpose();
149 res->cosmag.row(1) = res->ex.transpose();
150 res->cosmag.row(1).normalize();
Single MEG sensor coil or EEG electrode described by a set of weighted integration points in its own ...
FIFF channel descriptor record (FIFF_CH_INFO): per-channel logical/scanner numbers,...
FIFF file I/O, in-memory data structures and high-level readers/writers.
Forward modelling — BEM solver, spherical models, sensor/coil definitions and the lead-field assembly...
constexpr int FWD_COIL_ACCURACY_NORMAL
constexpr int FWD_COILC_EEG
constexpr int FWD_COIL_ACCURACY_POINT
constexpr int FWD_COILC_PLANAR_GRAD
constexpr int FWD_COILC_UNKNOWN
constexpr int FWD_COILC_AXIAL_GRAD2
constexpr int FWD_COILC_AXIAL_GRAD
constexpr int FWD_COILC_MAG
Per-channel FIFF descriptor: identifiers, kind, calibration, coil type, channel-frame coil position a...
Labelled 4x4 FIFF affine: source frame, destination frame, rotation, translation and cached inverse.
Eigen::MatrixX3f apply_trans(const Eigen::MatrixX3f &rr, bool do_move=true) const
std::unique_ptr< FwdCoil > UPtr
bool is_eeg_electrode() const
Eigen::Matrix< float, Eigen::Dynamic, 3, Eigen::RowMajor > cosmag
static FwdCoil::UPtr create_eeg_el(const FIFFLIB::FiffChInfo &ch, const FIFFLIB::FiffCoordTrans &t=FIFFLIB::FiffCoordTrans())
bool is_planar_coil() const
bool is_axial_coil() const
Eigen::Matrix< float, Eigen::Dynamic, 3, Eigen::RowMajor > rmag
bool is_magnetometer_coil() const