Skip to content

The EEGBrowser is meant to be a modern drop-in replacement for EEGLAB's eegplot function. The EEGBrowser widget is based on MoBILAB's visualization functions.

License

Notifications You must be signed in to change notification settings

aojeda/EEGBrowser

Repository files navigation

EEGBrowser

The EEGBrowser is intended to be a modern drop-in replacement for EEGLAB's eegplot function based on MoBILAB's visualization functions.

EEGBrowser

Install

  • Download
  • Uncompress
  • Rename the folder as "EEGBrowser", and place it in your eeglab/plugins folder.
  • Run eeglab or eeglab redraw (if you don't want to clean your current EEG structure)

Plugin

Note: Although EEG Browser is based on MoBILAB, the latter is not needed for it to work.

Example

Plot channel data (default)

pop_eegbrowser(EEG);

or

pop_eegbrowser(EEG,1);

Plot IC activations:

pop_eegbrowser(EEG,0);

To get the handle to the widget (useful for adding your own customizations):

hBrowser = pop_eegbrowser(EEG,0);

Other features:

  • Use the << and >> keys to move to the next page centered around the selected event marker.
  • Use - or + buttons to reduce or increase the scale respectively.
  • Click on the figure and use - or + keys in your keypad to reduce or increase the scale respectively.
  • Use the mouse to select bad trials. See example here.

Developers

If you want to extend the capabilities of the EEG Browser follow these steps:

  • Create a class inheriting from EEGBrowser, let's call it MyEEGBrowser. See example below.
  • Then create your own pop_myeegbrowser or modify pop_eegbrowser here to call your class passing in the EEG structure.

Example of creating a new browser class

classdef MyEEGBrowser < EEGBrowser
    properties
      % Declare the properties that you need here for plotting.
      % Properties store data that is used by the class for plotting.
    end

    % Constructor
    function obj = MyEEGBrowser(EEG)

      % Call EEGBrowser's constructor
      obj@EEGBrowser(EEG);

      %--
      % Do your thing here. You can for instance add buttons, change default
      % settings, and so on.
      hButton = uicontrol('Parent', obj.figureHandle,...
                          'Style', 'pushbutton',...
                          'TooltipString','This does something',...
                          'Units','Normalized',...
                          'Callback',@onPush);
      %--
    end
end

% Define your callbacks
function onPush(src,evnt)
  obj = src.Parent.UserData;  % Retrieve your MyEEGBrowser object
                              % so that you can modify its properties
  %--
  % Implement the callback here.
  %--
end

Save the code above in MyEEGBrowser.m and that's it. See this example for learning more about MATLAB classes.

Version history

  • v1.2 - fix a bug that caused the browser to be misplaced on some display configurations
  • v1.1 - fix issue associated with modified EEGLAB menu in development branch
  • v1.0 - initial release

About

The EEGBrowser is meant to be a modern drop-in replacement for EEGLAB's eegplot function. The EEGBrowser widget is based on MoBILAB's visualization functions.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages