OpenWalnut  1.4.0
WEEGChannelInfo.h
1 //---------------------------------------------------------------------------
2 //
3 // Project: OpenWalnut ( http://www.openwalnut.org )
4 //
5 // Copyright 2009 OpenWalnut Community, BSV@Uni-Leipzig and CNCF@MPI-CBS
6 // For more information see http://www.openwalnut.org/copying
7 //
8 // This file is part of OpenWalnut.
9 //
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.
14 //
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.
19 //
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/>.
22 //
23 //---------------------------------------------------------------------------
24 
25 #ifndef WEEGCHANNELINFO_H
26 #define WEEGCHANNELINFO_H
27 
28 #include <cstddef>
29 
30 #include <string>
31 
32 #ifndef Q_MOC_RUN
33 #include <boost/shared_ptr.hpp>
34 #endif
35 
36 #include "../common/math/linearAlgebra/WPosition.h"
37 #include "WEEGPositionsLibrary.h"
38 #include "exceptions/WDHException.h"
39 #include "io/WPagerEEG.h"
40 
41 
42 
43 /**
44  * Class which contains information about one channel of an EEG recording, read
45  * from a WPagerEEG.
46  * \ingroup dataHandler
47  */
48 class WEEGChannelInfo // NOLINT
49 {
50 public:
51  /**
52  * Constructor
53  *
54  * \param channelID number of this channel
55  * \param pager pager class which contains the data, read from a
56  * file on demand
57  * \param positionsLibrary class which contains the positions of the
58  * electrodes
59  */
60  WEEGChannelInfo( std::size_t channelID,
61  boost::shared_ptr< WPagerEEG > pager,
62  boost::shared_ptr< WEEGPositionsLibrary > positionsLibrary );
63 
64  /**
65  * Get the unit used by the recording of the channel.
66  *
67  * \return unit as string
68  */
69  std::string getUnit() const;
70 
71  /**
72  * Get the label of the channel.
73  *
74  * \return label as string
75  */
76  std::string getLabel() const;
77 
78  /**
79  * Get the position of the electrode.
80  *
81  * \return position
82  */
83  WPosition getPosition() const throw( WDHException );
84 
85 protected:
86 private:
87  std::string m_unit; //!< unit used by the recording of the channel
88  std::string m_label; //!< label of the channel
89  bool m_hasPosition; //!< whether there is a valid position for this electrode
90  WPosition m_position; //!< position of the electrode
91 };
92 
93 #endif // WEEGCHANNELINFO_H
std::string getLabel() const
Get the label of the channel.
General purpose exception and therefore base class for all DataHandler related exceptions.
Definition: WDHException.h:39
std::string m_unit
unit used by the recording of the channel
This only is a 3d double vector.
WEEGChannelInfo(std::size_t channelID, boost::shared_ptr< WPagerEEG > pager, boost::shared_ptr< WEEGPositionsLibrary > positionsLibrary)
Constructor.
std::string m_label
label of the channel
bool m_hasPosition
whether there is a valid position for this electrode
std::string getUnit() const
Get the unit used by the recording of the channel.
WPosition m_position
position of the electrode
Class which contains information about one channel of an EEG recording, read from a WPagerEEG...
WPosition getPosition() const
Get the position of the electrode.