30 #include <boost/shared_ptr.hpp>
32 #include "../common/exceptions/WOutOfBounds.h"
33 #include "../common/math/linearAlgebra/WPosition.h"
34 #include "WEEGPositionsLibrary.h"
35 #include "WEEGChannelInfo.h"
36 #include "exceptions/WDHException.h"
37 #include "io/WPagerEEG.h"
41 boost::shared_ptr< WPagerEEG > pager,
42 boost::shared_ptr< WEEGPositionsLibrary > positionsLibrary )
46 throw WDHException( std::string(
"Couldn't construct new EEG channel info: pager invalid" ) );
49 if( !positionsLibrary )
51 throw WDHException( std::string(
"Couldn't construct new EEG channel info: positions library invalid" ) );
54 if( channelID >= pager->getNumberOfChannels() )
56 std::ostringstream stream;
57 stream <<
"The EEG has no channel number " << channelID;
61 m_unit = pager->getChannelUnit( channelID );
62 m_label = pager->getChannelLabel( channelID );
93 throw WDHException( std::string(
"The position of this electrode is unknown." ) );