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

Source estimate lifecycle manager. More...

#include <sourceestimatemanager.h>

Signals

void loaded (int numTimePoints)
void thresholdsUpdated (float min, float mid, float max)
void timePointChanged (int index, float time)
void loadingProgress (int percent, const QString &message)
void realtimeColorsAvailable (const QVector< uint32_t > &colorsLh, const QVector< uint32_t > &colorsRh)

Public Member Functions

 SourceEstimateManager (QObject *parent=nullptr)
 ~SourceEstimateManager () override
bool load (const QString &lhPath, const QString &rhPath, const QMap< QString, std::shared_ptr< BrainSurface > > &surfaces, const QString &activeSurfaceType)
void cancelLoading ()
bool isLoading () const
bool isLoaded () const
void setTimePoint (int index, const QMap< QString, std::shared_ptr< BrainSurface > > &surfaces, const SubView &singleView, const QVector< SubView > &subViews)
int currentTimePoint () const
float tstep () const
float tmin () const
int numTimePoints () const
int closestIndex (float timeSec) const
void setColormap (const QString &name)
void setThresholds (float min, float mid, float max)
void startStreaming (const QMap< QString, std::shared_ptr< BrainSurface > > &surfaces, const SubView &singleView, const QVector< SubView > &subViews)
void stopStreaming ()
bool isStreaming () const
void pushData (const Eigen::VectorXd &data)
void setInterval (int msec)
void setLooping (bool enabled)
const SourceEstimateOverlay * overlay () const

Detailed Description

Source estimate lifecycle manager.

Manages source estimate data: async loading, time-point navigation, colormap/threshold control, and real-time streaming via RtSourceDataController.

BrainView delegates all source-estimate operations to this component, keeping its own code free of STC lifecycle details.

Definition at line 61 of file sourceestimatemanager.h.

Inheritance diagram for DISP3DLIB::SourceEstimateManager:
Inheritance graph

Constructor & Destructor Documentation

◆ SourceEstimateManager()

DISP3DLIB::SourceEstimateManager::SourceEstimateManager ( QObject * parent = nullptr)
explicit

Constructor.

Parameters
[in]parentParent QObject.

Definition at line 36 of file sourceestimatemanager.cpp.

◆ ~SourceEstimateManager()

DISP3DLIB::SourceEstimateManager::~SourceEstimateManager ( )
override

Destructor.

Definition at line 43 of file sourceestimatemanager.cpp.

Member Function Documentation

◆ cancelLoading()

void DISP3DLIB::SourceEstimateManager::cancelLoading ( )

Cancel any in-progress STC loading / interpolation and wait for the thread to finish.

Definition at line 50 of file sourceestimatemanager.cpp.

◆ closestIndex()

int DISP3DLIB::SourceEstimateManager::closestIndex ( float timeSec) const
Parameters
[in]timeSecTime in seconds.
Returns
index closest to timeSec, or -1.

Definition at line 232 of file sourceestimatemanager.cpp.

◆ currentTimePoint()

int DISP3DLIB::SourceEstimateManager::currentTimePoint ( ) const
inline
Returns
current time-point index.

Definition at line 129 of file sourceestimatemanager.h.

◆ isLoaded()

bool DISP3DLIB::SourceEstimateManager::isLoaded ( ) const
Returns
true if source estimate data has been loaded successfully.

Definition at line 136 of file sourceestimatemanager.cpp.

◆ isLoading()

bool DISP3DLIB::SourceEstimateManager::isLoading ( ) const
inline
Returns
true while an async STC load is in progress.

Definition at line 103 of file sourceestimatemanager.h.

◆ isStreaming()

bool DISP3DLIB::SourceEstimateManager::isStreaming ( ) const
inline
Returns
true while real-time streaming is active.

Definition at line 185 of file sourceestimatemanager.h.

◆ load()

bool DISP3DLIB::SourceEstimateManager::load ( const QString & lhPath,
const QString & rhPath,
const QMap< QString, std::shared_ptr< BrainSurface > > & surfaces,
const QString & activeSurfaceType )

Start async STC file loading on a background thread.

Parameters
[in]lhPathPath to left-hemisphere STC file.
[in]rhPathPath to right-hemisphere STC file.
[in]surfacesFsSurface map for finding lh/rh brain surfaces.
[in]activeSurfaceTypeActive surface type name (e.g. "pial").
Returns
true if loading was started, false on error.

Definition at line 67 of file sourceestimatemanager.cpp.

◆ loaded

void DISP3DLIB::SourceEstimateManager::loaded ( int numTimePoints)
signal

