v2.0.0
Loading...
Searching...
No Matches
DISPLIB::ButterflyView Class Reference

QRhi-accelerated butterfly viewer overlaying every channel of one or more averaged conditions. More...

#include <butterflyview.h>

Public Types

typedef QSharedPointer< ButterflyView > SPtr
typedef QSharedPointer< const ButterflyView > ConstSPtr

Public Member Functions

 ButterflyView (const QString &sSettingsPath="", QWidget *parent=0, Qt::WindowFlags f=Qt::Widget)
 ~ButterflyView ()
void updateViewport ()
void setEvokedSetModel (QSharedPointer< EvokedSetModel > model)
QSharedPointer< EvokedSetModel > getEvokedSetModel ()
void dataUpdate ()
QMap< QString, bool > getModalityMap ()
void setModalityMap (const QMap< QString, bool > &modalityMap)
void setScaleMap (const QMap< qint32, float > &scaleMap)
void setSelectedChannels (const QList< int > &selectedChannels)
void updateView ()
void setBackgroundColor (const QColor &backgroundColor)
const QColor & getBackgroundColor ()
void takeScreenshot (const QString &fileName)
QSharedPointer< QMap< QString, QColor > > getAverageColor () const
QSharedPointer< QMap< QString, bool > > getAverageActivation () const
void setAverageColor (const QSharedPointer< QMap< QString, QColor > > qMapAverageColor)
void setSingleAverageColor (const QColor &avgColor)
void setAverageActivation (const QSharedPointer< QMap< QString, bool > > qMapAverageActivation)
void setChannelInfoModel (QSharedPointer< ChannelInfoModel > &pChannelInfoModel)
void showSelectedChannelsOnly (const QStringList &selectedChannels)
void showSelectedChannels (const QList< int > selectedChannelsIndexes)
void showAllChannels ()
void saveSettings ()
void loadSettings ()
void clearView ()

Protected Member Functions

virtual void paintEvent (QPaintEvent *event)
void createPlotPath (qint32 row, QPainter &painter) const

Protected Attributes

bool m_bShowMAG
bool m_bShowGRAD
bool m_bShowEEG
bool m_bShowEOG
bool m_bShowMISC
bool m_bIsInit
QString m_sSettingsPath
QColor m_colCurrentBackgroundColor
QList< int > m_lSelectedChannels
QMap< QString, bool > m_modalityMap
QMap< qint32, float > m_scaleMap
QSharedPointer< EvokedSetModel > m_pEvokedSetModel
QSharedPointer< ChannelInfoModel > m_pChannelInfoModel
QSharedPointer< QMap< QString, bool > > m_qMapAverageActivation
QSharedPointer< QMap< QString, QColor > > m_qMapAverageColor

Detailed Description

QRhi-accelerated butterfly viewer overlaying every channel of one or more averaged conditions.

Renders all visible traces in a single shader pass for smooth zoom / pan; visibility per modality and per condition is driven by ModalitySelectionView and AverageSelectionView. Used as the main evoked viewer in MNE-Scan.

Definition at line 75 of file butterflyview.h.

Inheritance diagram for DISPLIB::ButterflyView:
Inheritance graph

Member Typedef Documentation

◆ ConstSPtr

typedef QSharedPointer<const ButterflyView> DISPLIB::ButterflyView::ConstSPtr

Const shared pointer type for ButterflyView.

Definition at line 81 of file butterflyview.h.

◆ SPtr

Shared pointer type for ButterflyView.

Definition at line 80 of file butterflyview.h.

Constructor & Destructor Documentation

◆ ButterflyView()

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

The constructor.

Parameters
[in]sSettingsPathQSettings key prefix used to persist view settings (default empty).
[in]parentParent widget (default 0).
[in]fWindow flags passed to the widget (default Qt::Widget).

Definition at line 48 of file butterflyview.cpp.

◆ ~ButterflyView()

ButterflyView::~ButterflyView ( )

Destroys the ButterflyView.

Definition at line 83 of file butterflyview.cpp.

Member Function Documentation

◆ clearView()

void ButterflyView::clearView ( )

Clears the view

Definition at line 590 of file butterflyview.cpp.

◆ createPlotPath()

void ButterflyView::createPlotPath ( qint32 row,
QPainter & painter ) const
protected

createPlotPath creates the QPointer path for the data plot.

Parameters
[in]rowModel row of the channel to plot.
[in,out]painterPainter the channel path is drawn with.

