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

Color-mapped source estimate overlay that interpolates activation values onto a cortical surface mesh. More...

#include <sourceestimateoverlay.h>

Public Member Functions

 SourceEstimateOverlay ()
 ~SourceEstimateOverlay ()
bool loadStc (const QString &path, int hemi)
bool isLoaded () const
void applyToSurface (BrainSurface *surface, int timeIndex)
void computeInterpolationMatrix (BrainSurface *surface, int hemi, double cancelDist=0.05)
void setColormap (const QString &name)
QString colormap () const
void setThresholds (float min, float mid, float max)
float thresholdMin () const
float thresholdMid () const
float thresholdMax () const
int numTimePoints () const
float timeAtIndex (int idx) const
float tmin () const
float tstep () const
void getDataRange (double &minVal, double &maxVal) const
void setStcData (const INVLIB::InvSourceEstimate &stc, int hemi)
void setInterpolationMatrix (QSharedPointer< Eigen::SparseMatrix< float > > mat, int hemi)
void updateThresholdsFromData ()
QSharedPointer< Eigen::SparseMatrix< float > > interpolationMatLh () const
QSharedPointer< Eigen::SparseMatrix< float > > interpolationMatRh () const
Eigen::VectorXd sourceDataColumn (int timeIndex) const

Detailed Description

Color-mapped source estimate overlay that interpolates activation values onto a cortical surface mesh.

SourceEstimateOverlay manages source estimate data (.stc files) and applies colormap visualization to brain surfaces.

Definition at line 62 of file sourceestimateoverlay.h.

Constructor & Destructor Documentation

◆ SourceEstimateOverlay()

DISP3DLIB::SourceEstimateOverlay::SourceEstimateOverlay ( )

Constructor

Definition at line 36 of file sourceestimateoverlay.cpp.

◆ ~SourceEstimateOverlay()

DISP3DLIB::SourceEstimateOverlay::~SourceEstimateOverlay ( )

Destructor

Definition at line 42 of file sourceestimateoverlay.cpp.

Member Function Documentation

◆ applyToSurface()

void DISP3DLIB::SourceEstimateOverlay::applyToSurface ( BrainSurface * surface,
int timeIndex )

Apply source estimate colors to a brain surface at a given time index.

Parameters
[in]surfacePointer to the brain surface.
[in]timeIndexTime sample index.

Definition at line 94 of file sourceestimateoverlay.cpp.

◆ colormap()

QString DISP3DLIB::SourceEstimateOverlay::colormap ( ) const
inline

Get the current colormap name.

Returns
The colormap name.

Definition at line 129 of file sourceestimateoverlay.h.

◆ computeInterpolationMatrix()

void DISP3DLIB::SourceEstimateOverlay::computeInterpolationMatrix ( BrainSurface * surface,
int hemi,
double cancelDist = 0.05 )

Compute interpolation matrix for a surface. This spreads sparse source values to all surface vertices.

Parameters
[in]surfacePointer to the brain surface.
[in]hemiHemisphere index (0=lh, 1=rh).
[in]cancelDistCancel distance for interpolation (default 0.05m).

Definition at line 301 of file sourceestimateoverlay.cpp.

◆ getDataRange()

void DISP3DLIB::SourceEstimateOverlay::getDataRange ( double & minVal,
double & maxVal ) const

Get the data range (min/max values) across all time points for auto-thresholding.

Parameters
[out]minValMinimum data value.
[out]maxValMaximum data value.

Definition at line 265 of file sourceestimateoverlay.cpp.

◆ interpolationMatLh()

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

Get the interpolation matrix for the left hemisphere.

Returns
Shared pointer to the LH interpolation matrix (may be null).

Definition at line 236 of file sourceestimateoverlay.h.

◆ interpolationMatRh()

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

Get the interpolation matrix for the right hemisphere.

Returns
Shared pointer to the RH interpolation matrix (may be null).

Definition at line 247 of file sourceestimateoverlay.h.

◆ isLoaded()

bool DISP3DLIB::SourceEstimateOverlay::isLoaded ( ) const

Check if source estimate data is loaded.

Returns
True if data is loaded for at least one hemisphere.

