OpenWalnut  1.5.0dev
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 #include <memory>
30 #include <string>
31 
32 
33 #include "../common/math/linearAlgebra/WPosition.h"
34 #include "WEEGPositionsLibrary.h"
35 #include "exceptions/WDHException.h"
36 #include "io/WPagerEEG.h"
37 
38 
39 
40 /**
41  * Class which contains information about one channel of an EEG recording, read
42  * from a WPagerEEG.
43  * \ingroup dataHandler
44  */
45 class WEEGChannelInfo // NOLINT
46 {
47 public:
48  /**
49  * Constructor
50  *
51  * \param channelID number of this channel
52  * \param pager pager class which contains the data, read from a
53  * file on demand
54  * \param positionsLibrary class which contains the positions of the
55  * electrodes
56  */
57  WEEGChannelInfo( std::size_t channelID,
58  std::shared_ptr< WPagerEEG > pager,
59  std::shared_ptr< WEEGPositionsLibrary > positionsLibrary );
60 
61  /**
62  * Get the unit used by the recording of the channel.
63  *
64  * \return unit as string
65  */
66  std::string getUnit() const;
67 
68  /**
69  * Get the label of the channel.
70  *
71  * \return label as string
72  */
73  std::string getLabel() const;
74 
75  /**
76  * Get the position of the electrode.
77  *
78  * \return position
79  */
80  WPosition getPosition() const;
81 
82 protected:
83 private:
84  std::string m_unit; //!< unit used by the recording of the channel
85  std::string m_label; //!< label of the channel
86  bool m_hasPosition; //!< whether there is a valid position for this electrode
87  WPosition m_position; //!< position of the electrode
88 };
89 
90 #endif // WEEGCHANNELINFO_H
Class which contains information about one channel of an EEG recording, read from a WPagerEEG.
std::string m_label
label of the channel
WPosition m_position
position of the electrode
WPosition getPosition() const
Get the position of the electrode.
std::string m_unit
unit used by the recording of the channel
std::string getLabel() const
Get the label of the channel.
bool m_hasPosition
whether there is a valid position for this electrode
WEEGChannelInfo(std::size_t channelID, std::shared_ptr< WPagerEEG > pager, std::shared_ptr< WEEGPositionsLibrary > positionsLibrary)
Constructor.
std::string getUnit() const
Get the unit used by the recording of the channel.
This only is a 3d double vector.