v2.0.0
Loading...
Searching...
No Matches
inv_hpi_data_updater.h
Go to the documentation of this file.
1//=============================================================================================================
21
22#ifndef INV_HPI_DATA_UPDATER_H
23#define INV_HPI_DATA_UPDATER_H
24
25//=============================================================================================================
26// INCLUDES
27//=============================================================================================================
28
29#include "../inv_global.h"
30#include "inv_sensor_set.h"
32#include <fiff/fiff_dig_point.h>
33
34//=============================================================================================================
35// QT INCLUDES
36//=============================================================================================================
37
38#include <QSharedPointer>
39
40//=============================================================================================================
41// EIGEN INCLUDES
42//=============================================================================================================
43
44//=============================================================================================================
45// FORWARD DECLARATIONS
46//=============================================================================================================
47
48namespace FIFFLIB
49{
50class FiffInfo;
51class FiffChInfo;
52class FiffDigPointSet;
53}
54
55//=============================================================================================================
56// DEFINE NAMESPACE HPILIB
57//=============================================================================================================
58
59namespace INVLIB
60{
61
62//=============================================================================================================
63// Declare all structures to be used
64//=============================================================================================================
65
66//=============================================================================================================
67// HPILIB FORWARD DECLARATIONS
68//=============================================================================================================
69
70//=============================================================================================================
79{
80public:
81 typedef QSharedPointer<InvHpiDataUpdater> SPtr;
82 typedef QSharedPointer<const InvHpiDataUpdater> ConstSPtr;
83
84 //=========================================================================================================
90 InvHpiDataUpdater(const QSharedPointer<FIFFLIB::FiffInfo> pFiffInfo);
91
92 //=========================================================================================================
99 void checkForUpdate(const QSharedPointer<FIFFLIB::FiffInfo> pFiffInfo);
100
101 //=========================================================================================================
109 void prepareDataAndProjectors(const Eigen::MatrixXd& matData, const Eigen::MatrixXd& matProjectors);
110
111 //=========================================================================================================
117 inline const QList<FIFFLIB::FiffChInfo>& getChannels();
118 inline const Eigen::MatrixXd& getProjectors();
119 inline const Eigen::MatrixXd& getHpiDigitizer();
120 inline const Eigen::MatrixXd& getData();
121 inline const Eigen::MatrixXd& getProjectedData();
122 inline const InvSensorSet& getSensors();
123
124private:
125 //=========================================================================================================
132 void updateChannels(QSharedPointer<FIFFLIB::FiffInfo> pFiffInfo);
133
134 //=========================================================================================================
141 void updateBadChannels(QSharedPointer<FIFFLIB::FiffInfo> pFiffInfo);
142
143 //=========================================================================================================
149 void updateHpiDigitizer(const QList<FIFFLIB::FiffDigPoint>& lDig);
150
151 //=========================================================================================================
158 void updateSensors(const QList<FIFFLIB::FiffChInfo>& lChannels);
159
160 //=========================================================================================================
169 bool checkIfChanged(const QList<QString>& lBads, const QList<FIFFLIB::FiffChInfo>& lChannels);
170
171 //=========================================================================================================
178 void prepareData(const Eigen::MatrixXd& matData);
179
180 //=========================================================================================================
187 void prepareProjectors(const Eigen::MatrixXd& matProjectors);
188
189 QList<FIFFLIB::FiffChInfo> m_lChannels;
190 QVector<int> m_vecInnerind;
191 QList<QString> m_lBads;
192 Eigen::MatrixXd m_matHpiDigitizer;
193 Eigen::MatrixXd m_matProjectors;
194 Eigen::MatrixXd m_matInnerdata;
195 Eigen::MatrixXd m_matDataProjected;
196 InvSensorSetCreator m_sensorSetCreator;
197 InvSensorSet m_sensors;
198};
199
200//=============================================================================================================
201// INLINE DEFINITIONS
202//=============================================================================================================
203
204inline const QList<FIFFLIB::FiffChInfo>& InvHpiDataUpdater::getChannels()
205{
206 return m_lChannels;
207}
208
209inline const Eigen::MatrixXd& InvHpiDataUpdater::getProjectors()
210{
211 return m_matProjectors;
212}
213
214inline const Eigen::MatrixXd& InvHpiDataUpdater::getData()
215{
216 return m_matInnerdata;
217}
218
219inline const Eigen::MatrixXd& InvHpiDataUpdater::getProjectedData()
220{
221 return m_matDataProjected;
222}
223
224inline const Eigen::MatrixXd& InvHpiDataUpdater::getHpiDigitizer()
225{
226 return m_matHpiDigitizer;
227}
228
230{
231 return m_sensors;
232}
233
234} // namespace INVLIB
235
236#endif // INV_HPI_DATA_UPDATER_H
Container for the FIFF_DIG_POINT records of a measurement (a parsed FIFFB_ISOTRAK block).
Single digitization point (FIFF_DIG_POINT) with kind (cardinal/HPI/EEG/extra), identifier and 3D coor...
Compact MEG sensor-geometry container (positions, orientations, integration weights) used by the HPI ...
INVLIB library export/import macros, build-info accessors, and namespace docstring for the inverse-so...
#define INVSHARED_EXPORT
Definition inv_global.h:38
FIFF file I/O, in-memory data structures and high-level readers/writers.
Inverse source estimation (MNE, dSPM, sLORETA, dipole fitting).
Per-channel FIFF descriptor: identifiers, kind, calibration, coil type, channel-frame coil position a...
Collection of FiffDigPoint records as parsed from a FIFFB_ISOTRAK block.
Full FIFF measurement info: per-channel descriptors, sampling and filter setup, projectors,...
Definition fiff_info.h:90
const Eigen::MatrixXd & getData()
const InvSensorSet & getSensors()
QSharedPointer< const InvHpiDataUpdater > ConstSPtr
const Eigen::MatrixXd & getHpiDigitizer()
const QList< FIFFLIB::FiffChInfo > & getChannels()
QSharedPointer< InvHpiDataUpdater > SPtr
void checkForUpdate(const QSharedPointer< FIFFLIB::FiffInfo > pFiffInfo)
void prepareDataAndProjectors(const Eigen::MatrixXd &matData, const Eigen::MatrixXd &matProjectors)
InvHpiDataUpdater(const QSharedPointer< FIFFLIB::FiffInfo > pFiffInfo)
const Eigen::MatrixXd & getProjectors()
const Eigen::MatrixXd & getProjectedData()
Stores MEG sensor geometry (positions, orientations, weights, coil count) for a single sensor type.
Builds InvSensorSet objects from FiffInfo channel definitions, applying SSP projections and compensat...