54 if (kernel.rows() == 0 || kernel.cols() == 0) {
55 qWarning(
"MNECorticalMap::makeCorticalMap - Inverse kernel is empty. "
56 "Make sure the inverse operator has been prepared (assemble_kernel).");
60 if (!fwd.
sol || fwd.
sol->data.rows() == 0) {
61 qWarning(
"MNECorticalMap::makeCorticalMap - Forward solution is empty.");
73 MatrixXd gain = matched.
sol->data;
75 if (invChannels.size() == kernel.cols() && matched.
sol->row_names.size() == gain.rows()) {
76 MatrixXd picked(kernel.cols(), gain.cols());
77 for (
int c = 0; c < invChannels.size(); ++c) {
78 const int row =
static_cast<int>(matched.
sol->row_names.indexOf(invChannels[c]));
80 qWarning(
"MNECorticalMap::makeCorticalMap - Channel %s is not in the forward solution.",
81 invChannels[c].toUtf8().constData());
84 picked.row(c) = gain.row(row);
90 if (kernel.cols() != gain.rows()) {
91 qWarning(
"MNECorticalMap::makeCorticalMap - Dimension mismatch: "
92 "kernel is %lld x %lld, gain is %lld x %lld",
93 static_cast<long long>(kernel.rows()),
94 static_cast<long long>(kernel.cols()),
95 static_cast<long long>(gain.rows()),
96 static_cast<long long>(gain.cols()));
100 return kernel * gain;
Full FIFF measurement metadata: everything from FIFFB_MEAS / FIFFB_MEAS_INFO needed to interpret a re...
Matrix paired with row and column name lists, the on-disk form of FIFFB_PROJ_ITEM / FIFFB_MNE_NAMED_M...
Pre-computed inverse operator (whitened SVD of the forward model) for MNE/dSPM/sLORETA.
Resolution matrix K G of an inverse operator and its forward solution.
Forward solution (gain matrix mapping source dipoles to sensor measurements).
Core MNE data structures (source spaces, source estimates, hemispheres).
FIFF file I/O, in-memory data structures and high-level readers/writers.
Full FIFF measurement info: per-channel descriptors, sampling and filter setup, projectors,...
static Eigen::MatrixXd makeCorticalMap(const MNEForwardSolution &fwd, const MNEInverseOperator &inv, const FIFFLIB::FiffInfo &info)
In-memory representation of an -fwd.fif forward solution.
void convert_to_surf_ori()
bool isFixedOrient() const
FIFFLIB::FiffNamedMatrix::SDPtr sol
MNE-style inverse operator.
FIFFLIB::FiffCov::SDPtr orient_prior
FIFFLIB::FiffNamedMatrix::SDPtr eigen_fields