28#ifndef MNE_INVERSE_OPERATOR_H
29#define MNE_INVERSE_OPERATOR_H
106 ? QStringLiteral(
"cityblock")
130 typedef QSharedPointer<MNEInverseOperator>
SPtr;
131 typedef QSharedPointer<const MNEInverseOperator>
ConstSPtr;
165 bool limit_depth_chs =
true);
199 const QString &method,
202 Eigen::SparseMatrix<double> &noise_norm,
203 QList<Eigen::VectorXi> &vertno);
232 const QString &method = QStringLiteral(
"cityblock"))
const;
246 inline Eigen::MatrixXd
getKernel()
const;
278 bool limit_depth_chs =
true);
298 bool sLORETA =
false)
const;
317 void write(QIODevice &p_IODevice);
395 out <<
"#### MNE Inverse Operator ####\n"
396 <<
" methods: " << inv.
methods <<
'\n'
398 <<
" nsource: " << inv.
nsource <<
'\n'
399 <<
" nchan: " << inv.
nchan <<
'\n'
407#ifndef metatype_mneinverseoperatorsptr
408#define metatype_mneinverseoperatorsptr
412#ifndef metatype_mneinverseoperators
413#define metatype_mneinverseoperators
Q_DECLARE_METATYPE(QSharedPointer< MNELIB::MNEInverseOperator >)
Forward solution (gain matrix mapping source dipoles to sensor measurements).
MNELIB shared-library export/import macros and library build metadata.
Container pairing the left and right cortical source spaces of a subject.
#define FIFFV_MNE_FIXED_ORI
Matrix paired with row and column name lists, the on-disk form of FIFFB_PROJ_ITEM / FIFFB_MNE_NAMED_M...
SSP projection item: a named projection vector set with active/desired flags, parsed from FIFFB_PROJ_...
Full FIFF measurement metadata: everything from FIFFB_MEAS / FIFFB_MEAS_INFO needed to interpret a re...
Noise / data covariance matrix as stored under FIFFB_MNE_COV, with channel names, kind,...
Primitive scalar typedefs and forward-compatible aliases backing the FIFF type system.
Core MNE data structures (source spaces, source estimates, hemispheres).
std::ostream & operator<<(std::ostream &out, const MNELIB::MNEForwardSolution &p_MNEForwardSolution)
FreeSurfer surface, annotation and parcellation I/O for mne-cpp.
Labelled 4x4 FIFF affine: source frame, destination frame, rotation, translation and cached inverse.
FIFF noise / data covariance: matrix, channel names, kind, applied projectors, bads,...
QSharedDataPointer< FiffCov > SDPtr
Full FIFF measurement info: per-channel descriptors, sampling and filter setup, projectors,...
Stripped FIFF measurement info: channel list, sampling rate, device→head transform and bad-channel li...
QSharedDataPointer< FiffNamedMatrix > SDPtr
FIFF tag-stream reader/writer: wraps a QIODevice and exposes typed read_* / write_* methods for every...
Container holding the lh and/or rh FsAnnotation for one parcellation atlas.
A FreeSurfer/MNE surface label: per-vertex indices, Tk-RAS positions and scalar values for one hemisp...
Lloyd-style K-means clustering with configurable metric, seeding and replicates.
bool calculate(const Eigen::MatrixXd &X, qint32 kClusters, Eigen::VectorXi &idx, Eigen::MatrixXd &C, Eigen::VectorXd &sumD, Eigen::MatrixXd &D)
In-memory representation of an -fwd.fif forward solution.
Output of a multi-threaded KMeans clustering step for a single cortical region.
Input parameters for multi-threaded KMeans clustering on a single cortical region.
Eigen::MatrixXd matRoiMTOrig
RegionMTOut cluster() const
Run KMeans clustering on this region.
MNE-style inverse operator.
MNEInverseOperator()
Constructs an empty inverse operator with invalid sentinel values.
FIFFLIB::FiffCov::SDPtr fmri_prior
QSharedPointer< const MNEInverseOperator > ConstSPtr
QSharedPointer< MNEInverseOperator > SPtr
Eigen::MatrixXd cluster_kernel(const FSLIB::FsAnnotationSet &annotationSet, qint32 clusterSize, Eigen::MatrixXd &D, const QString &method=QStringLiteral("cityblock")) const
Cluster the inverse kernel by cortical parcellation.
FIFFLIB::fiff_int_t coord_frame
QList< FIFFLIB::FiffProj > projs
Eigen::SparseMatrix< double > noisenorm
FIFFLIB::FiffCov::SDPtr orient_prior
static MNEInverseOperator make_inverse_operator(const FIFFLIB::FiffInfo &info, MNEForwardSolution forward, const FIFFLIB::FiffCov &noiseCov, float loose=0.2f, float depth=0.8f, bool fixed=false, bool limit_depth_chs=true)
Assemble an inverse operator from a forward solution and noise covariance.
FIFFLIB::fiff_int_t nchan
friend std::ostream & operator<<(std::ostream &out, const MNEInverseOperator &inv)
Stream-output operator for diagnostic printing.
bool eigen_leads_weighted
FIFFLIB::fiff_int_t methods
FIFFLIB::FiffNamedMatrix::SDPtr eigen_leads
bool check_ch_names(const FIFFLIB::FiffInfo &info) const
Verify that inverse-operator channels are present in the measurement info.
FIFFLIB::FiffCoordTrans mri_head_t
FIFFLIB::fiff_int_t nsource
MNEInverseOperator prepare_inverse_operator(qint32 nave, float lambda2, bool dSPM, bool sLORETA=false) const
Prepare the inverse operator for source estimation.
Eigen::MatrixXf source_nn
FIFFLIB::FiffCov::SDPtr depth_prior
void write(QIODevice &p_IODevice)
Write the inverse operator to a FIFF file.
Eigen::MatrixXd & getKernel()
Access the most recently assembled kernel (mutable).
FIFFLIB::fiff_int_t source_ori
bool assemble_kernel(const FSLIB::FsLabel &label, const QString &method, bool pick_normal, Eigen::MatrixXd &K, Eigen::SparseMatrix< double > &noise_norm, QList< Eigen::VectorXi > &vertno)
Assemble the inverse kernel matrix.
void writeToStream(FIFFLIB::FiffStream *p_pStream)
Write the inverse operator into an already-open FIFF stream.
FIFFLIB::FiffInfoBase info
~MNEInverseOperator()
Destructor.
FIFFLIB::FiffCov::SDPtr noise_cov
FIFFLIB::FiffCov::SDPtr source_cov
static bool read_inverse_operator(QIODevice &p_IODevice, MNEInverseOperator &inv)
Read an inverse operator from a FIFF file.
bool isFixedOrient() const
Check whether the inverse operator uses fixed source orientations.
FIFFLIB::FiffNamedMatrix::SDPtr eigen_fields
List of MNESourceSpace objects forming a subject source space.