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 |
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.
| DISP3DLIB::SourceEstimateOverlay::SourceEstimateOverlay | ( | ) |
Constructor
Definition at line 36 of file sourceestimateoverlay.cpp.
| DISP3DLIB::SourceEstimateOverlay::~SourceEstimateOverlay | ( | ) |
Destructor
Definition at line 42 of file sourceestimateoverlay.cpp.
| void DISP3DLIB::SourceEstimateOverlay::applyToSurface | ( | BrainSurface * | surface, |
| int | timeIndex ) |
Apply source estimate colors to a brain surface at a given time index.
| [in] | surface | Pointer to the brain surface. |
| [in] | timeIndex | Time sample index. |
Definition at line 94 of file sourceestimateoverlay.cpp.
|
inline |
Get the current colormap name.
Definition at line 129 of file sourceestimateoverlay.h.
| 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.
| [in] | surface | Pointer to the brain surface. |
| [in] | hemi | Hemisphere index (0=lh, 1=rh). |
| [in] | cancelDist | Cancel distance for interpolation (default 0.05m). |
Definition at line 301 of file sourceestimateoverlay.cpp.
| void DISP3DLIB::SourceEstimateOverlay::getDataRange | ( | double & | minVal, |
| double & | maxVal ) const |
Get the data range (min/max values) across all time points for auto-thresholding.
| [out] | minVal | Minimum data value. |
| [out] | maxVal | Maximum data value. |
Definition at line 265 of file sourceestimateoverlay.cpp.
|
inline |
Get the interpolation matrix for the left hemisphere.
Definition at line 236 of file sourceestimateoverlay.h.
|
inline |
Get the interpolation matrix for the right hemisphere.
Definition at line 247 of file sourceestimateoverlay.h.
| bool DISP3DLIB::SourceEstimateOverlay::isLoaded | ( | ) | const |
Check if source estimate data is loaded.
Definition at line 87 of file sourceestimateoverlay.cpp.
| bool DISP3DLIB::SourceEstimateOverlay::loadStc | ( | const QString & | path, |
| int | hemi ) |
Load a source estimate file (.stc) for a hemisphere.
| [in] | path | Path to the .stc file. |
| [in] | hemi | Hemisphere index (0=lh, 1=rh). |
Definition at line 48 of file sourceestimateoverlay.cpp.
| int DISP3DLIB::SourceEstimateOverlay::numTimePoints | ( | ) | const |
Get the number of time points in the source estimate.
Definition at line 219 of file sourceestimateoverlay.cpp.
| void DISP3DLIB::SourceEstimateOverlay::setColormap | ( | const QString & | name | ) |
Set the colormap to use for visualization.
| [in] | name | Colormap name ("Hot", "Jet", "Viridis", "Cool", "RedBlue"). |
Definition at line 197 of file sourceestimateoverlay.cpp.
| void DISP3DLIB::SourceEstimateOverlay::setInterpolationMatrix | ( | QSharedPointer< Eigen::SparseMatrix< float > > | mat, |
| int | hemi ) |
Set the interpolation matrix directly (used by async loader).
| [in] | mat | The interpolation matrix. |
| [in] | hemi | Hemisphere index (0=lh, 1=rh). |
Definition at line 386 of file sourceestimateoverlay.cpp.
| void DISP3DLIB::SourceEstimateOverlay::setStcData | ( | const INVLIB::InvSourceEstimate & | stc, |
| int | hemi ) |
Set the source estimate data directly (used by async loader).
| [in] | stc | The source estimate data. |
| [in] | hemi | Hemisphere index (0=lh, 1=rh). |
Definition at line 372 of file sourceestimateoverlay.cpp.
| 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.
| [in] | min | Minimum threshold. |
| [in] | mid | Mid-point threshold (used for some colormaps). |
| [in] | max | Maximum threshold. |
Definition at line 207 of file sourceestimateoverlay.cpp.
| 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.
| [in] | timeIndex | Time sample index. |
Definition at line 413 of file sourceestimateoverlay.cpp.
|
inline |
Definition at line 159 of file sourceestimateoverlay.h.
|
inline |
Definition at line 155 of file sourceestimateoverlay.h.
|
inline |
Get the current threshold values.
Definition at line 151 of file sourceestimateoverlay.h.
| float DISP3DLIB::SourceEstimateOverlay::timeAtIndex | ( | int | idx | ) | const |
Get the time value at a given index.
| [in] | idx | Time sample index. |
Definition at line 230 of file sourceestimateoverlay.cpp.
| float DISP3DLIB::SourceEstimateOverlay::tmin | ( | ) | const |
Get the minimum time value.
Definition at line 243 of file sourceestimateoverlay.cpp.
| float DISP3DLIB::SourceEstimateOverlay::tstep | ( | ) | const |
Get the time step between samples.
Definition at line 254 of file sourceestimateoverlay.cpp.
| void DISP3DLIB::SourceEstimateOverlay::updateThresholdsFromData | ( | ) |
Update thresholds based on loaded data range.
Definition at line 398 of file sourceestimateoverlay.cpp.