v2.0.0
Loading...
Searching...
No Matches
inv_minimum_norm.h
Go to the documentation of this file.
1//=============================================================================================================
36
37#ifndef INV_MINIMUM_NORM_H
38#define INV_MINIMUM_NORM_H
39
40//=============================================================================================================
41// INCLUDES
42//=============================================================================================================
43
44#include "../inv_global.h"
45
48#include <fs/fs_label.h>
49
50#include <QSharedPointer>
51
52//=============================================================================================================
53// DEFINE NAMESPACE INVLIB
54//=============================================================================================================
55
56namespace INVLIB
57{
58
59//=============================================================================================================
60// FORWARD DECLARATIONS
61//=============================================================================================================
62
63//=============================================================================================================
78{
79public:
80 typedef QSharedPointer<InvMinimumNorm> SPtr;
81 typedef QSharedPointer<const InvMinimumNorm> ConstSPtr;
82
83 //=========================================================================================================
93 explicit InvMinimumNorm(const MNELIB::MNEInverseOperator &p_inverseOperator, float lambda, const QString method);
94
95 //=========================================================================================================
106 explicit InvMinimumNorm(const MNELIB::MNEInverseOperator &p_inverseOperator, float lambda, bool dSPM, bool sLORETA);
107
108 virtual ~InvMinimumNorm(){}
109
110 //=========================================================================================================
121 virtual InvSourceEstimate calculateInverse(const FIFFLIB::FiffEvoked &p_fiffEvoked, bool pick_normal = false);
122
123 virtual InvSourceEstimate calculateInverse(const Eigen::MatrixXd &data, float tmin, float tstep, bool pick_normal = false) const;
124
125 //=========================================================================================================
133 virtual void doInverseSetup(qint32 nave, bool pick_normal = false);
134
135 //=========================================================================================================
141 virtual const char* getName() const;
142
143 //=========================================================================================================
149 virtual const MNELIB::MNESourceSpaces& getSourceSpace() const;
150
151 //=========================================================================================================
158
159 //=========================================================================================================
165 void setMethod(QString method);
166
167 //=========================================================================================================
175 void setMethod(bool dSPM, bool sLORETA, bool eLoreta = false);
176
177 //=========================================================================================================
183 void setRegularization(float lambda);
184
185 //=========================================================================================================
193 void setELoretaOptions(int maxIter = 20, double eps = 1e-6, bool forceEqual = false);
194
195 //=========================================================================================================
201 inline Eigen::MatrixXd& getKernel();
202
203private:
204 //=========================================================================================================
214 void computeELoreta();
215
216 MNELIB::MNEInverseOperator m_inverseOperator;
217 float m_fLambda;
218 QString m_sMethod;
219 bool m_bsLORETA;
220 bool m_bdSPM;
221 bool m_beLoreta;
222
223 // eLORETA parameters
224 int m_iELoretaMaxIter;
225 double m_dELoretaEps;
226 bool m_bELoretaForceEqual;
227
228 bool inverseSetup;
230 Eigen::SparseMatrix<double> noise_norm;
231 QList<Eigen::VectorXi> vertno;
232 FSLIB::FsLabel label;
233 Eigen::MatrixXd K;
234};
235
236//=============================================================================================================
237// INLINE DEFINITIONS
238//=============================================================================================================
239
240inline Eigen::MatrixXd& InvMinimumNorm::getKernel()
241{
242 return K;
243}
244
245//=============================================================================================================
246
251} //NAMESPACE
252
253#endif // INV_MINIMUM_NORM_H
InvSourceEstimate class declaration.
inverse library export/import macros.
#define INVSHARED_EXPORT
Definition inv_global.h:52
MNEInverseOperator class declaration.
FsLabel class declaration.
Inverse source estimation (MNE, dSPM, sLORETA, dipole fitting).
Freesurfer/MNE label.
Definition fs_label.h:81
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
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.
Source Space descritpion.