Definition at line 87 of file sourceestimateoverlay.cpp.

◆ loadStc()

bool DISP3DLIB::SourceEstimateOverlay::loadStc ( const QString & path,
int hemi )

Load a source estimate file (.stc) for a hemisphere.

Parameters
[in]pathPath to the .stc file.
[in]hemiHemisphere index (0=lh, 1=rh).
Returns
True if successful.

Definition at line 48 of file sourceestimateoverlay.cpp.

◆ numTimePoints()

int DISP3DLIB::SourceEstimateOverlay::numTimePoints ( ) const

Get the number of time points in the source estimate.

Returns
Number of time samples.

Definition at line 219 of file sourceestimateoverlay.cpp.

◆ setColormap()

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

Set the colormap to use for visualization.

Parameters
[in]nameColormap name ("Hot", "Jet", "Viridis", "Cool", "RedBlue").

Definition at line 197 of file sourceestimateoverlay.cpp.

◆ setInterpolationMatrix()

void DISP3DLIB::SourceEstimateOverlay::setInterpolationMatrix ( QSharedPointer< Eigen::SparseMatrix< float > > mat,
int hemi )

Set the interpolation matrix directly (used by async loader).

Parameters
[in]matThe interpolation matrix.
[in]hemiHemisphere index (0=lh, 1=rh).

Definition at line 386 of file sourceestimateoverlay.cpp.

◆ setStcData()

void DISP3DLIB::SourceEstimateOverlay::setStcData ( const INVLIB::InvSourceEstimate & stc,
int hemi )

Set the source estimate data directly (used by async loader).

Parameters
[in]stcThe source estimate data.
[in]hemiHemisphere index (0=lh, 1=rh).

Definition at line 372 of file sourceestimateoverlay.cpp.

◆ setThresholds()

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

Set threshold values for normalization. Values below min are transparent, values above max are clamped.

Parameters
[in]minMinimum threshold.
[in]midMid-point threshold (used for some colormaps).
[in]maxMaximum threshold.

Definition at line 207 of file sourceestimateoverlay.cpp.

◆ sourceDataColumn()

Eigen::VectorXd DISP3DLIB::SourceEstimateOverlay::sourceDataColumn ( int timeIndex) const

Get a single column of concatenated source data (LH + RH) at a given time index. Used by the real-time streaming controller to feed data into the queue.

Parameters
[in]timeIndexTime sample index.
Returns
Concatenated source values vector (nSourcesLH + nSourcesRH).

Definition at line 413 of file sourceestimateoverlay.cpp.

◆ thresholdMax()

float DISP3DLIB::SourceEstimateOverlay::thresholdMax ( ) const
inline

Definition at line 159 of file sourceestimateoverlay.h.

◆ thresholdMid()

float DISP3DLIB::SourceEstimateOverlay::thresholdMid ( ) const
inline

Definition at line 155 of file sourceestimateoverlay.h.

◆ thresholdMin()

float DISP3DLIB::SourceEstimateOverlay::thresholdMin ( ) const
inline

Get the current threshold values.

Returns
Minimum threshold; values below it are rendered transparent.

Definition at line 151 of file sourceestimateoverlay.h.

◆ timeAtIndex()

float DISP3DLIB::SourceEstimateOverlay::timeAtIndex ( int idx) const

Get the time value at a given index.

Parameters
[in]idxTime sample index.
Returns
Time in seconds.

Definition at line 230 of file sourceestimateoverlay.cpp.

◆ tmin()

float DISP3DLIB::SourceEstimateOverlay::tmin ( ) const

Get the minimum time value.

Returns
Time in seconds.

Definition at line 243 of file sourceestimateoverlay.cpp.

◆ tstep()

float DISP3DLIB::SourceEstimateOverlay::tstep ( ) const

Get the time step between samples.

Returns
Time step in seconds.

Definition at line 254 of file sourceestimateoverlay.cpp.

◆ updateThresholdsFromData()

void DISP3DLIB::SourceEstimateOverlay::updateThresholdsFromData ( )

Update thresholds based on loaded data range.

Definition at line 398 of file sourceestimateoverlay.cpp.


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