v2.0.0
Loading...
Searching...
No Matches
hpisettingsview.h
Go to the documentation of this file.
1//=============================================================================================================
23
24#ifndef HPISETTINGSVIEW_H
25#define HPISETTINGSVIEW_H
26
27//=============================================================================================================
28// INCLUDES
29//=============================================================================================================
30
31#include "../disp_global.h"
32#include "abstractview.h"
33#include <fiff/fiff_dig_point.h>
34
35//=============================================================================================================
36// QT INCLUDES
37//=============================================================================================================
38
39#include <QJsonDocument>
40
41#include <memory>
42
43//=============================================================================================================
44// EIGEN INCLUDES
45//=============================================================================================================
46
47#include <Eigen/Core>
48
49//=============================================================================================================
50// FORWARD DECLARATIONS
51//=============================================================================================================
52
53namespace Ui
54{
55class HpiSettingsViewWidget;
56}
57
58namespace FIFFLIB
59{
60class FiffDigPointSet;
61}
62
63//=============================================================================================================
64// DEFINE NAMESPACE DISPLIB
65//=============================================================================================================
66
67namespace DISPLIB
68{
69
70//=============================================================================================================
79{
80 Q_OBJECT
81
82public:
83 //=========================================================================================================
91 HpiSettingsView(const QString& sSettingsPath = "",
92 QWidget* parent = 0,
93 Qt::WindowFlags f = Qt::Widget);
94
96
97 //=========================================================================================================
104 void setErrorLabels(const QVector<double>& vError,
105 const double dMeanErrorDist);
106
107 //=========================================================================================================
114
115 void setGoFLabels(const Eigen::VectorXd& vGoF,
116 const double dMeanGof);
117
118 //=========================================================================================================
125 void setMovementResults(double dMovement,
126 double dRotation);
127
128 //=========================================================================================================
134 bool getSspStatusChanged();
135
136 //=========================================================================================================
143
144 //=========================================================================================================
151
152 //=========================================================================================================
159
160 //=========================================================================================================
167
168 //=========================================================================================================
175
176 //=========================================================================================================
183
184 //=========================================================================================================
190 void newDigitizerList(QList<FIFFLIB::FiffDigPoint> pointList);
191
192 //=========================================================================================================
198 void loadCoilPresets(const QString& sFilePath);
199
200 //=========================================================================================================
204 void saveSettings();
205
206 //=========================================================================================================
210 void loadSettings();
211
212 //=========================================================================================================
216 void clearView();
217
218protected:
219 //=========================================================================================================
225 void updateGuiMode(GuiMode mode);
226
227 //=========================================================================================================
234
235 //=========================================================================================================
239 void onLoadDigitizers();
240
241 //=========================================================================================================
248 void onFrequencyCellChanged(int row,
249 int col);
250
251 //=========================================================================================================
255 void onAddCoil();
256
257 //=========================================================================================================
261 void onRemoveCoil();
262
263 //=========================================================================================================
271 QList<FIFFLIB::FiffDigPoint> readDigitizersFromFile(const QString& fileName);
272
273 //=========================================================================================================
279 void setupCoilPresets(int iNumCoils);
280
281 //=========================================================================================================
287 void populatePresetGUI(const QJsonArray& presetData);
288
289 //=========================================================================================================
293 void populateCoilGUI();
294
295 //=========================================================================================================
301 void selectCoilPreset(int iCoilPresetIndex);
302
303 //=========================================================================================================
309 void addCoilFreqToGUI(int iCoilFreq);
310
311 //=========================================================================================================
315 void addCoilErrorToGUI();
316
317 //=========================================================================================================
321 void clearCoilGUI();
322
323 //=========================================================================================================
330
331 std::unique_ptr<Ui::HpiSettingsViewWidget> m_pUi;
332
333 QVector<int> m_vCoilFreqs;
334
336
337 QJsonDocument m_CoilPresets;
338
339signals:
340 //=========================================================================================================
346 void coilFrequenciesChanged(const QVector<int>& vCoilFreqs);
347
348 //=========================================================================================================
355 void digitizersChanged(const QList<FIFFLIB::FiffDigPoint>& lDigitzers,
356 const QString& sFilePath);
357
358 //=========================================================================================================
363
364 //=========================================================================================================
369
370 //=========================================================================================================
376 void sspStatusChanged(bool bChecked);
377
378 //=========================================================================================================
384 void compStatusChanged(bool bChecked);
385
386 //=========================================================================================================
392 void contHpiStatusChanged(bool bChecked);
393
394 //=========================================================================================================
400 void fittingWindowSizeChanged(int iFitsPerSecond);
401
402 //=========================================================================================================
408 void allowedMeanErrorDistChanged(double dAllowedMeanErrorDist);
409
410 //=========================================================================================================
416 void allowedMovementChanged(double dAllowedMovement);
417
418 //=========================================================================================================
424 void allowedRotationChanged(double dAllowedRotation);
425};
426
427} //NAMESPACE
428
429#endif // HPISETTINGSVIEW_H
Single digitization point (FIFF_DIG_POINT) with kind (cardinal/HPI/EEG/extra), identifier and 3D coor...
Export macros and build-info hooks for the DISPLIB shared library.
#define DISPSHARED_EXPORT
Definition disp_global.h:38
Common base widget for every dockable Quick-Control settings panel in DISPLIB.
FIFF file I/O, in-memory data structures and high-level readers/writers.
2-D display widgets and visualisation helpers (charts, topography, colour maps).
AbstractView(QWidget *parent=0, Qt::WindowFlags f=Qt::Widget)
void allowedRotationChanged(double dAllowedRotation)
void updateProcessingMode(ProcessingMode mode)
void sspStatusChanged(bool bChecked)
void updateDigitizerInfoGUI(const FIFFLIB::FiffDigPointSet &digSet)
void fittingWindowSizeChanged(int iFitsPerSecond)
void setMovementResults(double dMovement, double dRotation)
void loadCoilPresets(const QString &sFilePath)
void coilFrequenciesChanged(const QVector< int > &vCoilFreqs)
void newDigitizerList(QList< FIFFLIB::FiffDigPoint > pointList)
void addCoilFreqToGUI(int iCoilFreq)
void updateGuiMode(GuiMode mode)
void populatePresetGUI(const QJsonArray &presetData)
void setGoFLabels(const Eigen::VectorXd &vGoF, const double dMeanGof)
void compStatusChanged(bool bChecked)
void setupCoilPresets(int iNumCoils)
void onFrequencyCellChanged(int row, int col)
void setErrorLabels(const QVector< double > &vError, const double dMeanErrorDist)
void addCoilErrorToGUI()
addCoilErrorToGUI
HpiSettingsView(const QString &sSettingsPath="", QWidget *parent=0, Qt::WindowFlags f=Qt::Widget)
void allowedMovementChanged(double dAllowedMovement)
void allowedMeanErrorDistChanged(double dAllowedMeanErrorDist)
void selectCoilPreset(int iCoilPresetIndex)
QList< FIFFLIB::FiffDigPoint > readDigitizersFromFile(const QString &fileName)
std::unique_ptr< Ui::HpiSettingsViewWidget > m_pUi
void digitizersChanged(const QList< FIFFLIB::FiffDigPoint > &lDigitzers, const QString &sFilePath)
void contHpiStatusChanged(bool bChecked)
Collection of FiffDigPoint records as parsed from a FIFFB_ISOTRAK block.