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

Real-time sensor streaming lifecycle manager. More...

#include <rtsensorstreammanager.h>

Signals

void colorsAvailable (const QString &surfaceKey, const QVector< uint32_t > &colors)

Public Member Functions

 RtSensorStreamManager (QObject *parent=nullptr)
 ~RtSensorStreamManager () override
bool startStreaming (const QString &modality, const SensorFieldMapper &fieldMapper, const QMap< QString, std::shared_ptr< BrainSurface > > &surfaces)
void stopStreaming ()
bool isStreaming () const
QString modality () const
void pushData (const Eigen::VectorXf &data)
void setInterval (int msec)
void setLooping (bool enabled)
void setAverages (int numAvr)
void setColormap (const QString &name)

Detailed Description

Real-time sensor streaming lifecycle manager.

Manages real-time sensor data streaming via RtSensorDataController.

BrainView delegates all sensor streaming operations to this component, keeping its own code free of the RtSensorDataController lifecycle.

Definition at line 56 of file rtsensorstreammanager.h.

Inheritance diagram for DISP3DLIB::RtSensorStreamManager:
Inheritance graph

Constructor & Destructor Documentation

◆ RtSensorStreamManager()

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

Constructor.

Parameters
[in]parentParent QObject.

Definition at line 31 of file rtsensorstreammanager.cpp.

◆ ~RtSensorStreamManager()

DISP3DLIB::RtSensorStreamManager::~RtSensorStreamManager ( )
override

Destructor.

Definition at line 38 of file rtsensorstreammanager.cpp.

Member Function Documentation

◆ colorsAvailable

void DISP3DLIB::RtSensorStreamManager::colorsAvailable ( const QString & surfaceKey,
const QVector< uint32_t > & colors )
signal

Emitted when the streaming pipeline produces a new set of per-vertex colours for a sensor surface.

Parameters
[in]surfaceKeyKey of the target surface.
[in]colorsPer-vertex ABGR colour array.

◆ isStreaming()

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

Definition at line 97 of file rtsensorstreammanager.h.

◆ modality()

QString DISP3DLIB::RtSensorStreamManager::modality ( ) const
inline
Returns
the active modality ("MEG" or "EEG"), or empty.

Definition at line 103 of file rtsensorstreammanager.h.

◆ pushData()

void DISP3DLIB::RtSensorStreamManager::pushData ( const Eigen::VectorXf & data)

Push a single measurement vector into the streaming queue.

Parameters
[in]dataOne sample of sensor values; ignored if no controller exists.

Definition at line 152 of file rtsensorstreammanager.cpp.

◆ setAverages()

void DISP3DLIB::RtSensorStreamManager::setAverages ( int numAvr)

Set the number of averages for smoothing.

Parameters
[in]numAvrNumber of consecutive samples averaged per frame.

Definition at line 176 of file rtsensorstreammanager.cpp.

◆ setColormap()

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

Set the colormap used for colour mapping.

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

Definition at line 184 of file rtsensorstreammanager.cpp.

◆ setInterval()

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

Set the streaming playback interval in milliseconds.

Parameters
[in]msecInterval between streamed samples in milliseconds.

Definition at line 160 of file rtsensorstreammanager.cpp.

◆ setLooping()

void DISP3DLIB::RtSensorStreamManager::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 168 of file rtsensorstreammanager.cpp.

◆ startStreaming()

bool DISP3DLIB::RtSensorStreamManager::startStreaming ( const QString & modality,
const SensorFieldMapper & fieldMapper,
const QMap< QString, std::shared_ptr< BrainSurface > > & surfaces )

Start real-time sensor streaming for the given modality.

Reads mapping matrices, pick vectors, evoked data, and colourmap from the provided fieldMapper. Validates that the target surface key exists in surfaces.

Parameters
[in]modality"MEG" or "EEG".
[in]fieldMapperSensor-field mapper with built mapping data.
[in]surfacesFsSurface map for target-surface validation.
Returns
true if streaming was started successfully.

Definition at line 45 of file rtsensorstreammanager.cpp.

◆ stopStreaming()

void DISP3DLIB::RtSensorStreamManager::stopStreaming ( )

Stop real-time sensor streaming.

Definition at line 138 of file rtsensorstreammanager.cpp.


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