v2.0.0
Loading...
Searching...
No Matches
dataloader.h
Go to the documentation of this file.
1//=============================================================================================================
25
26#ifndef DATALOADER_H
27#define DATALOADER_H
28
29//=============================================================================================================
30// INCLUDES
31//=============================================================================================================
32
33#include "../disp3D_global.h"
34
35#include <QStringList>
36#include <QList>
37#include <QStandardItem>
38#include <QVector3D>
39#include <QMatrix4x4>
40#include <memory>
41
42#include <fiff/fiff_info.h>
43#include <fiff/fiff_evoked.h>
45#include <fiff/fiff_dig_point.h>
48
49//=============================================================================================================
50// FORWARD DECLARATIONS
51//=============================================================================================================
52
53namespace DISP3DLIB
54{
55
56class BrainSurface;
57class SensorTreeItem;
58
59//=============================================================================================================
69{
70public:
71 DataLoader() = delete; // all-static class
72
73 // ── Result structs ────────────────────────────────────────────────
74
81 {
82 bool hasInfo = false;
83 bool hasDigitizer = false;
84
86 QList<QStandardItem*> megGradItems;
87 QList<QStandardItem*> megMagItems;
88 QList<QStandardItem*> eegItems;
89 QList<FIFFLIB::FiffDigPoint> digitizerPoints;
90
91 std::shared_ptr<BrainSurface> helmetSurface;
92
93 QMatrix4x4 devHeadTrans;
94 bool hasDevHead = false;
95 };
96
97 // ── Static I/O methods ────────────────────────────────────────────
98
106 static SensorLoadResult loadSensors(const QString& fifPath,
107 const QString& megHelmetOverridePath = {});
108
117 static std::shared_ptr<BrainSurface> loadHelmetSurface(
118 const QString& helmetFilePath,
119 const QMatrix4x4& devHeadTrans = QMatrix4x4(),
120 bool applyTrans = false);
121
128 static INVLIB::InvEcdSet loadDipoles(const QString& dipPath);
129
136 static MNELIB::MNESourceSpaces loadSourceSpace(const QString& fwdPath);
137
146 static bool loadHeadToMriTransform(const QString& transPath,
148
156 static FIFFLIB::FiffEvoked loadEvoked(const QString& evokedPath, int aveIndex = 0);
157
164 static QStringList probeEvokedSets(const QString& evokedPath);
165};
166
167} // namespace DISP3DLIB
168
169#endif // DATALOADER_H
Single averaged evoked response: time axis, samples, baseline, channel info and processing history.
Full FIFF measurement metadata: everything from FIFFB_MEAS / FIFFB_MEAS_INFO needed to interpret a re...
4x4 affine FIFF coordinate transform (FIFF_COORD_TRANS) annotated with source/destination coordinate-...
Single digitization point (FIFF_DIG_POINT) with kind (cardinal/HPI/EEG/extra), identifier and 3D coor...
Library export/import macros and namespace marker for the disp3D library.
#define DISP3DSHARED_EXPORT
Ordered set of INVLIB::InvEcd records — the result of a sequential dipole-fit run.
Container pairing the left and right cortical source spaces of a subject.
3-D brain visualisation using the Qt RHI rendering backend.
static SensorLoadResult loadSensors(const QString &fifPath, const QString &megHelmetOverridePath={})
Return value bundling loaded sensor geometry, labels, and channel-to-sensor mapping.
Definition dataloader.h:81
FIFFLIB::FiffInfo info
Channel / dig info.
Definition dataloader.h:85
QMatrix4x4 devHeadTrans
Device→Head transform (identity if absent).
Definition dataloader.h:93
QList< QStandardItem * > megGradItems
Ownership passes to caller.
Definition dataloader.h:86
QList< FIFFLIB::FiffDigPoint > digitizerPoints
Definition dataloader.h:89
QList< QStandardItem * > megMagItems
Definition dataloader.h:87
QList< QStandardItem * > eegItems
Definition dataloader.h:88
bool hasDevHead
Whether a valid dev→head transform was found.
Definition dataloader.h:94
std::shared_ptr< BrainSurface > helmetSurface
May be null.
Definition dataloader.h:91
Tree item representing MEG or EEG sensor positions in the 3-D scene hierarchy.
Renderable cortical surface mesh with per-vertex color, curvature data, and GPU buffer management.
Labelled 4x4 FIFF affine: source frame, destination frame, rotation, translation and cached inverse.
Single averaged evoked response: time axis, data, baseline, channel info and averaging metadata.
Definition fiff_evoked.h:77
Full FIFF measurement info: per-channel descriptors, sampling and filter setup, projectors,...
Definition fiff_info.h:90
Holds a set of Electric Current Dipoles.
Definition inv_ecd_set.h:67
List of MNESourceSpace objects forming a subject source space.