v2.0.0
Loading...
Searching...
No Matches
maxwell_movement_comp.h
Go to the documentation of this file.
1//=============================================================================================================
19
20#ifndef MAXWELL_MOVEMENT_COMP_DSP_H
21#define MAXWELL_MOVEMENT_COMP_DSP_H
22
23//=============================================================================================================
24// INCLUDES
25//=============================================================================================================
26
27#include "dsp_global.h"
28#include "sss.h"
29
30#include <fiff/fiff_info.h>
31
32//=============================================================================================================
33// EIGEN INCLUDES
34//=============================================================================================================
35
36#include <Eigen/Core>
37#include <Eigen/Geometry>
38
39//=============================================================================================================
40// QT INCLUDES
41//=============================================================================================================
42
43#include <QList>
44
45//=============================================================================================================
46// DEFINE NAMESPACE UTILSLIB
47//=============================================================================================================
48
49namespace UTILSLIB
50{
51
52//=============================================================================================================
59{
60 double dTime = 0.0;
61 Eigen::Vector3d translation{0, 0, 0};
62 Eigen::Quaterniond rotation{1, 0, 0, 0};
63 double dGof = 0.0;
64};
65
66//=============================================================================================================
73{
74 int iOrderIn = 8;
75 int iOrderOut = 3;
76 Eigen::Vector3d origin{0.0, 0.0, 0.04};
77 int iRefIdx = 0;
78 double dRegIn = 1e-5;
79};
80
81//=============================================================================================================
88{
89public:
90 //=========================================================================================================
106 static Eigen::MatrixXd apply(const Eigen::MatrixXd& matData,
107 const FIFFLIB::FiffInfo& fiffInfo,
108 const QList<HeadPosEntry>& headPos,
109 double dSFreq,
111
112 //=========================================================================================================
123 static QList<HeadPosEntry> readHeadPos(const QString& sPath);
124
125 //=========================================================================================================
134 static bool writeHeadPos(const QString& sPath,
135 const QList<HeadPosEntry>& headPos);
136
137private:
141 static FIFFLIB::FiffInfo transformFiffInfo(const FIFFLIB::FiffInfo& fiffInfo,
142 const HeadPosEntry& headPosRef,
143 const HeadPosEntry& headPosCurrent);
144};
145
146} // namespace UTILSLIB
147
148#endif // MAXWELL_MOVEMENT_COMP_DSP_H
Full FIFF measurement metadata: everything from FIFFB_MEAS / FIFFB_MEAS_INFO needed to interpret a re...
Signal-Space Separation (SSS) and temporal SSS (tSSS) for MEG data.
Export/import macros and namespace declaration for the DSP library.
#define DSPSHARED_EXPORT
Definition dsp_global.h:50
Shared utilities (I/O helpers, spectral analysis, layout management, warp algorithms).
A head position entry (time, translation, rotation quaternion).
Parameters for Maxwell movement compensation.
Maxwell movement compensation using SSS.
static Eigen::MatrixXd apply(const Eigen::MatrixXd &matData, const FIFFLIB::FiffInfo &fiffInfo, const QList< HeadPosEntry > &headPos, double dSFreq, const MaxwellMoveCompParams &params=MaxwellMoveCompParams())
Apply movement compensation via SSS.
static bool writeHeadPos(const QString &sPath, const QList< HeadPosEntry > &headPos)
Write head positions to a file.
static QList< HeadPosEntry > readHeadPos(const QString &sPath)
Read head positions from a file.
Full FIFF measurement info: per-channel descriptors, sampling and filter setup, projectors,...
Definition fiff_info.h:90