forked from sccn/mobilab
-
Notifications
You must be signed in to change notification settings - Fork 1
/
eegplugin_mobilab.m
40 lines (34 loc) · 1.68 KB
/
eegplugin_mobilab.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
% eegplugin_mobi2eeglab() - MOBILAB plugin for EEGLAB
% MOBILAB is a collection of functionalities
% for processing MoBI data, see (Makeig et al.,
% 2009).
% Usage:
% >> eegplugin_mobilab(fig, trystrs, catchstrs);
%
% Inputs:
% fig - [integer] eeglab figure.
% trystrs - [struct] "try" strings for menu callbacks.
% catchstrs - [struct] "catch" strings for menu callbacks.
%
% Author: Alejandro Ojeda, Nima Bigdely Shamlo, and Christian Kothe, SCCN, INC, UCSD
%
% See also: eeglab()
function eegplugin_mobilab(fig,try_strings, catch_strings)
p = fileparts(which('runmobilab'));
if isempty(p)
p = fileparts(which('eeglab'));
p = [p filesep 'plugins' filesep 'mobilab'];
end
addpath(p);
% JRI 7/3/14 -- original code was finding two "Import Data" menus (the one we want
% plus one from LIMO plugin. So, need to be more specific:
% find the Import Data menu within the top-level File menu
filemenu = findobj(fig,'Label','File','type','uimenu','parent',fig);
h = findobj(filemenu,'Label','Import data');
% uimenu( h, 'label', 'From file (.xdf, .xdfz, .drf)', 'callback','allDataStreams = pop_load_file_mobilab;');
% uimenu( h, 'label', 'From folder (concat LSL or DataRiver files)', 'callback','allDataStreams = pop_load_folder_mobilab;');
% uimenu( h, 'label', 'From legacy DataRiver .bdf file', 'callback','allDataStreams = pop_load_bdf;');
% uimenu( h, 'label', 'From MoBILAB folder', 'callback','allDataStreams = pop_load_MoBI;');
uimenu( h, 'label', 'Into MoBILAB', 'callback','runmobilab;');
h = findobj(fig,'Label','Tools');
uimenu( h, 'label', 'MoBILAB','CallBack','disp(''runmobilab'');runmobilab;');