Jump to content

User Reference:BCI2000Viewer

From BCI2000 Wiki

BCI2000Viewer displays brain signal data and state variables contained in BCI2000 data files.

For recordings containing audio and/or video content, it can play back audio and/or video in conjunction with scrolling through the data file in real-time.

Opening Files

To open a data file, drag-and-drop it into the program's main window. Alternatively, double-click a .dat file in Windows Explorer, and choose BCI2000 FileViewer when prompted for an application program to associate with the .dat extension.

Browsing

User interface elements for browsing are located at the top right, within the tool bar.

  • |<< and >>| move to beginning/end of file;
  • << and >> move forward/backward by entire pages (i.e., the amount of time displayed in the window);
  • < and > move forward/backward by sample blocks;
  • the position field displays the current position in hh:mm:ss format, followed by the total length of the file. Entering a value in seconds, or in hh:mm:ss format, will move the center of the display to the specified position.

Tool Bar

The tool bar contains icons for horizontal and vertical zoom, reducing or enlarging the number of channels displayed on a vertical display page. Also, the tool bar allows to enable and disable the display grid, open and close the channel color selector, and switch between light and dark display mode. Further, there are menus for High Pass, Low Pass, and Notch filter options in the tool bar.

For all tool bar options, there are corresponding menu items in the "View" and the context menu (right-click on the display).

Selecting States and Channels for Display

Once a file is opened in BCI2000 Viewer, the area to the right displays a list of state variables and brain signal channels contained in the data file. By default, all channels are selected for display, and none of the states are. To display one or more state, mark the respective checkbox.

State names and values are displayed above the signal. State values are normalized to the available range. To see the actual value of a state, move the mouse cursor to the desired position, and let it rest there for one or two seconds. A tooltip will appear, displaying the state name and value.

Display Tool Tips

Whenever the mouse pointer is at rest for one or two seconds above the channel and state display, a tool tip will be displayed that contains state or channel name, and the state or channel value. This is especially useful for states where there is not enough space in the display to indicate a range of values.

Display Properties

Similar to the signal display in the operator module, display properties may be changed from the View menu (which is reduplicated as a context menu that appears by right-clicking the signal display).

Also, the following keyboard shortcuts are provided:

up/down back/forward one channel,
page-up/page-down back/forward one screenful of channels,
'b'/space same as page-up/page-down ('less'-like shortcuts),
-/+ reduce/enlarge the signal,
,/. fewer/more channels,
left/right slow down/speed up the time sweep,
home/end jump to the first/last screenful of channels,
typing a number and pressing return (or 'g') jump to the specified channel number.

Unit Display

When the signal's physical unit is displayed, it is represented as a white bar if the dark theme is selected, and as a black bar if the bright theme is selected.

In the example, there are white markers above and below the bar, indicating the range corresponding to the value written in the bar. These markers may be missing; then the range corresponds to the height of the bar itself.

Finally, the physical unit may be displayed with a marker attached to the bar:

This display is used for nonnegative signals. Here, the physical unit corresponds to the distance of the marker to the signal's baseline.

Choosing Signal Colors

Clicking the color wheel in the toolbar, or the Choose Signal Colors... entry from the context menu, will open up a color chooser dialog.

The Channel Color Selector

This dialog contains the elements of a standard color chooser dialog at the top, followed with two preview fields which display the user's color choice in both the dark and light color context which is available as a choice in the user interface.

Further below, there are three buttons that provide the main functionality of the color selector dialog:

  • an "Apply to selected channels" button that applies the current color selection to all selected channels,
  • an "Apply pattern" button that applies the pattern in the first N channels to all further channels,
  • an "Undo all changes" button that allows the user to go back the colors that were in use when the dialog was first opened.

AV Playback

In BCI2000Viewer, there is an AV Playback tool bar floating on top of other windows. It allows to scroll through a recording in real-time or a fraction or multiple thereof. Also, it contains controls for navigating through a recording, and setting the relative speed of playback.

If AV content is available, video data will be displayed in secondary windows. Audio will be played back through the output set as default in the system preferences.

AV Synchronization Strategies

While recording audio, the AudioExtension will write the current audio frame into the AudioFrame event state whenever a block of audio data has been processed.

Similarly, whenever the WebcamLogger has acquired a frame of video, the current frame count is written into the WebcamFrame0 event state (with different index where appropriate).

Together with the SourceTime timestamp recorded in the BCI2000 .dat file, these event states form the basis for AV synchronization.

Audio Only

If only audio data is to be synchronized with brain signal data, the strategy is simply to play back audio at native speed, and to move brain signal data such that the AudioFrame state matches the current audio playback frame as good as possible. Typically, for each playback audio block, the .dat file is seeked until AudioFrame first exceeds or matches the block's last audio frame, counted from the beginning of audio playback.

Video Only

Video files as written by WebcamLogger are not suitable for direct video playback, as their frame rate does not match the true, possibly variable, frame rate of the recording.

Thus, a timer is used to smoothly advance brain signal data. Whenever brain signal data has advanced by one step, the value of WebcamFrame0 is read out, and video is seeked to display exactly that frame.

As a result, brain signal data, and video, move in a synchronized manner.

Audio and Video

If both audio and video are to be synchronized with each other, and brain signal playback, then it is most suitable to use audio playback as a reference time base because audio is most susceptible to seeking artifacts.

Similar to the "Audio only" case above, audio is played back directly. For each block of audio data, the current frame is used to seek the .dat file to where the AudioFrame state matches or exceeds that current audio frame.

Now that the location for the current audio frame has been found in the .dat file, it can be used to obtain the current value WebcamFrame0. After seeking video to that frame, all three modalities are then synchronized.

See also

User Reference:BCI2000FileInfo, Contributions:WebcamLogger, Contributions:AudioExtension