SourceEstimateOverlay class. 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 MNELIB::MNESourceEstimate &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 |
SourceEstimateOverlay class.
SourceEstimateOverlay manages source estimate data (.stc files) and applies colormap visualization to brain surfaces.
Definition at line 63 of file sourceestimateoverlay.h.
| SourceEstimateOverlay::SourceEstimateOverlay | ( | ) |
Constructor
Definition at line 55 of file sourceestimateoverlay.cpp.
| SourceEstimateOverlay::~SourceEstimateOverlay | ( | ) |
Destructor
Definition at line 61 of file sourceestimateoverlay.cpp.
| void 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 112 of file sourceestimateoverlay.cpp.
|
inline |
Get the current colormap name.
Definition at line 130 of file sourceestimateoverlay.h.
| 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.
| [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 291 of file sourceestimateoverlay.cpp.
| void 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 249 of file sourceestimateoverlay.cpp.
|
inline |
Get the interpolation matrix for the left hemisphere.
Definition at line 223 of file sourceestimateoverlay.h.
|
inline |
Get the interpolation matrix for the right hemisphere.
Definition at line 231 of file sourceestimateoverlay.h.
| bool SourceEstimateOverlay::isLoaded | ( | ) | const |
Check if source estimate data is loaded.
Definition at line 105 of file sourceestimateoverlay.cpp.
| bool 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 67 of file sourceestimateoverlay.cpp.
| int SourceEstimateOverlay::numTimePoints | ( | ) | const |
Get the number of time points in the source estimate.
Definition at line 209 of file sourceestimateoverlay.cpp.
| void SourceEstimateOverlay::setColormap | ( | const QString & | name | ) |
Set the colormap to use for visualization.
| [in] | name | Colormap name ("Hot", "Jet", "Viridis", "Cool", "RedBlue"). |
Definition at line 193 of file sourceestimateoverlay.cpp.
| void 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 379 of file sourceestimateoverlay.cpp.
| void SourceEstimateOverlay::setStcData | ( | const MNELIB::MNESourceEstimate & | 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 366 of file sourceestimateoverlay.cpp.
| void 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 200 of file sourceestimateoverlay.cpp.
| 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.
| [in] | timeIndex | Time sample index. |
Definition at line 404 of file sourceestimateoverlay.cpp.
|
inline |
Definition at line 149 of file sourceestimateoverlay.h.
|
inline |
Definition at line 148 of file sourceestimateoverlay.h.
|
inline |
Get the current threshold values.
Definition at line 147 of file sourceestimateoverlay.h.
| float SourceEstimateOverlay::timeAtIndex | ( | int | idx | ) | const |
Get the time value at a given index.
| [in] | idx | Time sample index. |
Definition at line 218 of file sourceestimateoverlay.cpp.
| float SourceEstimateOverlay::tmin | ( | ) | const |
Get the minimum time value.
Definition at line 231 of file sourceestimateoverlay.cpp.
| float SourceEstimateOverlay::tstep | ( | ) | const |
Get the time step between samples.
Definition at line 240 of file sourceestimateoverlay.cpp.
| void SourceEstimateOverlay::updateThresholdsFromData | ( | ) |
Update thresholds based on loaded data range.
Definition at line 390 of file sourceestimateoverlay.cpp.