1
//---------------------------------------------------------------------------
3
// Project: OpenWalnut ( http://www.openwalnut.org )
5
// Copyright 2009 OpenWalnut Community, BSV@Uni-Leipzig and CNCF@MPI-CBS
6
// For more information see http://www.openwalnut.org/copying
8
// This file is part of OpenWalnut.
10
// OpenWalnut is free software: you can redistribute it and/or modify
11
// it under the terms of the GNU Lesser General Public License as published by
12
// the Free Software Foundation, either version 3 of the License, or
13
// (at your option) any later version.
15
// OpenWalnut is distributed in the hope that it will be useful,
16
// but WITHOUT ANY WARRANTY; without even the implied warranty of
17
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18
// GNU Lesser General Public License for more details.
20
// You should have received a copy of the GNU Lesser General Public License
21
// along with OpenWalnut. If not, see <http://www.gnu.org/licenses/>.
23
//---------------------------------------------------------------------------
32
#include <boost/shared_ptr.hpp>
35
#include <osg/ref_ptr>
37
#include "core/common/exceptions/WOutOfBounds.h"
38
#include "core/dataHandler/WEEG2.h"
39
#include "core/graphicsEngine/WGEGroupNode.h"
43
* A special time position in an EEG recording with corresponding data.
51
* \param time time position in seconds
52
* \param eeg pointer to the loaded EEG dataset
53
* \param segmentID number of the segment
54
* \param parentNode node where m_node is inserted and removed from
56
WEEGEvent( double time,
57
boost::shared_ptr< WEEG2 > eeg,
58
std::size_t segmentID,
59
osg::ref_ptr< WGEGroupNode > parentNode ) throw( WOutOfBounds );
62
* Constructor for an empty event
67
* Destructor, removing m_node from m_parentNode
72
* Get the time position
74
* \return time position in seconds
76
double getTime() const;
79
* Get the value of each channel at the time position
81
* \return values as reference to a vector
83
const std::vector< double >& getValues() const;
87
const double m_time; //!< time position in seconds
89
std::vector< double > m_values; //!< the value of each channel at the given time position
91
osg::ref_ptr< osg::Node > m_node; //!< OSG node representing the event
93
osg::ref_ptr< WGEGroupNode > m_parentNode; //!< parent node, where m_node is inserted and removed from