-
Notifications
You must be signed in to change notification settings - Fork 0
Key classes
Here are the most important classes in the GUI. Familiarize yourself with them before you make any major changes to the source code.
- OpenEphysApplication - launches the application and creates the MainWindow
- MainWindow - creates the AudioComponent, ProcessorGraph, and UIComponent
- AudioComponent - communicates with the system audio hardware to drive the callbacks for data acquisition
- ProcessorGraph - stores the data processing modules and organizes their connections
- UIComponent - holds all of the user interface objects
- ControlPanel - displays important information (such as time, disk space, and CPU usage), and allows the user to start/stop acquisition and recording.
- ProcessorList - holds a list of processing modules from which the user can construct signal chains
- EditorViewport - takes processors which have been dragged from the ProcessorList and uses them to build the signal chain (along with the ProcessorGraph). Displays the editors for the active signal chain.
- DataViewport - holds tabs that can contain visualizers for various sinks
- MessageCenter - displays messages for the user
Every data processing module and its respective editor must be derived from these base classes:
-
GenericProcessor - abstract base class for all processing modules (which must implement the
process()function in order to function - GenericEditor - non-abstract base class for all processing module editors; if a processor lacks a custom editor, a GenericEditor is used as the default
Despite the fact that all of the neuroscience-related functionality of the GUI revolves around data processing modules, there are a lot of important processor classes that are missing. This is because most of the development efforts so far have gone into creating a robust backbone for the GUI that is completely independent of what type of data is flowing into and out of it. If you'd like to create your own processor class, you can use the following as models:
Provide all of the input to the ProcessorGraph. Every signal chain must have one and only one source. Eventually, Mergers may be used to have multiple sources feed data into the same signal chain.
- SourceNode - creates and communicates with one of several different DataThreads, which bring in data from outside sources.
- EventNode - generates events at user-defined intervals
- SignalGenerator - generates 16 channels of sine wave data. At the moment, only frequency and amplitude can be configured.
Manipulate data flowing through the ProcessorGraph. Signal chains can have arbitrarily many filters (although the actual number is currently constrained by the width of the FilterViewport).
- FilterNode - a simple bandpass filter
- Resampler - can be used to up-sample or down-sample continuous data (still under construction)
- SpikeDetector - detects spike events based on a voltage threshold (still under construction)
Provide an interface to an output source, such as a display or a networked device. A signal chain may have zero or one sink associated with it. Eventually, Splitters may be used to give a signal chain multiple outputs.
- LfpDisplayNode - displays an array of continuous signals in real time
- WiFiOutput - sends a simple message to an appropriate configured Arduino with a WiFly shield (see the Wireless communication page for more info.
These processors allow a signal chain to be divided or multiple chains to be connected.
These processors inhabit the ProcessorGraph by default.
- RecordNode - writes data to disk
- AudioNode - sends data to the audio card for audio monitoring
While not technically processors, since they don't inhabit the ProcessorGraph, visualizers take data from the signal chain and make it visible to the user.
- OpenGLCanvas - abstract base class that takes care of loading fonts and drawing scroll bars
- InfoLabel - appears in the DataViewport to provide instructions to the user
- LfpDisplayCanvas - draws an array of continuous signals
- SpikeDisplayCanvas - draws spike waveforms and projections
Here are some Juce classes that are used extensively throughout the GUI. You should learn to love them:
- AudioSampleBuffer - used to shuttle continuous data through the ProcessorGraph. Holds an array of floats of size channels x samples.
- MidiBuffer - used to shuttle event data through the ProcessorGraph. Holds discrete events with a timestamp and several bytes of data. In the Juce source code in this repository, the MidiBuffer class has been modified so that each event can hold an arbitrary number of bytes. This is so things like spike events can be sent from processor to processor through the MidiBuffer.
- Component - almost everything the user can interact with is a component. Components hold other components as children, which inform their parents when they receive a user input, such as a click.
- Graphics - used to draw within Components, except OpenGLComponents, such as the OpenGLCanvas.
<< Back to Program structure | Continue to Repository structure >>