-
Notifications
You must be signed in to change notification settings - Fork 3
/
eegplugin_neuroscanio.m
59 lines (50 loc) · 2.46 KB
/
eegplugin_neuroscanio.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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
% eegplugin_neuroscanio() - Plugin to import Neuroscan EEG data format
%
% Usage:
% >> eegplugin_neuroscanio(fig, trystrs, catchstrs);
%
% Inputs:
% fig - [integer] eeglab figure.
% trystrs - [struct] "try" strings for menu callbacks.
% catchstrs - [struct] "catch" strings for menu callbacks.
%
% Author: Arnaud Delorme, UCSD, 2018
%
% See also: eeglab()
% Copyright (C) 2019 Arnaud Delorme, UCSD
%
% This program is free software; you can redistribute it and/or modify
% it under the terms of the GNU General Public License as published by
% the Free Software Foundation; either version 2 of the License, or
% (at your option) any later version.
%
% This program is distributed in the hope that it will be useful,
% but WITHOUT ANY WARRANTY; without even the implied warranty of
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
% GNU General Public License for more details.
%
% You should have received a copy of the GNU General Public License
% along with this program; if not, write to the Free Software
% Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1.07 USA
function vers = eegplugin_neuroscanio(fig, trystrs, catchstrs)
vers = 'neuroscanio1.8';
if nargin < 3
error('eegplugin_neuroscanio requires 3 arguments');
end
% find tools menu
% ---------------
neuro_m = findobj(fig, 'tag', 'import data');
event_m = findobj(fig, 'tag', 'import event');
epoch_m = findobj(fig, 'tag', 'import epoch');
% command to check that the '.source' is present in the EEG structure
% -------------------------------------------------------------------
cb_loadcnt = [ 'try, [EEG LASTCOM] = pop_loadcnt;' catchstrs.new_and_hist ];
cb_loadeeg = [ 'try, [EEG LASTCOM] = pop_loadeeg;' catchstrs.new_and_hist ];
cb_loaddat = [ trystrs.check_epoch '[EEG LASTCOM]= pop_loaddat(EEG);' catchstrs.store_and_hist ];
cb_loaddat2 = [ trystrs.check_data '[EEG LASTCOM]= pop_loaddat(EEG);' catchstrs.store_and_hist ];
cb_importev2 = [ trystrs.check_data '[EEG LASTCOM]= pop_importev2(EEG);' catchstrs.store_and_hist ];
uimenu( neuro_m, 'Label', 'From Neuroscan .CNT file', 'CallBack', cb_loadcnt, 'Separator', 'on');
uimenu( neuro_m, 'Label', 'From Neuroscan .EEG file', 'CallBack', cb_loadeeg);
uimenu( epoch_m, 'Label', 'From Neuroscan .DAT file', 'CallBack', cb_loaddat);
uimenu( event_m, 'Label', 'From Neuroscan .DAT file', 'CallBack', cb_loaddat2);
uimenu( event_m, 'Label', 'From Neuroscan .ev2 file', 'CallBack', cb_importev2);