Emitted when STC data finishes loading.

◆ loadingProgress

void DISP3DLIB::SourceEstimateManager::loadingProgress ( int percent,
const QString & message )
signal

Emitted during async loading to report progress.

◆ numTimePoints()

int DISP3DLIB::SourceEstimateManager::numTimePoints ( ) const
Returns
number of time points, or 0.

Definition at line 225 of file sourceestimatemanager.cpp.

◆ overlay()

const SourceEstimateOverlay * DISP3DLIB::SourceEstimateManager::overlay ( ) const
Returns
read-only pointer to the overlay (may be null).

Definition at line 361 of file sourceestimatemanager.cpp.

◆ pushData()

void DISP3DLIB::SourceEstimateManager::pushData ( const Eigen::VectorXd & data)

Push a single column of source data into the streaming queue.

Parameters
[in]dataSource amplitudes for one time point; ignored if no controller exists.

Definition at line 337 of file sourceestimatemanager.cpp.

◆ realtimeColorsAvailable

void DISP3DLIB::SourceEstimateManager::realtimeColorsAvailable ( const QVector< uint32_t > & colorsLh,
const QVector< uint32_t > & colorsRh )
signal

Emitted when the real-time pipeline produces a new set of per-vertex colours. The host widget should apply these to its surfaces and repaint.

◆ setColormap()

void DISP3DLIB::SourceEstimateManager::setColormap ( const QString & name)

Set the colormap used for source estimate visualisation.

Parameters
[in]nameColormap name (e.g. "Hot", "Jet").

Definition at line 249 of file sourceestimatemanager.cpp.

◆ setInterval()

void DISP3DLIB::SourceEstimateManager::setInterval ( int msec)

Set the streaming playback interval in milliseconds.

Parameters
[in]msecInterval between streamed time points in milliseconds.

Definition at line 345 of file sourceestimatemanager.cpp.

◆ setLooping()

void DISP3DLIB::SourceEstimateManager::setLooping ( bool enabled)

Enable or disable looping of the streaming queue.

Parameters
[in]enabledTrue to replay the queue from the start when it ends.

Definition at line 353 of file sourceestimatemanager.cpp.

◆ setThresholds()

void DISP3DLIB::SourceEstimateManager::setThresholds ( float min,
float mid,
float max )

Set source estimate thresholds.

Parameters
[in]minMinimum threshold.
[in]midMid threshold.
[in]maxMaximum threshold.

Definition at line 257 of file sourceestimatemanager.cpp.

◆ setTimePoint()

void DISP3DLIB::SourceEstimateManager::setTimePoint ( int index,
const QMap< QString, std::shared_ptr< BrainSurface > > & surfaces,
const SubView & singleView,
const QVector< SubView > & subViews )

Set the current STC time-point and apply colours to matching surfaces.

Parameters
[in]indexTime-point index.
[in]surfacesFsSurface map.
[in]singleViewSingle-view state (for active surface type).
[in]subViewsMulti-view states.

Definition at line 180 of file sourceestimatemanager.cpp.

◆ startStreaming()

void DISP3DLIB::SourceEstimateManager::startStreaming ( const QMap< QString, std::shared_ptr< BrainSurface > > & surfaces,
const SubView & singleView,
const QVector< SubView > & subViews )

Start real-time playback. Feeds all STC time-points into the streaming queue and begins the interpolation pipeline.

Parameters
[in]surfacesFsSurface map (for colour application).
[in]singleViewSingle-view state.
[in]subViewsMulti-view states.

Definition at line 268 of file sourceestimatemanager.cpp.

◆ stopStreaming()

void DISP3DLIB::SourceEstimateManager::stopStreaming ( )

Stop real-time streaming.

Definition at line 323 of file sourceestimatemanager.cpp.

◆ thresholdsUpdated

void DISP3DLIB::SourceEstimateManager::thresholdsUpdated ( float min,
float mid,
float max )
signal

Emitted when thresholds are auto-computed from data.

◆ timePointChanged

void DISP3DLIB::SourceEstimateManager::timePointChanged ( int index,
float time )
signal

Emitted when the active time point changes.

◆ tmin()

float DISP3DLIB::SourceEstimateManager::tmin ( ) const
Returns
start time of the STC data (seconds), or 0.

Definition at line 218 of file sourceestimatemanager.cpp.

◆ tstep()

float DISP3DLIB::SourceEstimateManager::tstep ( ) const
Returns
time step between STC samples (seconds), or 0.

Definition at line 211 of file sourceestimatemanager.cpp.


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