43 #include "../inverse_global.h"
44 #include "../IInverseAlgorithm.h"
87 #define NOT_TRANSPOSED 0
88 #define IS_TRANSPOSED 1
91 //=============================================================================================================
112 typedef QSharedPointer<RapMusic>
SPtr;
120 typedef Eigen::Matrix<double, Eigen::Dynamic, Eigen::Dynamic>
MatrixXT;
122 typedef Eigen::Matrix<double, Eigen::Dynamic, 6>
MatrixX6T;
124 typedef Eigen::Matrix<double, 6, Eigen::Dynamic>
Matrix6XT;
128 typedef Eigen::Matrix<double, Eigen::Dynamic, 1>
VectorXT;
165 bool init(
MNEForwardSolution& p_pFwd,
bool p_bSparsed =
false,
int p_iN = 2,
double p_dThr = 0.5);
169 virtual MNESourceEstimate calculateInverse(
const MatrixXd &data,
float tmin,
float tstep)
const;
173 virtual const char* getName()
const;
184 void setStcAttr(
int p_iSampStcWin,
float p_fStcOverlap);
196 int calcPhi_s(
const MatrixXT& p_matMeasurement, MatrixXT* &p_pMatPhi_s)
const;
211 static double subcorr(MatrixX6T& p_matProj_G,
const MatrixXT& p_pMatU_B);
229 static double subcorr(MatrixX6T& p_matProj_G,
const MatrixXT& p_matU_B, Vector6T& p_vec_phi_k_1);
241 static void calcA_k_1(
const MatrixX6T& p_matG_k_1,
242 const Vector6T& p_matPhi_k_1,
244 MatrixXT& p_matA_k_1);
253 void calcOrthProj(
const MatrixXT& p_matA_k_1, MatrixXT& p_matOrthProj)
const;
266 void calcPairCombinations(
const int p_iNumPoints,
267 const int p_iNumCombinations,
268 Pair** p_ppPairIdxCombinations)
const;
286 static void getPointPair(
const int p_iPoints,
const int p_iCurIdx,
int &p_iIdx1,
int &p_iIdx2);
297 static void getGainMatrixPair(
const MatrixXT& p_matGainMarix,
298 MatrixX6T& p_matGainMarix_Pair,
299 int p_iIdx1,
int p_iIdx2);
311 static void insertSource(
int p_iDipoleIdx1,
int p_iDipoleIdx2,
312 const Vector6T &p_vec_phi_k_1,
345 static inline int getRank(
const MatrixXT& p_matSigma);
357 static inline int useFullRank(
const MatrixXT& p_Mat,
358 const MatrixXT& p_matSigma_src,
359 MatrixXT& p_matFull_Rank,
369 static inline MatrixXT makeSquareMat(
const MatrixXT& p_matF);
382 for(t_iRank = p_matSigma.rows()-1; t_iRank > 0; t_iRank--)
383 if (p_matSigma(t_iRank, t_iRank) > 0.00001)
399 int rank = getRank(p_matSigma_src);
402 p_matFull_Rank = p_Mat.block(0,0,p_Mat.rows(),rank);
404 p_matFull_Rank = p_Mat.block(0,0,rank,p_Mat.cols());
417 return p_matF*p_matF.transpose();
Eigen::Matrix< double, 6, 1 > Vector6T
static int useFullRank(const MatrixXT &p_Mat, const MatrixXT &p_matSigma_src, MatrixXT &p_matFull_Rank, int type=NOT_TRANSPOSED)
Source Space descritpion.
Eigen::Matrix< double, Eigen::Dynamic, 6 > MatrixX6T
QSharedPointer< RapMusic > SPtr
QSharedPointer< const RapMusic > ConstSPtr
Eigen::Matrix< double, 6, Eigen::Dynamic > Matrix6XT
int m_iNumLeadFieldCombinations
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic > MatrixXT
Eigen::Matrix< double, 6, 6 > Matrix6T
MNEForwardSolution class declaration, which provides the forward solution including the source space ...
#define INVERSESHARED_EXPORT
MNEForwardSolution m_ForwardSolution
static MatrixXT makeSquareMat(const MatrixXT &p_matF)
static int getRank(const MatrixXT &p_matSigma)
MNESourceEstimate class declaration.
Eigen::Matrix< double, Eigen::Dynamic, 1 > VectorXT
The RapMusic class provides the RAP MUSIC Algorithm CPU implementation. ToDo: Paper references...
Inverse algorithm interface.
Pair ** m_ppPairIdxCombinations