MNE-CPP  0.1.9
A Framework for Electrophysiology
Signals | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
DISPLIB::HpiSettingsView Class Reference

The HpiSettingsView class provides a QWidget for the HPI controls. More...

#include <hpisettingsview.h>

Signals

void coilFrequenciesChanged (const QVector< int > &vCoilFreqs)
 
void digitizersChanged (const QList< FIFFLIB::FiffDigPoint > &lDigitzers, const QString &sFilePath)
 
void doFreqOrder ()
 
void doSingleHpiFit ()
 
void sspStatusChanged (bool bChecked)
 
void compStatusChanged (bool bChecked)
 
void contHpiStatusChanged (bool bChecked)
 
void fittingWindowSizeChanged (int iFitsPerSecond)
 
void allowedMeanErrorDistChanged (double dAllowedMeanErrorDist)
 
void allowedMovementChanged (double dAllowedMovement)
 
void allowedRotationChanged (double dAllowedRotation)
 
- Signals inherited from DISPLIB::AbstractView
void guiStyleChanged (DISPLIB::AbstractView::StyleMode style)
 

Public Member Functions

 HpiSettingsView (const QString &sSettingsPath="", QWidget *parent=0, Qt::WindowFlags f=Qt::Widget)
 
void setErrorLabels (const QVector< double > &vError, const double dMeanErrorDist)
 
void setGoFLabels (const Eigen::VectorXd &vGoF, const double dMeanGof)
 
void setMovementResults (double dMovement, double dRotation)
 
bool getSspStatusChanged ()
 
bool getCompStatusChanged ()
 
double getAllowedMeanErrorDistChanged ()
 
double getAllowedMovementChanged ()
 
double getAllowedRotationChanged ()
 
bool continuousHPIChecked ()
 
int getFittingWindowSize ()
 
void newDigitizerList (QList< FIFFLIB::FiffDigPoint > pointList)
 
void loadCoilPresets (const QString &sFilePath)
 
void saveSettings ()
 
void loadSettings ()
 
void clearView ()
 
- Public Member Functions inherited from DISPLIB::AbstractView
 AbstractView (QWidget *parent=0, Qt::WindowFlags f=Qt::Widget)
 
virtual void setGuiMode (GuiMode mode)
 
virtual void setProcessingMode (ProcessingMode mode)
 

Protected Member Functions

void updateGuiMode (GuiMode mode)
 
void updateProcessingMode (ProcessingMode mode)
 
void onLoadDigitizers ()
 
void onFrequencyCellChanged (int row, int col)
 
void onAddCoil ()
 
void onRemoveCoil ()
 
QList< FIFFLIB::FiffDigPointreadDigitizersFromFile (const QString &fileName)
 
void setupCoilPresets (int iNumCoils)
 
void populatePresetGUI (const QJsonArray &presetData)
 
void populateCoilGUI ()
 
void selectCoilPreset (int iCoilPresetIndex)
 
void addCoilFreqToGUI (int iCoilFreq)
 
void addCoilErrorToGUI ()
 addCoilErrorToGUI
 
void clearCoilGUI ()
 
void updateDigitizerInfoGUI (const FIFFLIB::FiffDigPointSet &digSet)
 

Protected Attributes

Ui::HpiSettingsViewWidget * m_pUi
 
QVector< int > m_vCoilFreqs
 
QString m_sSettingsPath
 
QJsonDocument m_CoilPresets
 
- Protected Attributes inherited from DISPLIB::AbstractView
bool m_bResearchModeIsActive
 
bool m_bOfflineModeIsActive
 
QString m_sSettingsPath
 

Additional Inherited Members

- Public Types inherited from DISPLIB::AbstractView
enum  StyleMode { Default, Dark }
 
enum  GuiMode { Clinical, Research }
 
enum  ProcessingMode { RealTime, Offline }
 
typedef QSharedPointer< AbstractViewSPtr
 
typedef QSharedPointer< const AbstractViewConstSPtr
 

Detailed Description

The HpiSettingsView class provides a QWidget for the HPI controls.

