v2.0.0
Loading...
Searching...
No Matches
DataLoader Class Reference

Pure I/O helpers that load MNE data files and return results. More...

#include <dataloader.h>

Classes

struct  SensorLoadResult

Public Member Functions

 DataLoader ()=delete

Static Public Member Functions

static SensorLoadResult loadSensors (const QString &fifPath, const QString &megHelmetOverridePath={})
static std::shared_ptr< BrainSurfaceloadHelmetSurface (const QString &helmetFilePath, const QMatrix4x4 &devHeadTrans=QMatrix4x4(), bool applyTrans=false)
static INVERSELIB::ECDSet loadDipoles (const QString &dipPath)
static MNELIB::MNESourceSpace loadSourceSpace (const QString &fwdPath)
static bool loadHeadToMriTransform (const QString &transPath, FIFFLIB::FiffCoordTrans &trans)
static FIFFLIB::FiffEvoked loadEvoked (const QString &evokedPath, int aveIndex=0)
static QStringList probeEvokedSets (const QString &evokedPath)

Detailed Description

Pure I/O helpers that load MNE data files and return results.

These static methods have zero coupling to the widget layer. BrainView calls them to obtain data and then wires the results into its own model / surface map / member state.

Definition at line 74 of file dataloader.h.

Constructor & Destructor Documentation

◆ DataLoader()

DataLoader::DataLoader ( )
delete

Member Function Documentation

◆ loadDipoles()

ECDSet DataLoader::loadDipoles ( const QString & dipPath)
static

Load dipole set from a .dip file.

Parameters
[in]dipPathPath to the dipole file.
Returns
The loaded ECDSet (may be empty on failure).

Definition at line 309 of file dataloader.cpp.

◆ loadEvoked()

FiffEvoked DataLoader::loadEvoked ( const QString & evokedPath,
int aveIndex = 0 )
static

Load an FiffEvoked from a FIF file.

Parameters
[in]evokedPathPath to the FIF file.
[in]aveIndexSet index to load.
Returns
The loaded FiffEvoked (may be empty on failure).

Definition at line 386 of file dataloader.cpp.

◆ loadHeadToMriTransform()

bool DataLoader::loadHeadToMriTransform ( const QString & transPath,
FIFFLIB::FiffCoordTrans & trans )
static

Load a coordinate transformation from a FIF file and normalise it to Head → MRI orientation.

Parameters
[in]transPathPath to the FIF file.
[out]transThe resulting transform (Head → MRI).
Returns
true on success.

Definition at line 355 of file dataloader.cpp.

◆ loadHelmetSurface()

std::shared_ptr< BrainSurface > DataLoader::loadHelmetSurface ( const QString & helmetFilePath,
const QMatrix4x4 & devHeadTrans = QMatrix4x4(),
bool applyTrans = false )
static

Load a standalone MEG helmet surface from a BEM FIF file.

Parameters
[in]helmetFilePathPath to the helmet BEM FIF file.
[in]devHeadTransDevice-to-Head transformation matrix (identity if none).
[in]applyTransWhether to apply the dev→head transform.
Returns
Shared pointer to the loaded BrainSurface, or nullptr on failure.

Definition at line 253 of file dataloader.cpp.

◆ loadSensors()

DataLoader::SensorLoadResult DataLoader::loadSensors ( const QString & fifPath,
const QString & megHelmetOverridePath = {} )
static

Load sensor channels, digitizer points and MEG helmet from a FIF file.

Parameters
[in]fifPathPath to the FIF file.
[in]megHelmetOverridePathOptional override for the helmet surface file.
Returns
Populated SensorLoadResult.

Definition at line 64 of file dataloader.cpp.

◆ loadSourceSpace()

MNESourceSpace DataLoader::loadSourceSpace ( const QString & fwdPath)
static

Load source space from a forward-solution FIF file.

Parameters
[in]fwdPathPath to the FIF file with source space.
Returns
The loaded source space (may be empty on failure).

Definition at line 320 of file dataloader.cpp.

◆ probeEvokedSets()

QStringList DataLoader::probeEvokedSets ( const QString & evokedPath)
static

Probe a FIF file for the available evoked data sets.

Parameters
[in]evokedPathPath to the FIF file.
Returns
List of human-readable labels for each set.

Definition at line 403 of file dataloader.cpp.


The documentation for this class was generated from the following files: