OpenWalnut  1.4.0
WEEG2.h
00001 //---------------------------------------------------------------------------
00002 //
00003 // Project: OpenWalnut ( http://www.openwalnut.org )
00004 //
00005 // Copyright 2009 OpenWalnut Community, BSV@Uni-Leipzig and CNCF@MPI-CBS
00006 // For more information see http://www.openwalnut.org/copying
00007 //
00008 // This file is part of OpenWalnut.
00009 //
00010 // OpenWalnut is free software: you can redistribute it and/or modify
00011 // it under the terms of the GNU Lesser General Public License as published by
00012 // the Free Software Foundation, either version 3 of the License, or
00013 // (at your option) any later version.
00014 //
00015 // OpenWalnut is distributed in the hope that it will be useful,
00016 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 // GNU Lesser General Public License for more details.
00019 //
00020 // You should have received a copy of the GNU Lesser General Public License
00021 // along with OpenWalnut. If not, see <http://www.gnu.org/licenses/>.
00022 //
00023 //---------------------------------------------------------------------------
00024 
00025 #ifndef WEEG2_H
00026 #define WEEG2_H
00027 
00028 #include <cstddef>
00029 
00030 #include <string>
00031 #include <vector>
00032 
00033 #include <boost/shared_ptr.hpp>
00034 
00035 #include "io/WPagerEEG.h"
00036 #include "WEEGChannelInfo.h"
00037 #include "WEEGPositionsLibrary.h"
00038 #include "WEEG2Segment.h"
00039 #include "WRecording.h"
00040 
00041 
00042 
00043 /**
00044  * Class which contains EEG recording data, read from a WPagerEEG.
00045  * \ingroup dataHandler
00046  */
00047 class WEEG2 : public WRecording // NOLINT
00048 {
00049 public:
00050     /**
00051      * Constructor
00052      *
00053      * \param pager pager class which contains the data, read from a file on
00054      *              demand
00055      * \param positionsLibrary class which contains the positions of the
00056      *                         electrodes
00057      */
00058     WEEG2( boost::shared_ptr< WPagerEEG > pager, boost::shared_ptr< WEEGPositionsLibrary > positionsLibrary );
00059 
00060     /**
00061      * Constructor creating a quite unusable instance. Useful for prototype
00062      * mechanism.
00063      */
00064     WEEG2();
00065 
00066     /**
00067      * Get the number of segments this EEG consists of.
00068      *
00069      * \return number of segments
00070      */
00071     std::size_t getNumberOfSegments() const;
00072 
00073     /**
00074      * Get the number of channels this EEG has.
00075      *
00076      * \return number of channels
00077      */
00078     std::size_t getNumberOfChannels() const;
00079 
00080     /**
00081      * Get the sampling rate used by the recording.
00082      *
00083      * \return sampling rate
00084      */
00085     double getSamplingRate() const;
00086 
00087     /**
00088      * Get one segment.
00089      *
00090      * \param segmentID number of segment
00091      * \return segment
00092      */
00093     boost::shared_ptr< WEEG2Segment > getSegment( std::size_t segmentID ) const;
00094 
00095     /**
00096      * Get one channel info object.
00097      *
00098      * \param channelID number of channel
00099      * \return object containing information about the channel
00100      */
00101     boost::shared_ptr< WEEGChannelInfo > getChannelInfo( std::size_t channelID ) const;
00102 
00103     /**
00104      * Return the name of the dataset
00105      *
00106      * \return the name
00107      */
00108     virtual const std::string getName() const;
00109 
00110     /**
00111      * Description of dataset.
00112      *
00113      * \return description of dataset
00114      */
00115     virtual const std::string getDescription() const;
00116 
00117     /**
00118      * Get dataset prototype.
00119      *
00120      * \return the prototype
00121      */
00122     static boost::shared_ptr< WPrototyped > getPrototype();
00123 
00124 protected:
00125     /**
00126      * Prototype needed to allow the EEG dataset to be transferred.
00127      */
00128     static boost::shared_ptr< WPrototyped > m_prototype;
00129 
00130 private:
00131     double m_samplingRate; //!< sampling rate used by the recording
00132 
00133     std::vector< boost::shared_ptr< WEEG2Segment > > m_segments; //!< list of all segments this EEG consists of
00134 
00135     std::vector< boost::shared_ptr< WEEGChannelInfo > > m_channelInfos; //!< list of the information about all channel infos this EEG has
00136 };
00137 
00138 #endif  // WEEG2_H