The HpiSettingsView class provides a QWidget for the HPI controls.

Definition at line 84 of file hpisettingsview.h.

Inheritance diagram for DISPLIB::HpiSettingsView:
Inheritance graph

Constructor & Destructor Documentation

◆ HpiSettingsView()

HpiSettingsView::HpiSettingsView ( const QString &  sSettingsPath = "",
QWidget *  parent = 0,
Qt::WindowFlags  f = Qt::Widget 
)

Constructs a HpiSettingsView object.

Parameters
[in]pFiffInfoThe FiffInfo.
[in]parentThe parent widget.

Definition at line 73 of file hpisettingsview.cpp.

Member Function Documentation

◆ addCoilFreqToGUI()

void HpiSettingsView::addCoilFreqToGUI ( int  iCoilFreq)
protected

Adds coil frequency to gui table based on input argument.

Parameters
[in]iCoilFreq

Definition at line 524 of file hpisettingsview.cpp.

◆ allowedMeanErrorDistChanged

void DISPLIB::HpiSettingsView::allowedMeanErrorDistChanged ( double  dAllowedMeanErrorDist)
signal

Emit this signal whenever the allowed error changed.

Parameters
[in]dAllowedMeanErrorDistAllowed mean error in mm.

◆ allowedMovementChanged

void DISPLIB::HpiSettingsView::allowedMovementChanged ( double  dAllowedMovement)
signal

Emit this signal whenever the allowed head movement threshold changed.

Parameters
[in]dAllowedMeanErrorDistAllowed movement threshold.

◆ allowedRotationChanged

void DISPLIB::HpiSettingsView::allowedRotationChanged ( double  dAllowedRotation)
signal

Emit this signal whenever the allowed head rotation threshold changed.

Parameters
[in]dAllowedMeanErrorDistAllowed rotation in degree.

◆ clearCoilGUI()

void HpiSettingsView::clearCoilGUI ( )
protected

Clears GUI display tables for coil error and coil freqs and empties all rows

Definition at line 569 of file hpisettingsview.cpp.

◆ clearView()

void HpiSettingsView::clearView ( )
virtual

Clears the view

Implements DISPLIB::AbstractView.

Definition at line 586 of file hpisettingsview.cpp.

◆ coilFrequenciesChanged

void DISPLIB::HpiSettingsView::coilFrequenciesChanged ( const QVector< int > &  vCoilFreqs)
signal

Emit this signal whenever the coil frequencies changed.

Parameters
[in]vCoilFreqsThe new coil frequencies.

◆ compStatusChanged

void DISPLIB::HpiSettingsView::compStatusChanged ( bool  bChecked)
signal

Emit this signal whenever compensator checkbox changed.

Parameters
[in]bCheckedWhether the compensator check box is checked.

◆ contHpiStatusChanged

void DISPLIB::HpiSettingsView::contHpiStatusChanged ( bool  bChecked)
signal

Emit this signal whenever continous HPI checkbox changed.

Parameters
[in]bCheckedWhether the continous HPI check box is checked.

◆ continuousHPIChecked()

bool HpiSettingsView::continuousHPIChecked ( )

Returns whether continuous fitting is checked.

Returns
Whether continuous fitting is checked.

Definition at line 226 of file hpisettingsview.cpp.

◆ digitizersChanged

void DISPLIB::HpiSettingsView::digitizersChanged ( const QList< FIFFLIB::FiffDigPoint > &  lDigitzers,
const QString &  sFilePath 
)
signal

Emit this signal whenever new digitzers were loaded.

Parameters
[in]lDigitzersThe new digitzers.
[in]sFilePathThe file path to the new digitzers.

◆ doFreqOrder

void DISPLIB::HpiSettingsView::doFreqOrder ( )
signal

Emit this signal whenever the frequency ordering is supposed to be triggered.

◆ doSingleHpiFit

void DISPLIB::HpiSettingsView::doSingleHpiFit ( )
signal

Emit this signal whenever a single HPI fit is supposed to be triggered.

◆ fittingWindowSizeChanged