Definition at line 474 of file butterflyview.cpp.

◆ dataUpdate()

void ButterflyView::dataUpdate ( )

Perform a data update.

Definition at line 107 of file butterflyview.cpp.

◆ getAverageActivation()

QSharedPointer< QMap< QString, bool > > ButterflyView::getAverageActivation ( ) const

Get the current average activations

Returns
Pointer to the current average activations.

Definition at line 206 of file butterflyview.cpp.

◆ getAverageColor()

QSharedPointer< QMap< QString, QColor > > ButterflyView::getAverageColor ( ) const

Get the current average colors

Returns
Pointer to the current average colors.

Definition at line 199 of file butterflyview.cpp.

◆ getBackgroundColor()

const QColor & ButterflyView::getBackgroundColor ( )

Returns the background color.

Returns
The current background color.

Definition at line 166 of file butterflyview.cpp.

◆ getEvokedSetModel()

QSharedPointer< EvokedSetModel > ButterflyView::getEvokedSetModel ( )

Returns the currently set EvokedSetModel

Returns
the currently set EvokedSetModel.

Definition at line 583 of file butterflyview.cpp.

◆ getModalityMap()

QMap< QString, bool > ButterflyView::getModalityMap ( )

Get the activation of the already created modality check boxes.

Returns
The current modality map.

Definition at line 120 of file butterflyview.cpp.

◆ loadSettings()

void ButterflyView::loadSettings ( )

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

Definition at line 293 of file butterflyview.cpp.

◆ paintEvent()

void ButterflyView::paintEvent ( QPaintEvent * event)
protectedvirtual

Is called to paint the incoming real-time data block. Function is painting the real-time butterfly plot

Parameters
[in]eventpointer to PaintEvent -> not used.

Definition at line 305 of file butterflyview.cpp.

◆ saveSettings()

void ButterflyView::saveSettings ( )

Saves all important settings of this view via QSettings.

Definition at line 281 of file butterflyview.cpp.

◆ setAverageActivation()

void ButterflyView::setAverageActivation ( const QSharedPointer< QMap< QString, bool > > qMapAverageActivation)

Set the average activations

Parameters
[in]qMapAverageActivationPointer to the new average activations.

Definition at line 229 of file butterflyview.cpp.

◆ setAverageColor()

void ButterflyView::setAverageColor ( const QSharedPointer< QMap< QString, QColor > > qMapAverageColor)

Set the average colors

Parameters
[in]qMapAverageColorPointer to the new average colors.

Definition at line 213 of file butterflyview.cpp.

◆ setBackgroundColor()

void ButterflyView::setBackgroundColor ( const QColor & backgroundColor)

Set the background color.

Parameters
[in]backgroundColorThe new background color.

Definition at line 158 of file butterflyview.cpp.

◆ setChannelInfoModel()

void ButterflyView::setChannelInfoModel ( QSharedPointer< ChannelInfoModel > & pChannelInfoModel)

Set the channel info model.

Parameters
[in]pChannelInfoModelThe new channel info model.

Definition at line 237 of file butterflyview.cpp.

◆ setEvokedSetModel()

void ButterflyView::setEvokedSetModel ( QSharedPointer< EvokedSetModel > model)

Set the evoked set model.

Parameters
[in]modelThe new evoked set model.

Definition at line 97 of file butterflyview.cpp.

◆ setModalityMap()

void ButterflyView::setModalityMap ( const QMap< QString, bool > & modalityMap)

Set the modality checkboxes.

Parameters
[in]modalityMapThe modality map.

Definition at line 127 of file butterflyview.cpp.

◆ setScaleMap()

void ButterflyView::setScaleMap ( const QMap< qint32, float > & scaleMap)

Sets the scale map to scaleMap.

Parameters
[in]scaleMapmap with all channel types and their current scaling value.

Definition at line 135 of file butterflyview.cpp.

◆ setSelectedChannels()

void ButterflyView::setSelectedChannels ( const QList< int > & selectedChannels)

Set the selected channels.

Parameters
[in]selectedChannelsThe new selected channels.

Definition at line 143 of file butterflyview.cpp.

◆ setSingleAverageColor()

void ButterflyView::setSingleAverageColor ( const QColor & avgColor)

Sets the color used to draw the average to avgColor

Parameters
[in]avgColorColor of averaged signal.

Definition at line 221 of file butterflyview.cpp.

