32 #include "../common/exceptions/WOutOfBounds.h" 
   34 #include "WEEG2Segment.h" 
   35 #include "WEEGChannelInfo.h" 
   36 #include "WEEGPositionsLibrary.h" 
   37 #include "exceptions/WDHException.h" 
   38 #include "io/WPagerEEG.h" 
   43 WEEG2::WEEG2( std::shared_ptr< WPagerEEG > pager, std::shared_ptr< WEEGPositionsLibrary > positionsLibrary )
 
   47         throw WDHException( std::string( 
"Couldn't construct new EEG: pager invalid" ) );
 
   50     if( !positionsLibrary )
 
   52         throw WDHException( std::string( 
"Couldn't construct new EEG: positions library invalid" ) );
 
   55     std::size_t nbSegments = pager->getNumberOfSegments();
 
   58         throw WDHException( std::string( 
"Couldn't construct new EEG: invalid number of segments" ) );
 
   61     std::size_t nbChannels = pager->getNumberOfChannels();
 
   64         throw WDHException( std::string( 
"Couldn't construct new EEG: invalid number of channels" ) );
 
   70         throw WDHException( std::string( 
"Couldn't construct new EEG: invalid sampling rate" ) );
 
   76     for( std::size_t segmentID = 0; segmentID < nbSegments; ++segmentID )
 
   82     for( std::size_t channelID = 0; channelID < nbChannels; ++channelID )
 
  115         std::ostringstream stream;
 
  116         stream << 
"The EEG has no segment number " << segmentID;
 
  127         std::ostringstream stream;
 
  128         stream << 
"The EEG has no channel number " << channelID;
 
  142     return "Contains EEG data";
 
General purpose exception and therefore base class for all DataHandler related exceptions.
 
void setFilename(const std::string filename)
Set the name of the file that this data set stems from.
 
std::shared_ptr< WProperties > m_infoProperties
The property object for the dataset containing only props whose purpose is "PV_PURPOSE_INFORMNATION".
 
Class which contains one segment of an EEG recording, read from a WPagerEEG.
 
static std::shared_ptr< WPrototyped > m_prototype
Prototype needed to allow the EEG dataset to be transferred.
 
std::size_t getNumberOfChannels() const
Get the number of channels this EEG has.
 
std::size_t getNumberOfSegments() const
Get the number of segments this EEG consists of.
 
double getSamplingRate() const
Get the sampling rate used by the recording.
 
static std::shared_ptr< WPrototyped > getPrototype()
Get dataset prototype.
 
std::vector< std::shared_ptr< WEEGChannelInfo > > m_channelInfos
list of the information about all channel infos this EEG has
 
WEEG2()
Constructor creating a quite unusable instance.
 
std::vector< std::shared_ptr< WEEG2Segment > > m_segments
list of all segments this EEG consists of
 
std::shared_ptr< WEEG2Segment > getSegment(std::size_t segmentID) const
Get one segment.
 
std::shared_ptr< WEEGChannelInfo > getChannelInfo(std::size_t channelID) const
Get one channel info object.
 
virtual const std::string getName() const
Return the name of the dataset.
 
virtual const std::string getDescription() const
Description of dataset.
 
double m_samplingRate
sampling rate used by the recording
 
Class which contains information about one channel of an EEG recording, read from a WPagerEEG.
 
Indicates invalid element access of a container.
 
static const unsigned int MAX_RECORDING_SAMPLING_FREQUENCY
Maximum samplimg frequency of a recording.
 
static const unsigned int MAX_RECORDING_CHANNELS
Maximum number of channels for a certain modality.
 
static const unsigned int MAX_RECORDING_SEGMENTS
Maximum number of segments of a recording.
 
double PV_DOUBLE
base type used for every WPVDouble
 
int32_t PV_INT
base type used for every WPVInt