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 SourceEstimateOverlay * | overlay () const |
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.

|
explicit |
Constructor.
| [in] | parent | Parent QObject. |
Definition at line 55 of file sourceestimatemanager.cpp.
|
override |
Destructor.
Definition at line 62 of file sourceestimatemanager.cpp.
| int SourceEstimateManager::closestIndex | ( | float | timeSec | ) | const |
timeSec, or -1. Definition at line 240 of file sourceestimatemanager.cpp.
|
inline |
Definition at line 132 of file sourceestimatemanager.h.
| bool SourceEstimateManager::isLoaded | ( | ) | const |
Definition at line 145 of file sourceestimatemanager.cpp.
|
inline |
Definition at line 109 of file sourceestimatemanager.h.
|
inline |
Definition at line 182 of file sourceestimatemanager.h.
| 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.
| [in] | lhPath | Path to left-hemisphere STC file. |
| [in] | rhPath | Path to right-hemisphere STC file. |
| [in] | surfaces | Surface map for finding lh/rh brain surfaces. |
| [in] | activeSurfaceType | Active surface type name (e.g. "pial"). |
Definition at line 72 of file sourceestimatemanager.cpp.
|
signal |
Emitted when STC data finishes loading.
|
signal |
Emitted during async loading to report progress.
| int SourceEstimateManager::numTimePoints | ( | ) | const |
Definition at line 233 of file sourceestimatemanager.cpp.
| const SourceEstimateOverlay * SourceEstimateManager::overlay | ( | ) | const |
Definition at line 366 of file sourceestimatemanager.cpp.
| 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.
|
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.
| void SourceEstimateManager::setColormap | ( | const QString & | name | ) |
Set the colormap used for source estimate visualisation.
| [in] | name | Colormap name (e.g. "Hot", "Jet"). |
Definition at line 255 of file sourceestimatemanager.cpp.
| void SourceEstimateManager::setInterval | ( | int | msec | ) |
Set the streaming playback interval in milliseconds.
Definition at line 350 of file sourceestimatemanager.cpp.
| void SourceEstimateManager::setLooping | ( | bool | enabled | ) |
Enable or disable looping of the streaming queue.
Definition at line 358 of file sourceestimatemanager.cpp.
| void SourceEstimateManager::setThresholds | ( | float | min, |
| float | mid, | ||
| float | max ) |
Set source estimate thresholds.
| [in] | min | Minimum threshold. |
| [in] | mid | Mid threshold. |
| [in] | max | Maximum threshold. |
Definition at line 263 of file sourceestimatemanager.cpp.
| 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.
| [in] | index | Time-point index. |
| [in] | surfaces | Surface map. |
| [in] | singleView | Single-view state (for active surface type). |
| [in] | subViews | Multi-view states. |
Definition at line 189 of file sourceestimatemanager.cpp.
| 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.
| [in] | surfaces | Surface map (for colour application). |
| [in] | singleView | Single-view state. |
| [in] | subViews | Multi-view states. |
Definition at line 274 of file sourceestimatemanager.cpp.
| void SourceEstimateManager::stopStreaming | ( | ) |
Stop real-time streaming.
Definition at line 329 of file sourceestimatemanager.cpp.
|
signal |
Emitted when thresholds are auto-computed from data.
|
signal |
Emitted when the active time point changes.
| float SourceEstimateManager::tmin | ( | ) | const |
Definition at line 226 of file sourceestimatemanager.cpp.
| float SourceEstimateManager::tstep | ( | ) | const |
Definition at line 219 of file sourceestimatemanager.cpp.