◆ showAllChannels()

void ButterflyView::showAllChannels ( )

Shows all channels in view

Definition at line 268 of file butterflyview.cpp.

◆ showSelectedChannels()

void ButterflyView::showSelectedChannels ( const QList< int > selectedChannelsIndexes)

Shows selected channels based on a list of selected channel indices

Parameters
[in]selectedChannelsIndexeslist of indices of channels channels to be displayed.

Definition at line 261 of file butterflyview.cpp.

◆ showSelectedChannelsOnly()

void ButterflyView::showSelectedChannelsOnly ( const QStringList & selectedChannels)

Only shows the channels defined in the QStringList selectedChannels

Parameters
[in]selectedChannelslist of all channel names which are currently selected in the selection manager.

Definition at line 244 of file butterflyview.cpp.

◆ takeScreenshot()

void ButterflyView::takeScreenshot ( const QString & fileName)

Renders a screenshot of the view and saves it to the passed path. SVG and PNG supported.

Parameters
[in]fileNameThe file name and path where to store the screenshot.

Definition at line 173 of file butterflyview.cpp.

◆ updateView()

void ButterflyView::updateView ( )

Perform a view update from outside of this class.

Definition at line 151 of file butterflyview.cpp.

◆ updateViewport()

void ButterflyView::updateViewport ( )

Update the viewport. This, e.g., necessary if this widget was set to a QDockWidget which changes its floating state.

Definition at line 90 of file butterflyview.cpp.

Member Data Documentation

◆ m_bIsInit

bool DISPLIB::ButterflyView::m_bIsInit
protected

Whether this class has been initialized.

Definition at line 305 of file butterflyview.h.

◆ m_bShowEEG

bool DISPLIB::ButterflyView::m_bShowEEG
protected

Show EEG channels.

Definition at line 302 of file butterflyview.h.

◆ m_bShowEOG

bool DISPLIB::ButterflyView::m_bShowEOG
protected

Show EEG channels.

Definition at line 303 of file butterflyview.h.

◆ m_bShowGRAD

bool DISPLIB::ButterflyView::m_bShowGRAD
protected

Show Gradiometers channels.

Definition at line 301 of file butterflyview.h.

◆ m_bShowMAG

bool DISPLIB::ButterflyView::m_bShowMAG
protected

Show Magnetometers channels.

Definition at line 300 of file butterflyview.h.

◆ m_bShowMISC

bool DISPLIB::ButterflyView::m_bShowMISC
protected

Show Miscellaneous channels.

Definition at line 304 of file butterflyview.h.

◆ m_colCurrentBackgroundColor

QColor DISPLIB::ButterflyView::m_colCurrentBackgroundColor
protected

The current background color.

Definition at line 309 of file butterflyview.h.

◆ m_lSelectedChannels

QList<int> DISPLIB::ButterflyView::m_lSelectedChannels
protected

The currently selected channels.

Definition at line 311 of file butterflyview.h.

◆ m_modalityMap

QMap<QString, bool> DISPLIB::ButterflyView::m_modalityMap
protected

Map of different modalities.

Definition at line 313 of file butterflyview.h.

◆ m_pChannelInfoModel

QSharedPointer<ChannelInfoModel> DISPLIB::ButterflyView::m_pChannelInfoModel
protected

The channel info model.

Definition at line 317 of file butterflyview.h.

◆ m_pEvokedSetModel

QSharedPointer<EvokedSetModel> DISPLIB::ButterflyView::m_pEvokedSetModel
protected

The evoked model.

Definition at line 316 of file butterflyview.h.

◆ m_qMapAverageActivation

QSharedPointer<QMap<QString, bool> > DISPLIB::ButterflyView::m_qMapAverageActivation
protected

Average activation status.

Definition at line 319 of file butterflyview.h.

◆ m_qMapAverageColor

QSharedPointer<QMap<QString, QColor> > DISPLIB::ButterflyView::m_qMapAverageColor
protected

Average colors.

Definition at line 320 of file butterflyview.h.

◆ m_scaleMap

QMap<qint32, float> DISPLIB::ButterflyView::m_scaleMap
protected

Map with all channel types and their current scaling value.

Definition at line 314 of file butterflyview.h.

◆ m_sSettingsPath

QString DISPLIB::ButterflyView::m_sSettingsPath
protected

The settings path to store the GUI settings to.

Definition at line 307 of file butterflyview.h.


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