Open Ephys GUI
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Classes | Public Member Functions | Public Attributes
SpikeDetector Class Reference

Detects spikes in a continuous signal and outputs events containing the spike data. More...

#include <SpikeDetector.h>

Inheritance diagram for SpikeDetector:
GenericProcessor AccessClass

List of all members.

Classes

struct  Electrode

Public Member Functions

 SpikeDetector ()
 constructor
 ~SpikeDetector ()
 destructor
void process (AudioSampleBuffer &buffer, MidiBuffer &events, int &nSamples)
 Processes an incoming continuous buffer and places new spikes into the event buffer.
void setParameter (int parameterIndex, float newValue)
 Used to alter parameters of data acquisition.
void updateSettings ()
 Called whenever the signal chain is altered.
bool enable ()
 Called prior to start of acquisition.
bool disable ()
 Called after acquisition is finished.
AudioProcessorEditor * createEditor ()
 Creates the SpikeDetectorEditor.
bool addElectrode (int nChans)
 Adds an electrode with n channels to be processed.
bool removeElectrode (int index)
 Removes an electrode with a given index.
int getNumChannels (int index)
 Returns the number of channels for a given electrode.
bool setChannel (int electrodeIndex, int channelNum, int newChannel)
 Edits the mapping between input channels and electrode channels.
int getChannel (int index, int chan)
 Returns the continuous channel that maps to a given electrode channel.
bool setElectrodeName (int index, String newName)
 Sets the name of a given electrode.
StringArray getElectrodeNames ()
 Returns a StringArray containing the names of all electrodes.
void setChannelThreshold (int electrodeNum, int channelNum, float threshold)
double getChannelThreshold (int electrodeNum, int channelNum)
- Public Member Functions inherited from GenericProcessor
 GenericProcessor (const String &name_)
virtual ~GenericProcessor ()
const String getName () const
virtual void prepareToPlay (double sampleRate, int estimatedSamplesPerBlock)
void releaseResources ()
bool hasEditor () const
void reset ()
void setCurrentProgramStateInformation (const void *data, int sizeInBytes)
void setStateInformation (const void *data, int sizeInBytes)
void getCurrentProgramStateInformation (MemoryBlock &destData)
void getStateInformation (MemoryBlock &destData)
void changeProgramName (int index, const String &newName)
void setCurrentProgram (int index)
const String getInputChannelName (int channelIndex) const
const String getOutputChannelName (int channelIndex) const
const String getParameterName (int parameterIndex)
const String getParameterText (int parameterIndex)
const String getProgramName (int index)
bool isInputChannelStereoPair (int index) const
bool isOutputChannelStereoPair (int index) const
bool acceptsMidi () const
bool producesMidi () const
bool isParameterAutomatable (int parameterIndex)
bool isMetaParameter (int parameterIndex)
int getNumParameters ()
int getNumPrograms ()
int getCurrentProgram ()
float getParameter (int parameterIndex)
ParametergetParameterByName (String parameterName)
ParametergetParameterReference (int parameterIndex)
virtual float getSampleRate ()
virtual float getDefaultSampleRate ()
virtual int getNumInputs ()
virtual int getNumOutputs ()
virtual int getDefaultNumOutputs ()
virtual float getDefaultBitVolts ()
virtual int getNextChannel (bool)
virtual void resetConnections ()
virtual void setCurrentChannel (int chan)
int getNodeId ()
void setNodeId (int id)
GenericProcessorgetSourceNode ()
GenericProcessorgetDestNode ()
virtual void switchIO (int)
virtual void switchIO ()
virtual void setPathToProcessor (GenericProcessor *p)
virtual void setSourceNode (GenericProcessor *sn)
virtual void setDestNode (GenericProcessor *dn)
virtual void setMergerSourceNode (GenericProcessor *sn)
virtual void setSplitterDestNode (GenericProcessor *dn)
virtual bool isSource ()
virtual bool isSink ()
virtual bool isSplitter ()
virtual bool isMerger ()
virtual bool canSendSignalTo (GenericProcessor *)
virtual bool isReady ()
virtual bool enabledState ()
virtual void enabledState (bool t)
virtual void enableCurrentChannel (bool)
virtual bool stillHasSource ()
virtual AudioSampleBuffer * getContinuousBuffer ()
virtual MidiBuffer * getEventBuffer ()
virtual int checkForEvents (MidiBuffer &mb)
virtual void addEvent (MidiBuffer &mb, uint8 type, int sampleNum, uint8 eventID=0, uint8 eventChannel=0, uint8 numBytes=0, uint8 *data=0)
virtual void handleEvent (int eventType, MidiMessage &event)
virtual GenericEditorgetEditor ()
virtual bool isAudioOrRecordNode ()
virtual bool recordStatus (int chan)
virtual bool audioStatus (int chan)
virtual void clearSettings ()
virtual void generateDefaultChannelNames (StringArray &)
virtual void update ()
void setStartChannel (int i)
int getStartChannel ()
- Public Member Functions inherited from AccessClass
 AccessClass ()
 ~AccessClass ()
void setUIComponent (UIComponent *)
virtual void updateChildComponents ()
EditorViewportgetEditorViewport ()
DataViewportgetDataViewport ()
ProcessorListgetProcessorList ()
ProcessorGraphgetProcessorGraph ()
ControlPanelgetControlPanel ()
MessageCentergetMessageCenter ()
UIComponentgetUIComponent ()
AudioComponentgetAudioComponent ()

Public Attributes

AudioSampleBuffer overflowBuffer
 Extra samples are placed in this buffer to allow seamless transitions between callbacks.
AudioSampleBuffer & dataBuffer
 Reference to a continuous buffer (for internal use only).
StringArray electrodeTypes
 Returns a list of possible electrode types (e.g., stereotrode, tetrode).
- Public Attributes inherited from GenericProcessor
GenericProcessorsourceNode
GenericProcessordestNode
bool isEnabled
bool wasConnected
int nextAvailableChannel
int saveOrder
int loadOrder
int currentChannel
ScopedPointer< GenericEditoreditor
ProcessorSettings settings
int nodeId
Array< Parameterparameters
StringArray parameterNames
Parameter nullParam

Additional Inherited Members

- Public Types inherited from GenericProcessor
enum  eventTypes {
  TIMESTAMP = 0, BUFFER_SIZE = 1, PARAMETER_CHANGE = 2, TTL = 3,
  SPIKE = 4, EEG = 5, CONTINUOUS = 6
}
enum  eventChannelTypes { GENERIC_EVENT = 999, SINGLE_ELECTRODE = 1, STEREOTRODE = 2, TETRODE = 4 }

Detailed Description

Detects spikes in a continuous signal and outputs events containing the spike data.

See also:
GenericProcessor, SpikeDetectorEditor

Constructor & Destructor Documentation

SpikeDetector::SpikeDetector ( )

constructor

SpikeDetector::~SpikeDetector ( )

destructor


Member Function Documentation

bool SpikeDetector::addElectrode ( int  nChans)

Adds an electrode with n channels to be processed.

AudioProcessorEditor* SpikeDetector::createEditor ( )
virtual

Creates the SpikeDetectorEditor.

Reimplemented from GenericProcessor.

bool SpikeDetector::disable ( )
virtual

Called after acquisition is finished.

Reimplemented from GenericProcessor.

bool SpikeDetector::enable ( )
virtual

Called prior to start of acquisition.

Reimplemented from GenericProcessor.

int SpikeDetector::getChannel ( int  index,
int  chan 
)

Returns the continuous channel that maps to a given electrode channel.

double SpikeDetector::getChannelThreshold ( int  electrodeNum,
int  channelNum 
)
StringArray SpikeDetector::getElectrodeNames ( )

Returns a StringArray containing the names of all electrodes.

int SpikeDetector::getNumChannels ( int  index)

Returns the number of channels for a given electrode.

void SpikeDetector::process ( AudioSampleBuffer &  buffer,
MidiBuffer &  events,
int &  nSamples 
)
virtual

Processes an incoming continuous buffer and places new spikes into the event buffer.

Implements GenericProcessor.

bool SpikeDetector::removeElectrode ( int  index)

Removes an electrode with a given index.

bool SpikeDetector::setChannel ( int  electrodeIndex,
int  channelNum,
int  newChannel 
)

Edits the mapping between input channels and electrode channels.

void SpikeDetector::setChannelThreshold ( int  electrodeNum,
int  channelNum,
float  threshold 
)
bool SpikeDetector::setElectrodeName ( int  index,
String  newName 
)

Sets the name of a given electrode.

void SpikeDetector::setParameter ( int  parameterIndex,
float  newValue 
)
virtual

Used to alter parameters of data acquisition.

Reimplemented from GenericProcessor.

void SpikeDetector::updateSettings ( )
virtual

Called whenever the signal chain is altered.

Reimplemented from GenericProcessor.


Member Data Documentation

AudioSampleBuffer& SpikeDetector::dataBuffer

Reference to a continuous buffer (for internal use only).

StringArray SpikeDetector::electrodeTypes

Returns a list of possible electrode types (e.g., stereotrode, tetrode).

AudioSampleBuffer SpikeDetector::overflowBuffer

Extra samples are placed in this buffer to allow seamless transitions between callbacks.


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