v2.0.0
Loading...
Searching...
No Matches
inv_minimum_norm.h
Go to the documentation of this file.
1//=============================================================================================================
28
29#ifndef INV_MINIMUM_NORM_H
30#define INV_MINIMUM_NORM_H
31
32//=============================================================================================================
33// INCLUDES
34//=============================================================================================================
35
36#include "../inv_global.h"
37
39#include <mne/mne_mne_data.h>
41#include <fs/fs_label.h>
42
43#include <QSharedPointer>
44
45//=============================================================================================================
46// DEFINE NAMESPACE INVLIB
47//=============================================================================================================
48
49namespace INVLIB
50{
51
52//=============================================================================================================
53// FORWARD DECLARATIONS
54//=============================================================================================================
55
56//=============================================================================================================
73{
74public:
75 typedef QSharedPointer<InvMinimumNorm> SPtr;
76 typedef QSharedPointer<const InvMinimumNorm> ConstSPtr;
77
78 //=========================================================================================================
86 explicit InvMinimumNorm(const MNELIB::MNEInverseOperator& p_inverseOperator, float lambda, const QString method);
87
88 //=========================================================================================================
97 explicit InvMinimumNorm(const MNELIB::MNEInverseOperator& p_inverseOperator, float lambda, bool dSPM, bool sLORETA);
98
100 {
101 }
102
103 //=========================================================================================================
114 virtual InvSourceEstimate calculateInverse(const FIFFLIB::FiffEvoked& p_fiffEvoked, bool pick_normal = false);
115
116 virtual InvSourceEstimate calculateInverse(const Eigen::MatrixXd& data, float tmin, float tstep, bool pick_normal = false) const;
117
118 //=========================================================================================================
129 MNELIB::MNEMneData mneData(const FIFFLIB::FiffEvoked& p_fiffEvoked, double snr = 0.0);
130
131 //=========================================================================================================
139 virtual void doInverseSetup(qint32 nave, bool pick_normal = false);
140
141 //=========================================================================================================
147 virtual const char* getName() const;
148
149 //=========================================================================================================
155 virtual const MNELIB::MNESourceSpaces& getSourceSpace() const;
156
157 //=========================================================================================================
164
165 //=========================================================================================================
171 void setMethod(QString method);
172
173 //=========================================================================================================
181 void setMethod(bool dSPM, bool sLORETA, bool eLoreta = false);
182
183 //=========================================================================================================
189 void setRegularization(float lambda);
190
191 //=========================================================================================================
199 void setELoretaOptions(int maxIter = 20, double eps = 1e-6, bool forceEqual = false);
200
201 //=========================================================================================================
207 inline Eigen::MatrixXd& getKernel();
208
209private:
210 //=========================================================================================================
220 void computeELoreta();
221
222 MNELIB::MNEInverseOperator m_inverseOperator;
223 float m_fLambda;
224 QString m_sMethod;
225 bool m_bsLORETA;
226 bool m_bdSPM;
227 bool m_beLoreta;
228
229 // eLORETA parameters
230 int m_iELoretaMaxIter;
231 double m_dELoretaEps;
232 bool m_bELoretaForceEqual;
233
234 bool inverseSetup;
236 Eigen::SparseMatrix<double> noise_norm;
237 QList<Eigen::VectorXi> vertno;
238 FSLIB::FsLabel label;
239 Eigen::MatrixXd K;
240};
241
242//=============================================================================================================
243// INLINE DEFINITIONS
244//=============================================================================================================
245
246inline Eigen::MatrixXd& InvMinimumNorm::getKernel()
247{
248 return K;
249}
250
251//=============================================================================================================
252
257} //NAMESPACE
258
259#endif // INV_MINIMUM_NORM_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...
Reader and in-memory representation of a FreeSurfer/MNE surface label (.label).
Pre-computed inverse operator (whitened SVD of the forward model) for MNE/dSPM/sLORETA.
Per-data-set results of a minimum-norm computation: eigenfield projections, SNR, lambda2 and predicte...
Inverse source estimation (MNE, dSPM, sLORETA, dipole fitting).
Single averaged evoked response: time axis, data, baseline, channel info and averaging metadata.
Definition fiff_evoked.h:77
A FreeSurfer/MNE surface label: per-vertex indices, Tk-RAS positions and scalar values for one hemisp...
Definition fs_label.h:81
Source-space inverse-solution container with dense grid plus optional focal-dipole,...
virtual const MNELIB::MNESourceSpaces & getSourceSpace() const
Eigen::MatrixXd & getKernel()
void setELoretaOptions(int maxIter=20, double eps=1e-6, bool forceEqual=false)
virtual InvSourceEstimate calculateInverse(const Eigen::MatrixXd &data, float tmin, float tstep, bool pick_normal=false) const
MNELIB::MNEMneData mneData(const FIFFLIB::FiffEvoked &p_fiffEvoked, double snr=0.0)
QSharedPointer< const InvMinimumNorm > ConstSPtr
virtual void doInverseSetup(qint32 nave, bool pick_normal=false)
void setMethod(QString method)
MNELIB::MNEInverseOperator & getPreparedInverseOperator()
void setRegularization(float lambda)
virtual const char * getName() const
InvMinimumNorm(const MNELIB::MNEInverseOperator &p_inverseOperator, float lambda, const QString method)
QSharedPointer< InvMinimumNorm > SPtr
MNE-style inverse operator.
Data associated with MNE computations for each mneMeasDataSet.
List of MNESourceSpace objects forming a subject source space.