IRootLab
An Open-Source MATLAB toolbox for vibrational biospectroscopy
uip_fselrepeater.m
Go to the documentation of this file.
1 %> @ingroup guigroup
2 %> @file
3 %> @brief Properties Window for @ref fselrepeater
4 %> @sa fselrepeater
5 
6 %> @cond
7 function varargout = uip_fselrepeater(varargin)
8 % Last Modified by GUIDE v2.5 07-Aug-2012 20:22:14
9 
10 % Begin initialization code - DO NOT EDIT
11 gui_Singleton = 1;
12 gui_State = struct('gui_Name', mfilename, ...
13  'gui_Singleton', gui_Singleton, ...
14  'gui_OpeningFcn', @uip_fselrepeater_OpeningFcn, ...
15  'gui_OutputFcn', @uip_fselrepeater_OutputFcn, ...
16  'gui_LayoutFcn', [] , ...
17  'gui_Callback', []);
18 if nargin && ischar(varargin{1})
19  gui_State.gui_Callback = str2func(varargin{1});
20 end
21 
22 if nargout
23  [varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});
24 else
25  gui_mainfcn(gui_State, varargin{:});
26 end
27 % End initialization code - DO NOT EDIT
28 
29 
30 % --- Executes just before uip_fselrepeater is made visible.
31 function uip_fselrepeater_OpeningFcn(hObject, eventdata, handles, varargin) %#ok<*INUSL>
32 handles.output.flag_ok = 0;
33 guidata(hObject, handles);
34 gui_set_position(hObject);
35 refresh(handles);
36 
37 % --- Outputs from this function are returned to the command clae.
38 function varargout = uip_fselrepeater_OutputFcn(hObject, eventdata, handles)
39 try
40  uiwait(handles.figure1);
41  handles = guidata(hObject);
42  varargout{1} = handles.output;
43  delete(gcf);
44 catch
45  output.flag_ok = 0;
46  output.params = {};
47  varargout{1} = output;
48 end;
49 
50 
51 %############################################
52 %############################################
53 
54 %#########
55 function refresh(handles)
56 listbox_load_from_workspace({'as_fsel'}, handles.popupmenu_as_fsel, 0);
57 listbox_load_from_workspace({'fext', 'block_cascade_base'}, handles.popupmenu_fext, 1);
58 listbox_load_from_workspace('sgs', handles.popupmenu_sgs, 0);
59 
60 %############################################
61 %############################################
62 
63 % --- Executes on button press in pushbuttonOK.
64 function pushbuttonOK_Callback(hObject, eventdata, handles) %#ok<*DEFNU>
65 try
66  sas_fsel = listbox_get_selected_1stname(handles.popupmenu_as_fsel);
67  if isempty(sas_fsel)
68  irerror('Feature Selection AS not specified!');
69  end;
70  sfext = listbox_get_selected_1stname(handles.popupmenu_fext);
71  if isempty(sfext)
72  sfext = '[]';
73  end;
74  ssgs = listbox_get_selected_1stname(handles.popupmenu_sgs);
75  if isempty(ssgs)
76  irerror('SGS not specified!');
77  end;
78 
79 % other = uip_as_fsel_grades();
80 % if other.flag_ok
81  handles.output.params = {...
82  'as_fsel', sas_fsel, ...
83  'fext', sfext, ...
84  'sgs', ssgs, ...
85  'flag_parallel', int2str(get(handles.checkbox_flag_parallel, 'value')), ...
86  };
87  handles.output.flag_ok = 1;
88  guidata(hObject, handles);
89  uiresume();
90 % end;
91 catch ME
92  irerrordlg(ME.message, 'Cannot continue');
93 
94 end;
95 
96 % --- Executes on selection change in popupmenu_sgs.
97 function popupmenu_sgs_Callback(hObject, eventdata, handles)
98 
99 % --- Executes during object creation, after setting all properties.
100 function popupmenu_sgs_CreateFcn(hObject, eventdata, handles)
101 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
102  set(hObject,'BackgroundColor','white');
103 end
104 
105 % --- Executes on selection change in popupmenu_as_fsel.
106 function popupmenu_as_fsel_Callback(hObject, eventdata, handles)
107 
108 % --- Executes during object creation, after setting all properties.
109 function popupmenu_as_fsel_CreateFcn(hObject, eventdata, handles)
110 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
111  set(hObject,'BackgroundColor','white');
112 end
113 
114 % --- Executes on selection change in popupmenu_fext.
115 function popupmenu_fext_Callback(hObject, eventdata, handles)
116 
117 % --- Executes during object creation, after setting all properties.
118 function popupmenu_fext_CreateFcn(hObject, eventdata, handles)
119 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
120  set(hObject,'BackgroundColor','white');
121 end
122 function popupmenu_data_Callback(hObject, eventdata, handles)
123 function popupmenu_data_CreateFcn(hObject, eventdata, handles)
124 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
125  set(hObject,'BackgroundColor','white');
126 end
127 function checkbox_flag_parallel_Callback(hObject, eventdata, handles)
128 %> @endcond
function irerror(in s)
function listbox_get_selected_1stname(in h_listbox)
Analysis Session - Feature Selection Repeater.
Definition: fselrepeater.m:4
function listbox_load_from_workspace(in classname, in h_list, in flag_blank, in string_empty, in input)
function gui_set_position(in hObject)
function irerrordlg(in errorstring, in dlgname)