v2.0.0
Loading...
Searching...
No Matches
inv_convenience.h
Go to the documentation of this file.
1//=============================================================================================================
24
25#ifndef INV_CONVENIENCE_H
26#define INV_CONVENIENCE_H
27
28//=============================================================================================================
29// INCLUDES
30//=============================================================================================================
31
32#include "inv_global.h"
33#include "inv_source_estimate.h"
34
35//=============================================================================================================
36// EIGEN INCLUDES
37//=============================================================================================================
38
39#include <Eigen/Core>
40
41//=============================================================================================================
42// QT INCLUDES
43//=============================================================================================================
44
45#include <QList>
46#include <QString>
47#include <QPair>
48#include <QMap>
49
50//=============================================================================================================
51// FORWARD DECLARATIONS
52//=============================================================================================================
53
54namespace MNELIB {
56}
57namespace FIFFLIB {
58 class FiffEvoked;
59 class FiffRawData;
60 class FiffCov;
61}
62
63//=============================================================================================================
64// DEFINE NAMESPACE INVLIB
65//=============================================================================================================
66
67namespace INVLIB {
68
69//=============================================================================================================
87INVSHARED_EXPORT QList<InvSourceEstimate> applyInverseEpochs(
88 const QList<Eigen::MatrixXd>& epochs,
89 const MNELIB::MNEInverseOperator& inverse,
90 float lambda2,
91 const QString& method = "dSPM",
92 float tmin = 0.0f,
93 float tstep = 0.001f,
94 bool pickNormal = false);
95
96//=============================================================================================================
115 const FIFFLIB::FiffRawData& raw,
116 const MNELIB::MNEInverseOperator& inverse,
117 float lambda2,
118 const QString& method = "dSPM",
119 int from = -1,
120 int to = -1,
121 bool pickNormal = false);
122
123//=============================================================================================================
136INVSHARED_EXPORT QPair<Eigen::VectorXd, Eigen::RowVectorXf> estimateSnr(
137 const FIFFLIB::FiffEvoked& evoked,
138 const MNELIB::MNEInverseOperator& inverse,
139 const QString& method = "dSPM");
140
141//=============================================================================================================
153INVSHARED_EXPORT QPair<Eigen::MatrixXd, int> computeWhitener(
154 const FIFFLIB::FiffCov& noiseCov,
155 int rank = 0);
156
157//=============================================================================================================
173INVSHARED_EXPORT QPair<Eigen::MatrixXd, Eigen::VectorXd> computeSourcePsd(
174 const InvSourceEstimate& stc,
175 float sfreq,
176 float fmin = 0.0f,
177 float fmax = -1.0f,
178 int nFft = 0);
179
180//=============================================================================================================
192INVSHARED_EXPORT QMap<QString, Eigen::VectorXd> computeSourceBandPower(
193 const InvSourceEstimate& stc,
194 float sfreq,
195 const QMap<QString, QPair<float, float>>& bands);
196
197} // namespace INVLIB
198
199#endif // INV_CONVENIENCE_H
InvSourceEstimate value type — central source-space data container produced by every INVLIB inverse s...
INVLIB library export/import macros, build-info accessors, and namespace docstring for the inverse-so...
#define INVSHARED_EXPORT
Definition inv_global.h:38
Core MNE data structures (source spaces, source estimates, hemispheres).
FIFF file I/O, in-memory data structures and high-level readers/writers.
Inverse source estimation (MNE, dSPM, sLORETA, dipole fitting).
INVSHARED_EXPORT QMap< QString, Eigen::VectorXd > computeSourceBandPower(const InvSourceEstimate &stc, float sfreq, const QMap< QString, QPair< float, float > > &bands)
Compute band power for source estimate.
INVSHARED_EXPORT QPair< Eigen::MatrixXd, int > computeWhitener(const FIFFLIB::FiffCov &noiseCov, int rank=0)
Compute whitening matrix from a noise covariance.
INVSHARED_EXPORT InvSourceEstimate applyInverseRaw(const FIFFLIB::FiffRawData &raw, const MNELIB::MNEInverseOperator &inverse, float lambda2, const QString &method="dSPM", int from=-1, int to=-1, bool pickNormal=false)
Apply inverse operator to raw data in blocks.
INVSHARED_EXPORT QList< InvSourceEstimate > applyInverseEpochs(const QList< Eigen::MatrixXd > &epochs, const MNELIB::MNEInverseOperator &inverse, float lambda2, const QString &method="dSPM", float tmin=0.0f, float tstep=0.001f, bool pickNormal=false)
Apply inverse operator to each epoch in a list.
INVSHARED_EXPORT QPair< Eigen::MatrixXd, Eigen::VectorXd > computeSourcePsd(const InvSourceEstimate &stc, float sfreq, float fmin=0.0f, float fmax=-1.0f, int nFft=0)
Compute PSD for a source estimate using Welch's method.
INVSHARED_EXPORT QPair< Eigen::VectorXd, Eigen::RowVectorXf > estimateSnr(const FIFFLIB::FiffEvoked &evoked, const MNELIB::MNEInverseOperator &inverse, const QString &method="dSPM")
Estimate SNR from evoked data and inverse operator.
FIFF noise / data covariance: matrix, channel names, kind, applied projectors, bads,...
Definition fiff_cov.h:79
Single averaged evoked response: time axis, data, baseline, channel info and averaging metadata.
Definition fiff_evoked.h:75
Source-space inverse-solution container with dense grid plus optional focal-dipole,...
MNE-style inverse operator.