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
53class BrainSurface;
54class SensorTreeItem;
55
56//=============================================================================================================
66{
67public:
68 DataLoader() = delete; // all-static class
69
70 // ── Result structs ────────────────────────────────────────────────
71
78 {
79 bool hasInfo = false;
80 bool hasDigitizer = false;
81
83 QList<QStandardItem*> megGradItems;
84 QList<QStandardItem*> megMagItems;
85 QList<QStandardItem*> eegItems;
86 QList<FIFFLIB::FiffDigPoint> digitizerPoints;
87
88 std::shared_ptr<BrainSurface> helmetSurface;
89
90 QMatrix4x4 devHeadTrans;
91 bool hasDevHead = false;
92 };
93
94 // ── Static I/O methods ────────────────────────────────────────────
95
103 static SensorLoadResult loadSensors(const QString &fifPath,
104 const QString &megHelmetOverridePath = {});
105
114 static std::shared_ptr<BrainSurface> loadHelmetSurface(
115 const QString &helmetFilePath,
116 const QMatrix4x4 &devHeadTrans = QMatrix4x4(),
117 bool applyTrans = false);
118
125 static INVLIB::InvEcdSet loadDipoles(const QString &dipPath);
126
133 static MNELIB::MNESourceSpaces loadSourceSpace(const QString &fwdPath);
134
143 static bool loadHeadToMriTransform(const QString &transPath,
145
153 static FIFFLIB::FiffEvoked loadEvoked(const QString &evokedPath, int aveIndex = 0);
154
161 static QStringList probeEvokedSets(const QString &evokedPath);
162};
163
164#endif // DATALOADER_H
Library export/import macros and namespace marker for the disp3D library.
#define DISP3DSHARED_EXPORT
Container pairing the left and right cortical source spaces of a subject.
Full FIFF measurement metadata: everything from FIFFB_MEAS / FIFFB_MEAS_INFO needed to interpret a re...
Single averaged evoked response: time axis, samples, baseline, channel info and processing history.
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...
Ordered set of INVLIB::InvEcd records — the result of a sequential dipole-fit run.
static SensorLoadResult loadSensors(const QString &fifPath, const QString &megHelmetOverridePath={})
DataLoader()=delete
Return value bundling loaded sensor geometry, labels, and channel-to-sensor mapping.
Definition dataloader.h:78
std::shared_ptr< BrainSurface > helmetSurface
May be null.
Definition dataloader.h:88
QList< QStandardItem * > megGradItems
Ownership passes to caller.
Definition dataloader.h:83
FIFFLIB::FiffInfo info
Channel / dig info.
Definition dataloader.h:82
QMatrix4x4 devHeadTrans
Device→Head transform (identity if absent).
Definition dataloader.h:90
QList< QStandardItem * > eegItems
Definition dataloader.h:85
bool hasDevHead
Whether a valid dev→head transform was found.
Definition dataloader.h:91
QList< FIFFLIB::FiffDigPoint > digitizerPoints
Definition dataloader.h:86
QList< QStandardItem * > megMagItems
Definition dataloader.h:84
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:75
Full FIFF measurement info: per-channel descriptors, sampling and filter setup, projectors,...
Definition fiff_info.h:88
Holds a set of Electric Current Dipoles.
Definition inv_ecd_set.h:64
List of MNESourceSpace objects forming a subject source space.