MNE-CPP 0.1.9
A Framework for Electrophysiology
Loading...
Searching...
No Matches
hpifitdata.h
Go to the documentation of this file.
1//=============================================================================================================
37#ifndef HPIFITDATA_H
38#define HPIFITDATA_H
39
40//=============================================================================================================
41// INCLUDES
42//=============================================================================================================
43
44#include "../inverse_global.h"
45#include "hpifit.h"
46#include "sensorset.h"
47
48//=============================================================================================================
49// EIGEN INCLUDES
50//=============================================================================================================
51
52#include <Eigen/Core>
53
54//=============================================================================================================
55// QT INCLUDES
56//=============================================================================================================
57
58#include <QSharedPointer>
59
60//=============================================================================================================
61// FORWARD DECLARATIONS
62//=============================================================================================================
63
64namespace FIFFLIB{
65 class FiffInfo;
66 class FiffCoordTrans;
67 class FiffDigPointSet;
68}
69
70//=============================================================================================================
71// DEFINE NAMESPACE INVERSELIB
72//=============================================================================================================
73
74namespace INVERSELIB
75{
76
77//=============================================================================================================
78// Declare all structures to be used
79//=============================================================================================================
84 double error;
85 Eigen::MatrixXd moment;
86 int numIterations;
87};
88
89//=========================================================================================================
94 double base_arr;
95 int idx;
96};
97
98//=============================================================================================================
99// FORWARD DECLARATIONS
100//=============================================================================================================
101
102//=============================================================================================================
109{
110
111public:
112 typedef QSharedPointer<HPIFitData> SPtr;
113 typedef QSharedPointer<const HPIFitData> ConstSPtr;
115 //=========================================================================================================
119 explicit HPIFitData();
120
121 //=========================================================================================================
125 void doDipfitConcurrent();
126
127 Eigen::MatrixXd m_coilPos;
128 Eigen::RowVectorXd m_sensorData;
129 DipFitError m_errorInfo;
130 SensorSet m_sensors;
131 Eigen::MatrixXd m_matProjector;
132
133 int m_iMaxIterations;
134 float m_fAbortError;
135
136protected:
137 //=========================================================================================================
142 Eigen::MatrixXd magnetic_dipole(Eigen::MatrixXd matPos,
143 Eigen::MatrixXd matPnt,
144 Eigen::MatrixXd matOri);
145
146 //=========================================================================================================
155 Eigen::MatrixXd compute_leadfield(const Eigen::MatrixXd& matPos,
156 const SensorSet& sensors);
157
158 //=========================================================================================================
165 DipFitError dipfitError(const Eigen::MatrixXd& matPos,
166 const Eigen::MatrixXd& matData,
167 const SensorSet& sensors,
168 const Eigen::MatrixXd& matProjectors);
169
170 //=========================================================================================================
174 static bool compare(HPISortStruct a, HPISortStruct b);
175
176 //=========================================================================================================
182 Eigen::MatrixXd fminsearch(const Eigen::MatrixXd& matPos,
183 int iMaxiter,
184 int iMaxfun,
185 int iDisplay,
186 const Eigen::MatrixXd& matData,
187 const Eigen::MatrixXd& matProjectors,
188 const SensorSet& sensors,
189 int &iSimplexNumitr);
190};
191
192//=============================================================================================================
193// INLINE DEFINITIONS
194//=============================================================================================================
195} //NAMESPACE
196
197#endif // HPIFITDATA_H
SensorSet class declaration.
HPIFit class declaration.
#define INVERSESHARED_EXPORT
HPI Fit algorithm data structure.
Definition hpifitdata.h:109
QSharedPointer< const HPIFitData > ConstSPtr
Definition hpifitdata.h:113
QSharedPointer< HPIFitData > SPtr
Definition hpifitdata.h:112