v2.0.0
Loading...
Searching...
No Matches
DISP3DLIB::StcLoadingWorker Class Reference

Background worker that loads source estimate (STC) files and emits loaded data for visualization. More...

#include <stcloadingworker.h>

Public Slots

void process ()

Signals

void progress (int percent, const QString &message)
void finished (bool success)
void error (const QString &message)

Public Member Functions

 StcLoadingWorker (const QString &lhPath, const QString &rhPath, BrainSurface *lhSurface, BrainSurface *rhSurface, double cancelDist=0.05, QObject *parent=nullptr)
 ~StcLoadingWorker ()
const INVLIB::InvSourceEstimate & stcLh () const
const INVLIB::InvSourceEstimate & stcRh () const
QSharedPointer< Eigen::SparseMatrix< float > > interpolationMatLh () const
QSharedPointer< Eigen::SparseMatrix< float > > interpolationMatRh () const
bool hasLh () const
bool hasRh () const
void requestCancel ()
bool isCancelled () const

Detailed Description

Background worker that loads source estimate (STC) files and emits loaded data for visualization.

StcLoadingWorker performs source estimate loading and interpolation matrix computation in a background thread to avoid blocking the UI.

Definition at line 56 of file stcloadingworker.h.

Inheritance diagram for DISP3DLIB::StcLoadingWorker:
Inheritance graph

Constructor & Destructor Documentation

◆ StcLoadingWorker()

DISP3DLIB::StcLoadingWorker::StcLoadingWorker ( const QString & lhPath,
const QString & rhPath,
BrainSurface * lhSurface,
BrainSurface * rhSurface,
double cancelDist = 0.05,
QObject * parent = nullptr )

Constructor

Parameters
[in]lhPathPath to left hemisphere STC file.
[in]rhPathPath to right hemisphere STC file.
[in]lhSurfacePointer to left hemisphere surface.
[in]rhSurfacePointer to right hemisphere surface.
[in]cancelDistCancel distance for interpolation.
[in]parentParent object.

Definition at line 33 of file stcloadingworker.cpp.

◆ ~StcLoadingWorker()

DISP3DLIB::StcLoadingWorker::~StcLoadingWorker ( )

Destructor

Definition at line 50 of file stcloadingworker.cpp.

Member Function Documentation

◆ error

void DISP3DLIB::StcLoadingWorker::error ( const QString & message)
signal

Emitted when an error occurs.

Parameters
[in]messageError description.

◆ finished

void DISP3DLIB::StcLoadingWorker::finished ( bool success)
signal

Emitted when loading is complete.

Parameters
[in]successTrue if loading succeeded.

◆ hasLh()

bool DISP3DLIB::StcLoadingWorker::hasLh ( ) const
inline

Check if left hemisphere data was loaded.

Returns
True if LH data is loaded.

Definition at line 135 of file stcloadingworker.h.

◆ hasRh()

bool DISP3DLIB::StcLoadingWorker::hasRh ( ) const
inline

Check if right hemisphere data was loaded.

Returns
True if RH data is loaded.

Definition at line 146 of file stcloadingworker.h.

◆ interpolationMatLh()

QSharedPointer< Eigen::SparseMatrix< float > > DISP3DLIB::StcLoadingWorker::interpolationMatLh ( ) const
inline

Get the computed left hemisphere interpolation matrix.

Returns
Shared pointer to the interpolation matrix.

Definition at line 113 of file stcloadingworker.h.

◆ interpolationMatRh()

QSharedPointer< Eigen::SparseMatrix< float > > DISP3DLIB::StcLoadingWorker::interpolationMatRh ( ) const
inline

Get the computed right hemisphere interpolation matrix.

Returns
Shared pointer to the interpolation matrix.

Definition at line 124 of file stcloadingworker.h.

◆ isCancelled()

bool DISP3DLIB::StcLoadingWorker::isCancelled ( ) const
inline
Returns
true if cancellation has been requested.

Definition at line 162 of file stcloadingworker.h.

◆ process

void DISP3DLIB::StcLoadingWorker::process ( )
slot

Perform the loading and computation work. This slot should be called after moving the worker to a thread.

Definition at line 104 of file stcloadingworker.cpp.

◆ progress

void DISP3DLIB::StcLoadingWorker::progress ( int percent,
const QString & message )
signal

Emitted to report progress.

Parameters
[in]percentProgress percentage (0-100).
[in]messageStatus message describing current operation.

◆ requestCancel()

void DISP3DLIB::StcLoadingWorker::requestCancel ( )
inline

Request cancellation of the current loading/interpolation. Thread-safe; takes effect at the next progress check.

Definition at line 156 of file stcloadingworker.h.

◆ stcLh()

const INVLIB::InvSourceEstimate & DISP3DLIB::StcLoadingWorker::stcLh ( ) const
inline

Get the loaded left hemisphere source estimate.

Returns
The left hemisphere source estimate.

Definition at line 91 of file stcloadingworker.h.

◆ stcRh()

const INVLIB::InvSourceEstimate & DISP3DLIB::StcLoadingWorker::stcRh ( ) const
inline

Get the loaded right hemisphere source estimate.

Returns
The right hemisphere source estimate.

Definition at line 102 of file stcloadingworker.h.


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