v2.0.0
Loading...
Searching...
No Matches
inv_convenience.h
Go to the documentation of this file.
1//=============================================================================================================
26
27#ifndef INV_CONVENIENCE_H
28#define INV_CONVENIENCE_H
29
30//=============================================================================================================
31// INCLUDES
32//=============================================================================================================
33
34#include "inv_global.h"
35#include "inv_source_estimate.h"
36
37//=============================================================================================================
38// EIGEN INCLUDES
39//=============================================================================================================
40
41#include <Eigen/Core>
42
43//=============================================================================================================
44// QT INCLUDES
45//=============================================================================================================
46
47#include <QList>
48#include <QString>
49#include <QPair>
50#include <QMap>
51
52//=============================================================================================================
53// FORWARD DECLARATIONS
54//=============================================================================================================
55
56namespace MNELIB
57{
59}
60namespace FIFFLIB
61{
62class FiffEvoked;
63class FiffRawData;
64class FiffCov;
65}
66
67//=============================================================================================================
68// DEFINE NAMESPACE INVLIB
69//=============================================================================================================
70
71namespace INVLIB
72{
73
74//=============================================================================================================
92INVSHARED_EXPORT QList<InvSourceEstimate> applyInverseEpochs(
93 const QList<Eigen::MatrixXd>& epochs,
94 const MNELIB::MNEInverseOperator& inverse,
95 float lambda2,
96 const QString& method = "dSPM",
97 float tmin = 0.0f,
98 float tstep = 0.001f,
99 bool pickNormal = false);
100
101//=============================================================================================================
121 const FIFFLIB::FiffRawData& raw,
122 const MNELIB::MNEInverseOperator& inverse,
123 float lambda2,
124 const QString& method = "dSPM",
125 int from = -1,
126 int to = -1,
127 bool pickNormal = false);
128
129//=============================================================================================================
143INVSHARED_EXPORT QPair<Eigen::VectorXd, Eigen::VectorXd> estimateSnr(
144 const FIFFLIB::FiffEvoked& evoked,
145 const MNELIB::MNEInverseOperator& inverse);
146
147//=============================================================================================================
159INVSHARED_EXPORT QPair<Eigen::MatrixXd, int> computeWhitener(
160 const FIFFLIB::FiffCov& noiseCov,
161 int rank = 0);
162
163//=============================================================================================================
179INVSHARED_EXPORT QPair<Eigen::MatrixXd, Eigen::VectorXd> computeSourcePsd(
180 const InvSourceEstimate& stc,
181 float sfreq,
182 float fmin = 0.0f,
183 float fmax = -1.0f,
184 int nFft = 0);
185
186//=============================================================================================================
198INVSHARED_EXPORT QMap<QString, Eigen::VectorXd> computeSourceBandPower(
199 const InvSourceEstimate& stc,
200 float sfreq,
201 const QMap<QString, QPair<float, float>>& bands);
202
203} // namespace INVLIB
204
205#endif // INV_CONVENIENCE_H
INVLIB library export/import macros, build-info accessors, and namespace docstring for the inverse-so...
#define INVSHARED_EXPORT
Definition inv_global.h:38
InvSourceEstimate value type — central source-space data container produced by every INVLIB inverse s...
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 QPair< Eigen::VectorXd, Eigen::VectorXd > estimateSnr(const FIFFLIB::FiffEvoked &evoked, const MNELIB::MNEInverseOperator &inverse)
Estimate the SNR of evoked data as a function of time.
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.
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.
FIFF noise / data covariance: matrix, channel names, kind, applied projectors, bads,...
Definition fiff_cov.h:82
Single averaged evoked response: time axis, data, baseline, channel info and averaging metadata.
Definition fiff_evoked.h:77
Continuous FIFF raw recording: FiffInfo plus a random-access directory of FIFF_DATA_BUFFER tags.
Source-space inverse-solution container with dense grid plus optional focal-dipole,...
MNE-style inverse operator.