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