31 #include "../common/exceptions/WOutOfBounds.h"
32 #include "../common/math/linearAlgebra/WPosition.h"
33 #include "WEEGChannelInfo.h"
34 #include "WEEGPositionsLibrary.h"
35 #include "exceptions/WDHException.h"
36 #include "io/WPagerEEG.h"
40 std::shared_ptr< WPagerEEG > pager,
41 std::shared_ptr< WEEGPositionsLibrary > positionsLibrary )
45 throw WDHException( std::string(
"Couldn't construct new EEG channel info: pager invalid" ) );
48 if( !positionsLibrary )
50 throw WDHException( std::string(
"Couldn't construct new EEG channel info: positions library invalid" ) );
53 if( channelID >= pager->getNumberOfChannels() )
55 std::ostringstream stream;
56 stream <<
"The EEG has no channel number " << channelID;
60 m_unit = pager->getChannelUnit( channelID );
61 m_label = pager->getChannelLabel( channelID );
92 throw WDHException( std::string(
"The position of this electrode is unknown." ) );
General purpose exception and therefore base class for all DataHandler related exceptions.
std::string m_label
label of the channel
WPosition m_position
position of the electrode
WPosition getPosition() const
Get the position of the electrode.
std::string m_unit
unit used by the recording of the channel
std::string getLabel() const
Get the label of the channel.
bool m_hasPosition
whether there is a valid position for this electrode
WEEGChannelInfo(std::size_t channelID, std::shared_ptr< WPagerEEG > pager, std::shared_ptr< WEEGPositionsLibrary > positionsLibrary)
Constructor.
std::string getUnit() const
Get the unit used by the recording of the channel.
Indicates invalid element access of a container.
This only is a 3d double vector.