Skip to content

Commit 01ebfdd

Browse files
committed
Fixed to work with modified EEGLAB guibuilder
1 parent 9ac9ea0 commit 01ebfdd

File tree

10 files changed

+1175
-1158
lines changed

10 files changed

+1175
-1158
lines changed
-251 KB
Binary file not shown.
263 KB
Binary file not shown.

PrepPipeline/eegplugin_prepPipeline.m

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,6 @@
2323

2424
%function eegplugin_clean_rawdata(fig,try_strings,catch_strings)
2525

26-
% create menu
27-
% toolsmenu = findobj(fig, 'tag', 'tools');
28-
% uimenu( toolsmenu, 'label', 'Clean continuous data using ASR', 'separator','on',...
29-
% 'callback', 'EEG = pop_clean_rawdata(EEG); [ALLEEG EEG CURRENTSET] = eeg_store(ALLEEG, EEG); eeglab redraw');
3026

3127
% eegplugin_prepPipeline() - the PREP pipeline plugin
3228
function vers = eegplugin_prepPipeline(fig, trystrs, catchstrs)
@@ -42,6 +38,6 @@
4238
% create menu
4339
comprep = [trystrs.no_check '[EEG LASTCOM] = pop_prepPipeline(EEG);' catchstrs.new_and_hist];
4440
menu = findobj(fig, 'tag', 'tools');
45-
uimenu( menu, 'Label', 'Run PREP pipeline', 'callback', comprep, ...
41+
uimenu( menu, 'label', 'Run PREP pipeline', 'callback', comprep, ...
4642
'separator', 'on');
4743

PrepPipeline/interface/MasterGUI.m

Lines changed: 23 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,24 @@
1-
function [paramsOut, okay] = MasterGUI(hObject, callbackdata, userData, EEG) %#ok<INUSL>
2-
geometry = {1, [1, 1], [1, 1], [1, 1]};
3-
geomvert = [1,1,1,1];
4-
title = 'PREP pipeline control panel';
5-
inputData = struct('signal', EEG, 'name', title, 'userData', userData);
6-
closeOpenWindows(inputData.name);
7-
uilist= {{'style', 'text', 'string', 'Override default parameters for processing step:'}...
8-
{'style', 'pushbutton', 'string', 'Boundary', ...
9-
'Callback', {@boundaryGUI, inputData}} ...
10-
{'style', 'pushbutton', 'string', 'Reference', ...
11-
'Callback', {@referenceGUI, inputData}} ...
12-
{'style', 'pushbutton', 'string', 'Detrend', ...
13-
'Callback', {@detrendGUI, inputData}} ...
14-
{'style', 'pushbutton', 'string', 'Report', ...
15-
'Callback', {@reportGUI, inputData}} ...
16-
{'style', 'pushbutton', 'string', 'Line noise', ...
17-
'Callback', {@lineNoiseGUI, inputData}}...
18-
{'style', 'pushbutton', 'string', 'Post process', ...
19-
'Callback', {@postProcessGUI, inputData}}};
20-
[~, userData, buttonPressed, ~] = inputgui('geometry', geometry, 'geomvert', geomvert, ...
21-
'uilist', uilist, 'title', title, ...
22-
'helpcom', 'pophelp(''pop_prepPipeline'')');
23-
24-
okay = okayPressed(buttonPressed);
25-
paramsOut = struct();
26-
if ~isempty(userData)
27-
fNames = fieldnames(userData);
28-
for k = 1:length(fNames)
29-
nextStruct = userData.(fNames{k});
30-
nextNames = fieldnames(nextStruct);
31-
for j = 1:length(nextNames)
32-
paramsOut.(nextNames{j}) = nextStruct.(nextNames{j});
33-
end
34-
end
35-
end
36-
37-
38-
function okay = okayPressed(buttonPressed)
39-
% Returns true if the okay button is pressed, false if otherwise
40-
okay = false;
41-
if ~isempty(buttonPressed)
42-
okay = true;
43-
end % okayPressed
44-
end
45-
1+
function paramsOut = MasterGUI(hObject, callbackdata, userData, EEG) %#ok<INUSL>
2+
geometry = {1, [1, 1], [1, 1], [1, 1]};
3+
geomvert = [1,1,1,1];
4+
title = 'PREP pipeline control panel';
5+
inputData = struct('signal', EEG, 'name', title, 'userData', userData);
6+
closeOpenWindows(inputData.name);
7+
uilist= {{'style', 'text', 'string', 'Override default parameters for processing step:'}...
8+
{'style', 'pushbutton', 'string', 'Boundary', ...
9+
'Callback', {@boundaryGUI, inputData}} ...
10+
{'style', 'pushbutton', 'string', 'Reference', ...
11+
'Callback', {@referenceGUI, inputData}} ...
12+
{'style', 'pushbutton', 'string', 'Detrend', ...
13+
'Callback', {@detrendGUI, inputData}} ...
14+
{'style', 'pushbutton', 'string', 'Report', ...
15+
'Callback', {@reportGUI, inputData}} ...
16+
{'style', 'pushbutton', 'string', 'Line noise', ...
17+
'Callback', {@lineNoiseGUI, inputData}}...
18+
{'style', 'pushbutton', 'string', 'Post process', ...
19+
'Callback', {@postProcessGUI, inputData}}};
20+
[~, paramsOut] = inputgui('geometry', geometry, 'geomvert', geomvert, ...
21+
'uilist', uilist, 'title', title, ...
22+
'helpcom', 'pophelp(''pop_prepPipeline'')');
23+
4624
end % MasterGUI
Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,26 @@
1-
%% *****************************displayErrors******************************
2-
%Purpose:
3-
% This returns the errors (if any) that are found when a user enters
4-
% data that does not correspond with the type found by the default
5-
% function. It displays the errors in a pop-up GUI.
6-
%Parameters:
7-
% I errors Cell array of strings; errors found by the
8-
% checkPrepDefaults function
9-
% O loop Integer that either continues the while loop found
10-
% above or exits the loop
11-
%Notes:
12-
%
13-
%Return Value:
14-
% 0 No errors
15-
% 1 Displays errors and continues loop
16-
%**************************************************************************
17-
function displayErrors(errors)
18-
geometry={};
19-
geomvert=[];
20-
uilist={};
21-
for k=1:length(errors)
22-
geometry={geometry{:},1};
23-
uilist={uilist{:},{'style', 'text', 'string', errors(k)}};
24-
end
25-
result=inputgui('geometry', geometry, 'geomvert', geomvert, 'uilist', uilist, 'title', 'Reference Errors', 'helpcom', 'pophelp(''pop_eegfiltnew'')');
1+
%% *****************************displayErrors******************************
2+
%Purpose:
3+
% This returns the errors (if any) that are found when a user enters
4+
% data that does not correspond with the type found by the default
5+
% function. It displays the errors in a pop-up GUI.
6+
%Parameters:
7+
% I errors Cell array of strings; errors found by the
8+
% checkPrepDefaults function
9+
% O loop Integer that either continues the while loop found
10+
% above or exits the loop
11+
%Notes:
12+
%
13+
%Return Value:
14+
% 0 No errors
15+
% 1 Displays errors and continues loop
16+
%**************************************************************************
17+
function displayErrors(errors)
18+
geometry={};
19+
geomvert=[];
20+
uilist={};
21+
for k=1:length(errors)
22+
geometry={geometry{:},1};
23+
uilist={uilist{:},{'style', 'text', 'string', errors(k)}};
24+
end
25+
result=inputgui('geometry', geometry, 'geomvert', geomvert, 'uilist', uilist, 'title', 'Reference Errors', 'helpcom', 'pophelp(''pop_eegfiltnew'')');
2626
end

0 commit comments

Comments
 (0)