void DISPLIB::HpiSettingsView::fittingWindowSizeChanged ( int  iFitsPerSecond)
signal

Emit this signal when 'fits per second' control gets updated.

Parameters
[in]iFitsPerSecondHow many fits per second we should do.

◆ getAllowedMeanErrorDistChanged()

double HpiSettingsView::getAllowedMeanErrorDistChanged ( )

Get the allowed mean error distance.

Returns
The current allowed mean error distance.

Definition at line 205 of file hpisettingsview.cpp.

◆ getAllowedMovementChanged()

double HpiSettingsView::getAllowedMovementChanged ( )

Get the allowed head movement.

Returns
The current allowed head movement.

Definition at line 212 of file hpisettingsview.cpp.

◆ getAllowedRotationChanged()

double HpiSettingsView::getAllowedRotationChanged ( )

Get the allowed head rotation.

Returns
The current allowed head rotation.

Definition at line 219 of file hpisettingsview.cpp.

◆ getCompStatusChanged()

bool HpiSettingsView::getCompStatusChanged ( )

Get the Comp checked status.

Returns
The current Comp checked status.

Definition at line 198 of file hpisettingsview.cpp.

◆ getFittingWindowSize()

int HpiSettingsView::getFittingWindowSize ( )

Get number of fits per second to do when performing continuous hpi

Returns
Number of fits per second

Definition at line 233 of file hpisettingsview.cpp.

◆ getSspStatusChanged()

bool HpiSettingsView::getSspStatusChanged ( )

Get the SSP checked status.

Returns
The current SSP checked status.

Definition at line 191 of file hpisettingsview.cpp.

◆ loadCoilPresets()

void HpiSettingsView::loadCoilPresets ( const QString &  sFilePath)

Load coil presets from json file at the provided path

Parameters
[in]sFilePathPAth to json file with coil preset data

Definition at line 593 of file hpisettingsview.cpp.

◆ loadSettings()

void HpiSettingsView::loadSettings ( )
virtual

Loads and inits all important settings of this view via QSettings.

Implements DISPLIB::AbstractView.

Definition at line 269 of file hpisettingsview.cpp.

◆ newDigitizerList()

void HpiSettingsView::newDigitizerList ( QList< FIFFLIB::FiffDigPoint pointList)

Display digitizer metadata bsed on input pointList

Parameters
[in]pointListlist of digitizer points

Definition at line 460 of file hpisettingsview.cpp.

◆ onAddCoil()

void HpiSettingsView::onAddCoil ( )
protected

Add coil to frequency table widget.

Definition at line 367 of file hpisettingsview.cpp.

◆ onFrequencyCellChanged()

void HpiSettingsView::onFrequencyCellChanged ( int  row,
int  col 
)
protected

Called whenever a cell in the frequenc table widget is changed.

Parameters
[in]rowthe row of the changed cell.
[in]colthe column of the changed cell.

Definition at line 347 of file hpisettingsview.cpp.

◆ onLoadDigitizers()

void HpiSettingsView::onLoadDigitizers ( )
protected

Load digitzers from a file.

Definition at line 315 of file hpisettingsview.cpp.

◆ onRemoveCoil()

void HpiSettingsView::onRemoveCoil ( )
protected

Remove coil to frequency table widget.

Definition at line 423 of file hpisettingsview.cpp.

◆ populateCoilGUI()

void HpiSettingsView::populateCoilGUI ( )
protected

Adds coil freq and coil error entries based on m_vCoilFreqs. Does not clear existing entires.

Definition at line 514 of file hpisettingsview.cpp.

◆ populatePresetGUI()

void HpiSettingsView::populatePresetGUI ( const QJsonArray &  presetData)
protected

Populates preset dropdown gui with names and coil freqs in the input array.

Parameters
[in]presetDatajson array containing the coil preset name and freqs.

Definition at line 614 of file hpisettingsview.cpp.

◆ readDigitizersFromFile()

QList< FiffDigPoint > HpiSettingsView::readDigitizersFromFile ( const QString &  fileName)
protected

Read Polhemus data from fif file.

Definition at line 447 of file hpisettingsview.cpp.

