v2.0.0
Loading...
Searching...
No Matches
sourceestimateoverlay.h
Go to the documentation of this file.
1//=============================================================================================================
34
35#ifndef SOURCEESTIMATEOVERLAY_H
36#define SOURCEESTIMATEOVERLAY_H
37
38//=============================================================================================================
39// INCLUDES
40//=============================================================================================================
41
43
45#include <QVector>
46#include <QString>
47#include <QSharedPointer>
48#include <Eigen/Sparse>
49
50//=============================================================================================================
51// FORWARD DECLARATIONS
52//=============================================================================================================
53
54class BrainSurface;
55
56//=============================================================================================================
64{
65public:
66 //=========================================================================================================
71
72 //=========================================================================================================
77
78 //=========================================================================================================
86 bool loadStc(const QString &path, int hemi);
87
88 //=========================================================================================================
94 bool isLoaded() const;
95
96 //=========================================================================================================
103 void applyToSurface(BrainSurface *surface, int timeIndex);
104
105 //=========================================================================================================
114 void computeInterpolationMatrix(BrainSurface *surface, int hemi, double cancelDist = 0.05);
115
116 //=========================================================================================================
122 void setColormap(const QString &name);
123
124 //=========================================================================================================
130 QString colormap() const { return m_colormap; }
131
132 //=========================================================================================================
141 void setThresholds(float min, float mid, float max);
142
143 //=========================================================================================================
147 float thresholdMin() const { return m_threshMin; }
148 float thresholdMid() const { return m_threshMid; }
149 float thresholdMax() const { return m_threshMax; }
150
151 //=========================================================================================================
157 int numTimePoints() const;
158
159 //=========================================================================================================
166 float timeAtIndex(int idx) const;
167
168 //=========================================================================================================
174 float tmin() const;
175
176 //=========================================================================================================
182 float tstep() const;
183
184 //=========================================================================================================
191 void getDataRange(double &minVal, double &maxVal) const;
192
193 //=========================================================================================================
200 void setStcData(const MNELIB::MNESourceEstimate &stc, int hemi);
201
202 //=========================================================================================================
209 void setInterpolationMatrix(QSharedPointer<Eigen::SparseMatrix<float>> mat, int hemi);
210
211 //=========================================================================================================
215 void updateThresholdsFromData();
216
217 //=========================================================================================================
223 QSharedPointer<Eigen::SparseMatrix<float>> interpolationMatLh() const { return m_interpolationMatLh; }
224
225 //=========================================================================================================
231 QSharedPointer<Eigen::SparseMatrix<float>> interpolationMatRh() const { return m_interpolationMatRh; }
232
233 //=========================================================================================================
241 Eigen::VectorXd sourceDataColumn(int timeIndex) const;
242
243private:
244 //=========================================================================================================
252 uint32_t valueToColor(double value, uint8_t alpha = 255) const;
253
256 bool m_hasLh = false;
257 bool m_hasRh = false;
258
259 QString m_colormap = "Hot";
260 float m_threshMin = 0.0f;
261 float m_threshMid = 0.5f;
262 float m_threshMax = 1.0f;
263
264 QSharedPointer<Eigen::SparseMatrix<float>> m_interpolationMatLh;
265 QSharedPointer<Eigen::SparseMatrix<float>> m_interpolationMatRh;
266};
267
268#endif // SOURCEESTIMATEOVERLAY_H
disp3D_rhi library export/import macros.
#define DISP3DRHISHARED_EXPORT
MNESourceEstimate class declaration.
Renderable cortical surface mesh with per-vertex color, curvature data, and GPU buffer management.
QSharedPointer< Eigen::SparseMatrix< float > > interpolationMatRh() const
void applyToSurface(BrainSurface *surface, int timeIndex)
QSharedPointer< Eigen::SparseMatrix< float > > interpolationMatLh() const
void computeInterpolationMatrix(BrainSurface *surface, int hemi, double cancelDist=0.05)
void setColormap(const QString &name)
bool loadStc(const QString &path, int hemi)