OpenWalnut  1.5.0dev
WEEG2.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 WEEG2_H
26 #define WEEG2_H
27 
28 #include <cstddef>
29 #include <memory>
30 #include <string>
31 #include <vector>
32 
33 
34 #include "WEEG2Segment.h"
35 #include "WEEGChannelInfo.h"
36 #include "WEEGPositionsLibrary.h"
37 #include "WRecording.h"
38 #include "io/WPagerEEG.h"
39 
40 
41 
42 /**
43  * Class which contains EEG recording data, read from a WPagerEEG.
44  * \ingroup dataHandler
45  */
46 class WEEG2 : public WRecording // NOLINT
47 {
48 public:
49  /**
50  * Constructor
51  *
52  * \param pager pager class which contains the data, read from a file on
53  * demand
54  * \param positionsLibrary class which contains the positions of the
55  * electrodes
56  */
57  WEEG2( std::shared_ptr< WPagerEEG > pager, std::shared_ptr< WEEGPositionsLibrary > positionsLibrary );
58 
59  /**
60  * Constructor creating a quite unusable instance. Useful for prototype
61  * mechanism.
62  */
63  WEEG2();
64 
65  /**
66  * Get the number of segments this EEG consists of.
67  *
68  * \return number of segments
69  */
70  std::size_t getNumberOfSegments() const;
71 
72  /**
73  * Get the number of channels this EEG has.
74  *
75  * \return number of channels
76  */
77  std::size_t getNumberOfChannels() const;
78 
79  /**
80  * Get the sampling rate used by the recording.
81  *
82  * \return sampling rate
83  */
84  double getSamplingRate() const;
85 
86  /**
87  * Get one segment.
88  *
89  * \param segmentID number of segment
90  * \return segment
91  */
92  std::shared_ptr< WEEG2Segment > getSegment( std::size_t segmentID ) const;
93 
94  /**
95  * Get one channel info object.
96  *
97  * \param channelID number of channel
98  * \return object containing information about the channel
99  */
100  std::shared_ptr< WEEGChannelInfo > getChannelInfo( std::size_t channelID ) const;
101 
102  /**
103  * Return the name of the dataset
104  *
105  * \return the name
106  */
107  virtual const std::string getName() const;
108 
109  /**
110  * Description of dataset.
111  *
112  * \return description of dataset
113  */
114  virtual const std::string getDescription() const;
115 
116  /**
117  * Get dataset prototype.
118  *
119  * \return the prototype
120  */
121  static std::shared_ptr< WPrototyped > getPrototype();
122 
123 protected:
124  /**
125  * Prototype needed to allow the EEG dataset to be transferred.
126  */
127  static std::shared_ptr< WPrototyped > m_prototype;
128 
129 private:
130  double m_samplingRate; //!< sampling rate used by the recording
131 
132  std::vector< std::shared_ptr< WEEG2Segment > > m_segments; //!< list of all segments this EEG consists of
133 
134  std::vector< std::shared_ptr< WEEGChannelInfo > > m_channelInfos; //!< list of the information about all channel infos this EEG has
135 };
136 
137 #endif // WEEG2_H
Class which contains EEG recording data, read from a WPagerEEG.
Definition: WEEG2.h:47
static std::shared_ptr< WPrototyped > m_prototype
Prototype needed to allow the EEG dataset to be transferred.
Definition: WEEG2.h:127
std::size_t getNumberOfChannels() const
Get the number of channels this EEG has.
Definition: WEEG2.cpp:101
std::size_t getNumberOfSegments() const
Get the number of segments this EEG consists of.
Definition: WEEG2.cpp:96
double getSamplingRate() const
Get the sampling rate used by the recording.
Definition: WEEG2.cpp:106
static std::shared_ptr< WPrototyped > getPrototype()
Get dataset prototype.
Definition: WEEG2.cpp:145
std::vector< std::shared_ptr< WEEGChannelInfo > > m_channelInfos
list of the information about all channel infos this EEG has
Definition: WEEG2.h:134
WEEG2()
Constructor creating a quite unusable instance.
Definition: WEEG2.cpp:92
std::vector< std::shared_ptr< WEEG2Segment > > m_segments
list of all segments this EEG consists of
Definition: WEEG2.h:132
std::shared_ptr< WEEG2Segment > getSegment(std::size_t segmentID) const
Get one segment.
Definition: WEEG2.cpp:111
std::shared_ptr< WEEGChannelInfo > getChannelInfo(std::size_t channelID) const
Get one channel info object.
Definition: WEEG2.cpp:123
virtual const std::string getName() const
Return the name of the dataset.
Definition: WEEG2.cpp:135
virtual const std::string getDescription() const
Description of dataset.
Definition: WEEG2.cpp:140
double m_samplingRate
sampling rate used by the recording
Definition: WEEG2.h:130
Base class for all recorded data and results with events and sensor positions.
Definition: WRecording.h:41