v2.0.0
Loading...
Searching...
No Matches
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 57 of file sourceestimateoverlay.h.

Constructor & Destructor Documentation

◆ SourceEstimateOverlay()

SourceEstimateOverlay::SourceEstimateOverlay ( )

Constructor

Definition at line 33 of file sourceestimateoverlay.cpp.

◆ ~SourceEstimateOverlay()

SourceEstimateOverlay::~SourceEstimateOverlay ( )

Destructor

Definition at line 39 of file sourceestimateoverlay.cpp.

Member Function Documentation

◆ applyToSurface()

void 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 91 of file sourceestimateoverlay.cpp.

◆ colormap()

QString SourceEstimateOverlay::colormap ( ) const
inline

Get the current colormap name.

Returns
The colormap name.

Definition at line 124 of file sourceestimateoverlay.h.

◆ computeInterpolationMatrix()

void 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 294 of file sourceestimateoverlay.cpp.

◆ getDataRange()

void 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 252 of file sourceestimateoverlay.cpp.

◆ interpolationMatLh()

QSharedPointer< Eigen::SparseMatrix< float > > 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 217 of file sourceestimateoverlay.h.

◆ interpolationMatRh()

QSharedPointer< Eigen::SparseMatrix< float > > 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 225 of file sourceestimateoverlay.h.

◆ isLoaded()

bool SourceEstimateOverlay::isLoaded ( ) const

Check if source estimate data is loaded.

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

Definition at line 84 of file sourceestimateoverlay.cpp.

◆ loadStc()

bool 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 45 of file sourceestimateoverlay.cpp.

◆ numTimePoints()

int SourceEstimateOverlay::numTimePoints ( ) const

Get the number of time points in the source estimate.

Returns
Number of time samples.

Definition at line 212 of file sourceestimateoverlay.cpp.

◆ setColormap()

void SourceEstimateOverlay::setColormap ( const QString & name)

Set the colormap to use for visualization.

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

Definition at line 192 of file sourceestimateoverlay.cpp.

◆ setInterpolationMatrix()

void 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 379 of file sourceestimateoverlay.cpp.

◆ setStcData()

void 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 365 of file sourceestimateoverlay.cpp.

◆ setThresholds()

void 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 201 of file sourceestimateoverlay.cpp.

◆ sourceDataColumn()

Eigen::VectorXd 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 406 of file sourceestimateoverlay.cpp.

◆ thresholdMax()

float SourceEstimateOverlay::thresholdMax ( ) const
inline

Definition at line 143 of file sourceestimateoverlay.h.

◆ thresholdMid()

float SourceEstimateOverlay::thresholdMid ( ) const
inline

Definition at line 142 of file sourceestimateoverlay.h.

◆ thresholdMin()

float SourceEstimateOverlay::thresholdMin ( ) const
inline

Get the current threshold values.

Definition at line 141 of file sourceestimateoverlay.h.

◆ timeAtIndex()

float 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 221 of file sourceestimateoverlay.cpp.

◆ tmin()

float SourceEstimateOverlay::tmin ( ) const

Get the minimum time value.

Returns
Time in seconds.

Definition at line 234 of file sourceestimateoverlay.cpp.

◆ tstep()

float SourceEstimateOverlay::tstep ( ) const

Get the time step between samples.

Returns
Time step in seconds.

Definition at line 243 of file sourceestimateoverlay.cpp.

◆ updateThresholdsFromData()

void SourceEstimateOverlay::updateThresholdsFromData ( )

Update thresholds based on loaded data range.

Definition at line 391 of file sourceestimateoverlay.cpp.


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