◆ saveSettings()

void HpiSettingsView::saveSettings ( )
virtual

Saves all important settings of this view via QSettings.

Implements DISPLIB::AbstractView.

Definition at line 240 of file hpisettingsview.cpp.

◆ selectCoilPreset()

void HpiSettingsView::selectCoilPreset ( int  iCoilPresetIndex)
protected

Selects and loads coil preset at index specified by input argument.

Parameters
[in]iCoilPresetIndexselected coil preset.

Definition at line 633 of file hpisettingsview.cpp.

◆ setErrorLabels()

void HpiSettingsView::setErrorLabels ( const QVector< double > &  vError,
const double  dMeanErrorDist 
)

Updates the error related labels.

Parameters
[in]vErrorthe new error values.
[in]dMeanErrorDistthe mean error value.

Definition at line 128 of file hpisettingsview.cpp.

◆ setGoFLabels()

void HpiSettingsView::setGoFLabels ( const Eigen::VectorXd &  vGoF,
const double  dMeanGof 
)

Updates the gof related labels.

Parameters
[in]vGoFthe new gof values.
[in]dMeanGofthe mean gof value.

Definition at line 155 of file hpisettingsview.cpp.

◆ setMovementResults()

void HpiSettingsView::setMovementResults ( double  dMovement,
double  dRotation 
)

Updates the movement refered to last reference head position.

Parameters
[in]dMovementthe movement refered to last fit.
[in]dRotationthe rotation refered to last fit.

Definition at line 174 of file hpisettingsview.cpp.

◆ setupCoilPresets()

void HpiSettingsView::setupCoilPresets ( int  iNumCoils)
protected

Sets up coil presets for the number of coils specified by the input argument.

Parameters
[in]iNumCoilsnumber of hpi coils.

Definition at line 604 of file hpisettingsview.cpp.

◆ sspStatusChanged

void DISPLIB::HpiSettingsView::sspStatusChanged ( bool  bChecked)
signal

Emit this signal whenever SSP checkbox changed.

Parameters
[in]bCheckedWhether the SSP check box is checked.

◆ updateDigitizerInfoGUI()

void HpiSettingsView::updateDigitizerInfoGUI ( const FIFFLIB::FiffDigPointSet digSet)
protected

UpdateGUI information with data from input digitizer set.

Parameters
[in]digSetDigigtizer set from which data metadata will be displayed.

Definition at line 470 of file hpisettingsview.cpp.

◆ updateGuiMode()

void HpiSettingsView::updateGuiMode ( GuiMode  mode)
protectedvirtual

Update the views GUI based on the set GuiMode (Clinical=0, Research=1).

Parameters
[in]modeThe new mode (Clinical=0, Research=1).

Implements DISPLIB::AbstractView.

Definition at line 291 of file hpisettingsview.cpp.

◆ updateProcessingMode()

void HpiSettingsView::updateProcessingMode ( ProcessingMode  mode)
protectedvirtual

Update the views GUI based on the set ProcessingMode (RealTime=0, Offline=1).

Parameters
[in]modeThe new mode (RealTime=0, Offline=1).

Implements DISPLIB::AbstractView.

Definition at line 303 of file hpisettingsview.cpp.

Member Data Documentation

◆ m_CoilPresets

QJsonDocument DISPLIB::HpiSettingsView::m_CoilPresets
protected

Loaded coil frequency presets

Definition at line 338 of file hpisettingsview.h.

◆ m_pUi

Ui::HpiSettingsViewWidget* DISPLIB::HpiSettingsView::m_pUi
protected

The HPI dialog.

Definition at line 332 of file hpisettingsview.h.

◆ m_sSettingsPath

QString DISPLIB::HpiSettingsView::m_sSettingsPath
protected

The settings path to store the GUI settings to.

Definition at line 336 of file hpisettingsview.h.

◆ m_vCoilFreqs

QVector<int> DISPLIB::HpiSettingsView::m_vCoilFreqs
protected

Vector contains the HPI coil frequencies.

Definition at line 334 of file hpisettingsview.h.


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