v2.0.0
Loading...
Searching...
No Matches
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)
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 SourceEstimateOverlayoverlay () 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 72 of file sourceestimatemanager.h.

Inheritance diagram for SourceEstimateManager:
Inheritance graph

Constructor & Destructor Documentation

◆ SourceEstimateManager()

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

Constructor.

Parameters
[in]parentParent QObject.

Definition at line 55 of file sourceestimatemanager.cpp.

◆ ~SourceEstimateManager()

SourceEstimateManager::~SourceEstimateManager ( )
override

Destructor.

Definition at line 62 of file sourceestimatemanager.cpp.

Member Function Documentation

◆ closestIndex()

int SourceEstimateManager::closestIndex ( float timeSec) const
Returns
index closest to timeSec, or -1.

Definition at line 240 of file sourceestimatemanager.cpp.

◆ currentTimePoint()

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

Definition at line 132 of file sourceestimatemanager.h.

◆ isLoaded()

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

Definition at line 145 of file sourceestimatemanager.cpp.

◆ isLoading()

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

Definition at line 109 of file sourceestimatemanager.h.

◆ isStreaming()

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

Definition at line 182 of file sourceestimatemanager.h.

◆ load()

bool 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]surfacesSurface 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 72 of file sourceestimatemanager.cpp.

◆ loaded

void SourceEstimateManager::loaded ( int numTimePoints)
signal

Emitted when STC data finishes loading.

◆ loadingProgress

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

Emitted during async loading to report progress.

◆ numTimePoints()

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

Definition at line 233 of file sourceestimatemanager.cpp.

◆ overlay()

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

Definition at line 366 of file sourceestimatemanager.cpp.

◆ pushData()

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

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

Definition at line 342 of file sourceestimatemanager.cpp.

◆ realtimeColorsAvailable

void 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 SourceEstimateManager::setColormap ( const QString & name)

Set the colormap used for source estimate visualisation.

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

Definition at line 255 of file sourceestimatemanager.cpp.

◆ setInterval()

void SourceEstimateManager::setInterval ( int msec)

Set the streaming playback interval in milliseconds.

Definition at line 350 of file sourceestimatemanager.cpp.

◆ setLooping()

void SourceEstimateManager::setLooping ( bool enabled)

Enable or disable looping of the streaming queue.

Definition at line 358 of file sourceestimatemanager.cpp.

◆ setThresholds()

void 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 263 of file sourceestimatemanager.cpp.

◆ setTimePoint()

void 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]surfacesSurface map.
[in]singleViewSingle-view state (for active surface type).
[in]subViewsMulti-view states.

Definition at line 189 of file sourceestimatemanager.cpp.

◆ startStreaming()

void 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]surfacesSurface map (for colour application).
[in]singleViewSingle-view state.
[in]subViewsMulti-view states.

Definition at line 274 of file sourceestimatemanager.cpp.

◆ stopStreaming()

void SourceEstimateManager::stopStreaming ( )

Stop real-time streaming.

Definition at line 329 of file sourceestimatemanager.cpp.

◆ thresholdsUpdated

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

Emitted when thresholds are auto-computed from data.

◆ timePointChanged

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

Emitted when the active time point changes.

◆ tmin()

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

Definition at line 226 of file sourceestimatemanager.cpp.

◆ tstep()

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

Definition at line 219 of file sourceestimatemanager.cpp.


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