25 #ifndef WEEGVIEWHANDLER_H
26 #define WEEGVIEWHANDLER_H
31 #include <osg/ref_ptr>
32 #include <osgGA/GUIActionAdapter>
33 #include <osgGA/GUIEventAdapter>
34 #include <osgGA/GUIEventHandler>
36 #include "WEEGEvent.h"
37 #include "core/common/WFlag.h"
38 #include "core/common/WPropertyTypes.h"
39 #include "core/dataHandler/WDataSetDipoles.h"
40 #include "core/dataHandler/WEEG2.h"
41 #include "core/graphicsEngine/WGEGroupNode.h"
82 WPropDouble timeRange,
86 WPropDouble ySensitivity,
87 WPropDouble colorSensitivity,
88 std::shared_ptr<
WFlag< std::shared_ptr< WEEGEvent > > > event,
89 osg::ref_ptr< WGEGroupNode > eventParentNode,
90 std::shared_ptr< WEEG2 > eeg,
91 std::size_t segmentID,
92 WPropBool snapToDipole,
93 WPropBool proofOfConcept,
94 std::shared_ptr< WDataSetDipoles > dipoles );
102 virtual bool handle(
const osgGA::GUIEventAdapter& ea, osgGA::GUIActionAdapter& );
151 std::shared_ptr< WFlag< std::shared_ptr< WEEGEvent > > >
m_event;
GUI event handler class used for the 2D EEG view.
bool markEvent(float x)
Update the event position according to the clicked position.
std::size_t m_segmentID
number of the segment
WPropDouble m_colorSensitivity
The sensitivity of the color map as property.
WPropInt m_graphWidth
the width of the graph in pixel as property
float m_oldY
previous mouse y position
WPropDouble m_timePos
the time position in seconds where to start the graph at the left edge as property
WPropDouble m_ySpacing
the distance between two curves of the graph in pixel as property
WPropDouble m_timeRange
the width of the graph in seconds as property
WPropDouble m_yPos
the y position in pixel at the lower edge as property
std::shared_ptr< WDataSetDipoles > m_dipoles
Pointer to the loaded dipoles dataset.
WEEGViewHandler(WPropInt labelsWidth, WPropDouble timePos, WPropDouble timeRange, WPropInt graphWidth, WPropDouble yPos, WPropDouble ySpacing, WPropDouble ySensitivity, WPropDouble colorSensitivity, std::shared_ptr< WFlag< std::shared_ptr< WEEGEvent > > > event, osg::ref_ptr< WGEGroupNode > eventParentNode, std::shared_ptr< WEEG2 > eeg, std::size_t segmentID, WPropBool snapToDipole, WPropBool proofOfConcept, std::shared_ptr< WDataSetDipoles > dipoles)
Constructor.
WPropInt m_labelsWidth
the width of the label display in pixel as property
WPropDouble m_ySensitivity
the sensitivity of the graph in microvolt per pixel as property
osg::ref_ptr< WGEGroupNode > m_eventParentNode
parent node, where an marked event position is inserted and removed from
float m_oldX
previous mouse x position
std::shared_ptr< WFlag< std::shared_ptr< WEEGEvent > > > m_event
event marking a special time position as WFlag
virtual bool handle(const osgGA::GUIEventAdapter &ea, osgGA::GUIActionAdapter &)
Handle events.
WPropBool m_proofOfConcept
Property determining whether we only show the proof of concept or the real dipoles.
std::shared_ptr< WEEG2 > m_eeg
pointer to the loaded EEG dataset
WPropBool m_snapToDipole
Property determining whether the selected time position should be snapped to an active dipole.
Class to have a simple notification/condition system for simple flags.