AwCore
AnyWave core library
|
This class defines the AwChannel object. More...
Public Member Functions | |
AwChannel () | |
AwChannel (AwChannel *chan) | |
virtual | ~AwChannel () |
virtual AwChannel * | duplicate () |
float * | newData (int length) |
void | clearData () |
SourceType | sourceType () |
float | gain () |
float | samplingRate () |
QString & | name () |
int | dataSize () |
float * | data () |
QString & | unit () |
double | x () |
double | y () |
double | z () |
double | ox () |
double | oy () |
double | oz () |
void | xyz (double *x, double *y, double *z) |
void | orientationXyz (double *ox, double *oy, double *oz) |
bool | isBad () |
int | type () |
QString & | referenceName () |
QList< AwChannel * > & | references () |
bool | isVisible () |
QString & | color () |
float | highFilter () |
float | notch () |
bool | hasReferences () |
float | lowFilter () |
bool | hasCoordinates () |
bool | isEEG () |
bool | isMEG () |
bool | isReference () |
bool | isECG () |
bool | isTrigger () |
bool | isOther () |
bool | isEMG () |
bool | isSEEG () |
bool | isVirtual () |
void | setDisplayPluginName (const QString &name) |
void | setUnit (const char *u) |
void | setUnit (const QString &u) |
void | setGain (float factor) |
void | setSamplingRate (float rate) |
void | setName (const QString &Name) |
void | setColor (const QString &col) |
void | setXYZ (double x, double y, double z) |
void | setOrientationXYZ (double ox, double oy, double oz) |
void | setBad (bool flag) |
void | setType (int t) |
Changing the type will clear the reference channel. More... | |
void | setReferenceName (const QString &ref) |
void | setHighFilter (float val) |
void | setLowFilter (float val) |
void | setSourceType (SourceType stype) |
void | setDataReady (bool flag=true) |
void | setSelected (bool flag) |
Static Public Member Functions | |
static QStringList | types () |
static int | stringToType (const QString &s) |
static QString | typeToString (int t) |
This class defines the AwChannel object.
AwChannel is the object used to manage channels stored in a data file. A channel has a type, a sampling rate and some data associated. Note that data are stored using a float array. That means that each channel has its own data vector. Some other attributes, like the colour, the gain, are used by AnyWave for visualizing channel data.
AwChannel::AwChannel | ( | ) |
Default constructor
AwChannel::AwChannel | ( | AwChannel * | chan | ) |
Copy constructor
Creates a copy of the channel passed as parameter. The copy becomes the child channel.
|
virtual |
Destructor
void AwChannel::clearData | ( | ) |
Clears data associated with channel.
|
inline |
Returns the current color for the channel as a QString.
|
inline |
Returns a pointer to the data array.
|
inline |
Returns the number of samples.
|
virtual |
Duplicates the actual channel object and returns a new duplicated instance
Makes a copy of the current channel. Data are copied too. Returns a pointer to the newly created AwChannel.
Reimplemented in AwVirtualChannel.
|
inline |
Returns the gain factor of channel, used for display. This is a number of units by cm.
|
inline |
Returns true if current channel has xyz coordinates.
|
inline |
Returns true if channel has a reference.
|
inline |
Returns the High Pass Filter value. If no filtering is set, returns -1.
|
inline |
Returns true if the channel is marked as Bad. Bad channels are removed from montage and display.
|
inline |
Returns true if the channel is of type ECG.
|
inline |
Returns true if the channel is of type EEG.
|
inline |
Returns true if the channel is of type EMG.
|
inline |
Returns true if the channel is of type MEG.
|
inline |
Returns true if the channel is of type Other.
|
inline |
Returns true if the channel is of type Reference (MEG Reference sensors).
|
inline |
Returns true if the channel is of type SEEG.
|
inline |
Returns true if the channel is of type Trigger.
|
inline |
Returns true if channel is virtual.
|
inline |
Returns true if the channel is visible.
|
inline |
Returns the Low Pass Filter value. If no filtering is set, returns -1.
|
inline |
Returns the channel's name. Most often the sensor's label.
float * AwChannel::newData | ( | int | nSamples | ) |
Allocates new data for length samples and return pointer to newly allocated memory.
Allocates a new data array of nSamples samples. Deletes the previously allocated array of data.
|
inline |
Returns current value for notch filter.
void AwChannel::orientationXyz | ( | double * | ox, |
double * | oy, | ||
double * | oz | ||
) |
Returns x,y and z coordinates of orientation vector at once
|
inline |
Returns the x coordinate of the orientation vector.
|
inline |
Returns the y coordinate of the orientation vector.
|
inline |
Returns the z coordinate of the orientation vector.
|
inline |
Returns the channel's reference label. Could be empty if the channel has no reference.
|
inline |
Returns the channels names list of references. Those are the channels used as references for the current channel. This method should not be used directly.
|
inline |
Returns the sampling rate in Hz.
void AwChannel::setBad | ( | bool | flag | ) |
Marks the channel as Bad.
void AwChannel::setColor | ( | const QString & | col | ) |
Sets the current color.
void AwChannel::setDataReady | ( | bool | flag = true | ) |
Sets flag that indicates that new data are loaded or computed for the channel.
void AwChannel::setDisplayPluginName | ( | const QString & | name | ) |
Sets the name of the plugin needed to display the channel. If no name is specified than AnyWave will displayed the channel using default channel rendering. Name must be the same of an existing Display Plugin. This is used only for custom, complex channels generated by a process.
void AwChannel::setGain | ( | float | factor | ) |
Sets the gain for the channel, in units by cm.
void AwChannel::setHighFilter | ( | float | val | ) |
Sets the High Pass Filtering value.
void AwChannel::setLowFilter | ( | float | val | ) |
Sets the Low Pass Filtering value.
void AwChannel::setName | ( | const QString & | Name | ) |
Sets the channel's name.
void AwChannel::setOrientationXYZ | ( | double | ox, |
double | oy, | ||
double | oz | ||
) |
Sets x, y and z coordinates for orientation vector.
void AwChannel::setReferenceName | ( | const QString & | ref | ) |
Changes the reference for the channel.
void AwChannel::setSamplingRate | ( | float | rate | ) |
Sets the data sampling rate.
void AwChannel::setSelected | ( | bool | flag | ) |
Sets the current channel as selected in display.
void AwChannel::setSourceType | ( | AwChannel::SourceType | type | ) |
Sets the source type which is Real or Virtual. By defaut all channels created are Real.
void AwChannel::setType | ( | int | t | ) |
Changing the type will clear the reference channel.
Sets the channel's type.
void AwChannel::setUnit | ( | const char * | u | ) |
Sets the unit string for the channel. i.e. "µV" for EEG channels.
void AwChannel::setUnit | ( | const QString & | u | ) |
Sets unit QString for the channel. i.e. "pT" for MEG channels.
void AwChannel::setXYZ | ( | double | x, |
double | y, | ||
double | z | ||
) |
Sets x, y and z coordinates.
|
inline |
Returns the source type for a channel. SourceType can be Real or Virtual.
|
static |
Returns the type of channel based on the QString passed as parameter. If the string does not match a valid type, returns -1.
|
inline |
Returns the channel's type: AwChannel::EEG, AwChannel::MEG, AwChannel::SEEG, AwChannel::ECG, etc..
|
static |
static method to get a list of possible types as QString
|
static |
Returns the type of the channelStatic method that converts channel's type from an int value to a QString.
|
inline |
Returns the unit string. If no unit is specified, returns an empty string.
|
inline |
Returns the x coordinate.
void AwChannel::xyz | ( | double * | x, |
double * | y, | ||
double * | z | ||
) |
Returns x,y and z coordinates at once.
|
inline |
Returns the y coordinate..
|
inline |
Returns the z coordinate.