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." ) );
std::string getLabel() const
Get the label of the channel.
General purpose exception and therefore base class for all DataHandler related exceptions.
std::string m_unit
unit used by the recording of the channel
Indicates invalid element access of a container.
This only is a 3d double vector.
WEEGChannelInfo(std::size_t channelID, boost::shared_ptr< WPagerEEG > pager, boost::shared_ptr< WEEGPositionsLibrary > positionsLibrary)
Constructor.
std::string m_label
label of the channel
bool m_hasPosition
whether there is a valid position for this electrode
std::string getUnit() const
Get the unit used by the recording of the channel.
WPosition m_position
position of the electrode
WPosition getPosition() const
Get the position of the electrode.