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{
60}
61namespace FIFFLIB
62{
63class FiffEvoked;
64class FiffRawData;
65class FiffCov;
66class FiffInfo;
67}
68
69//=============================================================================================================
70// DEFINE NAMESPACE INVLIB
71//=============================================================================================================
72
73namespace INVLIB
74{
75
76//=============================================================================================================
94INVSHARED_EXPORT QList<InvSourceEstimate> applyInverseEpochs(
95 const QList<Eigen::MatrixXd>& epochs,
96 const MNELIB::MNEInverseOperator& inverse,
97 float lambda2,
98 const QString& method = "dSPM",
99 float tmin = 0.0f,
100 float tstep = 0.001f,
101 bool pickNormal = false);
102
103//=============================================================================================================
123 const FIFFLIB::FiffRawData& raw,
124 const MNELIB::MNEInverseOperator& inverse,
125 float lambda2,
126 const QString& method = "dSPM",
127 int from = -1,
128 int to = -1,
129 bool pickNormal = false);
130
131//=============================================================================================================
148 const InvSourceEstimate& stc,
149 const FIFFLIB::FiffInfo& info);
150
151//=============================================================================================================
165INVSHARED_EXPORT QPair<Eigen::VectorXd, Eigen::VectorXd> estimateSnr(
166 const FIFFLIB::FiffEvoked& evoked,
167 const MNELIB::MNEInverseOperator& inverse);
168
169//=============================================================================================================
181INVSHARED_EXPORT QPair<Eigen::MatrixXd, int> computeWhitener(
182 const FIFFLIB::FiffCov& noiseCov,
183 int rank = 0);
184
185//=============================================================================================================
201INVSHARED_EXPORT QPair<Eigen::MatrixXd, Eigen::VectorXd> computeSourcePsd(
202 const InvSourceEstimate& stc,
203 float sfreq,
204 float fmin = 0.0f,
205 float fmax = -1.0f,
206 int nFft = 0);
207
208//=============================================================================================================
220INVSHARED_EXPORT QMap<QString, Eigen::VectorXd> computeSourceBandPower(
221 const InvSourceEstimate& stc,
222 float sfreq,
223 const QMap<QString, QPair<float, float>>& bands);
224
225} // namespace INVLIB
226
227#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 FIFFLIB::FiffEvoked applyForward(const MNELIB::MNEForwardSolution &fwd, const InvSourceEstimate &stc, const FIFFLIB::FiffInfo &info)
Project a source estimate to the sensors, as mne.apply_forward.
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
Full FIFF measurement info: per-channel descriptors, sampling and filter setup, projectors,...
Definition fiff_info.h:90
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,...
In-memory representation of an -fwd.fif forward solution.
MNE-style inverse operator.