AwCore
AnyWave core library
Public Member Functions | Static Public Member Functions | List of all members
AwChannel Class Reference

This class defines the AwChannel object. More...

Inheritance diagram for AwChannel:
AwVirtualChannel

Public Member Functions

 AwChannel ()
 
 AwChannel (AwChannel *chan)
 
virtual ~AwChannel ()
 
virtual AwChannelduplicate ()
 
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)
 

Detailed Description

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.

Remarks
A channel can be set to be Virtual. Virtual channels can be used by some processing or generated by some algorithms. Their data are not coming from the data file but are computed.

Constructor & Destructor Documentation

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.

AwChannel::~AwChannel ( )
virtual

Destructor

Member Function Documentation

void AwChannel::clearData ( )

Clears data associated with channel.

QString& AwChannel::color ( )
inline

Returns the current color for the channel as a QString.

float* AwChannel::data ( )
inline

Returns a pointer to the data array.

int AwChannel::dataSize ( )
inline

Returns the number of samples.

AwChannel * AwChannel::duplicate ( )
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.

float AwChannel::gain ( )
inline

Returns the gain factor of channel, used for display. This is a number of units by cm.

bool AwChannel::hasCoordinates ( )
inline

Returns true if current channel has xyz coordinates.

bool AwChannel::hasReferences ( )
inline

Returns true if channel has a reference.

float AwChannel::highFilter ( )
inline

Returns the High Pass Filter value. If no filtering is set, returns -1.

bool AwChannel::isBad ( )
inline

Returns true if the channel is marked as Bad. Bad channels are removed from montage and display.

bool AwChannel::isECG ( )
inline

Returns true if the channel is of type ECG.

bool AwChannel::isEEG ( )
inline

Returns true if the channel is of type EEG.

bool AwChannel::isEMG ( )
inline

Returns true if the channel is of type EMG.

bool AwChannel::isMEG ( )
inline

Returns true if the channel is of type MEG.

bool AwChannel::isOther ( )
inline

Returns true if the channel is of type Other.

bool AwChannel::isReference ( )
inline

Returns true if the channel is of type Reference (MEG Reference sensors).

bool AwChannel::isSEEG ( )
inline

Returns true if the channel is of type SEEG.

bool AwChannel::isTrigger ( )
inline

Returns true if the channel is of type Trigger.

bool AwChannel::isVirtual ( )
inline

Returns true if channel is virtual.

bool AwChannel::isVisible ( )
inline

Returns true if the channel is visible.

float AwChannel::lowFilter ( )
inline

Returns the Low Pass Filter value. If no filtering is set, returns -1.

QString& AwChannel::name ( )
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.

float AwChannel::notch ( )
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

double AwChannel::ox ( )
inline

Returns the x coordinate of the orientation vector.

double AwChannel::oy ( )
inline

Returns the y coordinate of the orientation vector.

double AwChannel::oz ( )
inline

Returns the z coordinate of the orientation vector.

QString& AwChannel::referenceName ( )
inline

Returns the channel's reference label. Could be empty if the channel has no reference.

QList<AwChannel *>& AwChannel::references ( )
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.

float AwChannel::samplingRate ( )
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.

SourceType AwChannel::sourceType ( )
inline

Returns the source type for a channel. SourceType can be Real or Virtual.

int AwChannel::stringToType ( const QString &  s)
static

Returns the type of channel based on the QString passed as parameter. If the string does not match a valid type, returns -1.

int AwChannel::type ( )
inline

Returns the channel's type: AwChannel::EEG, AwChannel::MEG, AwChannel::SEEG, AwChannel::ECG, etc..

QStringList AwChannel::types ( )
static

static method to get a list of possible types as QString

QString AwChannel::typeToString ( int  t)
static

Returns the type of the channelStatic method that converts channel's type from an int value to a QString.

QString& AwChannel::unit ( )
inline

Returns the unit string. If no unit is specified, returns an empty string.

double AwChannel::x ( )
inline

Returns the x coordinate.

void AwChannel::xyz ( double *  x,
double *  y,
double *  z 
)

Returns x,y and z coordinates at once.

double AwChannel::y ( )
inline

Returns the y coordinate..

double AwChannel::z ( )
inline

Returns the z coordinate.


The documentation for this class was generated from the following files: