MNE-CPP 0.1.9
A Framework for Electrophysiology
Loading...
Searching...
No Matches
minimumnorm.h
Go to the documentation of this file.
1//=============================================================================================================
37#ifndef MINIMUMNORM_H
38#define MINIMUMNORM_H
39
40//=============================================================================================================
41// INCLUDES
42//=============================================================================================================
43
44#include "../inverse_global.h"
45#include "../IInverseAlgorithm.h"
46
48#include <fs/label.h>
49
50#include <QSharedPointer>
51
52//=============================================================================================================
53// DEFINE NAMESPACE INVERSELIB
54//=============================================================================================================
55
56namespace INVERSELIB
57{
58
59//=============================================================================================================
60// FORWARD DECLARATIONS
61//=============================================================================================================
62
63//=============================================================================================================
70{
71public:
72 typedef QSharedPointer<MinimumNorm> SPtr;
73 typedef QSharedPointer<const MinimumNorm> ConstSPtr;
75 //=========================================================================================================
85 explicit MinimumNorm(const MNELIB::MNEInverseOperator &p_inverseOperator, float lambda, const QString method);
86
87 //=========================================================================================================
98 explicit MinimumNorm(const MNELIB::MNEInverseOperator &p_inverseOperator, float lambda, bool dSPM, bool sLORETA);
99
100 virtual ~MinimumNorm(){}
101
102 //=========================================================================================================
113 virtual MNELIB::MNESourceEstimate calculateInverse(const FIFFLIB::FiffEvoked &p_fiffEvoked, bool pick_normal = false);
114
115 virtual MNELIB::MNESourceEstimate calculateInverse(const Eigen::MatrixXd &data, float tmin, float tstep, bool pick_normal = false) const;
116
117 //=========================================================================================================
125 virtual void doInverseSetup(qint32 nave, bool pick_normal = false);
126
127 //=========================================================================================================
133 virtual const char* getName() const;
134
135 //=========================================================================================================
141 virtual const MNELIB::MNESourceSpace& getSourceSpace() const;
142
143 //=========================================================================================================
149 inline MNELIB::MNEInverseOperator& getPreparedInverseOperator();
150
151 //=========================================================================================================
157 void setMethod(QString method);
158
159 //=========================================================================================================
166 void setMethod(bool dSPM, bool sLORETA);
167
168 //=========================================================================================================
174 void setRegularization(float lambda);
175
176 //=========================================================================================================
182 inline Eigen::MatrixXd& getKernel();
183
184private:
185 MNELIB::MNEInverseOperator m_inverseOperator;
186 float m_fLambda;
187 QString m_sMethod;
188 bool m_bsLORETA;
189 bool m_bdSPM;
191 bool inverseSetup;
193 Eigen::SparseMatrix<double> noise_norm;
194 QList<Eigen::VectorXi> vertno;
195 FSLIB::Label label;
196 Eigen::MatrixXd K;
197};
198
199//=============================================================================================================
200// INLINE DEFINITIONS
201//=============================================================================================================
202
203inline Eigen::MatrixXd& MinimumNorm::getKernel()
204{
205 return K;
206}
207
208//=============================================================================================================
209
214} //NAMESPACE
215
216#endif // MINIMUMNORM_H
Label class declaration.
#define INVERSESHARED_EXPORT
Freesurfer/MNE label.
Definition label.h:81
Inverse algorithm interface.
Minimum norm estimation.
Definition minimumnorm.h:70
virtual MNELIB::MNESourceEstimate calculateInverse(const Eigen::MatrixXd &data, float tmin, float tstep, bool pick_normal=false) const
QSharedPointer< MinimumNorm > SPtr
Definition minimumnorm.h:72
MNELIB::MNEInverseOperator & getPreparedInverseOperator()
Eigen::MatrixXd & getKernel()
QSharedPointer< const MinimumNorm > ConstSPtr
Definition minimumnorm.h:73
Source Space descritpion.
MNEInverseOperator class declaration.