IRootLab
An Open-Source MATLAB toolbox for vibrational biospectroscopy
uip_fsg_clssr.m
Go to the documentation of this file.
1 %> @ingroup guigroup
2 %> @file
3 %> @brief Properties Window for @ref fsg_clssr
4 %>
5 %> <b>Classifier</b> - see fsg_clssr::clssr
6 %>
7 %> <b>Estimation Log</b> - see fsg_clssr::estlog
8 %>
9 %> <b>Estimation Post-processor</b> - see fsg_clssr::postpr_est
10 %>
11 %> <b>Test Post-processor</b> - see fsg_clssr::postpr_test
12 %>
13 %> <b>SGS</b> - see fsg_clssr::sgs
14 %>
15 %> @sa @ref fsg_clssr
16 
17 %> @cond
18 function varargout = uip_fsg_clssr(varargin)
19 % Last Modified by GUIDE v2.5 06-Sep-2011 20:20:07
20 
21 % Begin initialization code - DO NOT EDIT
22 gui_Singleton = 1;
23 gui_State = struct('gui_Name', mfilename, ...
24  'gui_Singleton', gui_Singleton, ...
25  'gui_OpeningFcn', @uip_fsg_clssr_OpeningFcn, ...
26  'gui_OutputFcn', @uip_fsg_clssr_OutputFcn, ...
27  'gui_LayoutFcn', [] , ...
28  'gui_Callback', []);
29 if nargin && ischar(varargin{1})
30  gui_State.gui_Callback = str2func(varargin{1});
31 end
32 
33 if nargout
34  [varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});
35 else
36  gui_mainfcn(gui_State, varargin{:});
37 end
38 % End initialization code - DO NOT EDIT
39 
40 
41 % --- Executes just before uip_fsg_clssr is made visible.
42 function uip_fsg_clssr_OpeningFcn(hObject, eventdata, handles, varargin)
43 handles.output.flag_ok = 0;
44 guidata(hObject, handles);
45 gui_set_position(hObject);
46 refresh(handles);
47 
48 % --- Outputs from this function are returned to the command clae.
49 function varargout = uip_fsg_clssr_OutputFcn(hObject, eventdata, handles)
50 try
51  uiwait(handles.figure1);
52  handles = guidata(hObject);
53  varargout{1} = handles.output;
54  delete(gcf);
55 catch
56  output.flag_ok = 0;
57  output.params = {};
58  varargout{1} = output;
59 end;
60 
61 
62 %############################################
63 
64 %#########
65 function refresh(handles)
66 listbox_load_from_workspace({'clssr', 'block_cascade_base'}, handles.popupmenu_clssr, 0);
67 listbox_load_from_workspace('estlog', handles.popupmenu_estlog, 1, 'Use default');
68 listbox_load_from_workspace({'decider', 'block_cascade_base'}, handles.popupmenu_postpr_est, 1, 'Use default');
69 listbox_load_from_workspace('block', handles.popupmenu_postpr_test, 1, 'Use default');
70 listbox_load_from_workspace('sgs', handles.popupmenu_sgs, 1);
71 
72 
73 %############################################
74 %############################################
75 
76 % --- Executes on button press in pushbuttonOK.
77 function pushbuttonOK_Callback(hObject, eventdata, handles) %#ok<*INUSL,*DEFNU>
78 try
79  sclssr = listbox_get_selected_1stname(handles.popupmenu_clssr);
80  if isempty(sclssr)
81  irerror('Classifier not specified!');
82  end;
83  sestlog = listbox_get_selected_1stname(handles.popupmenu_estlog);
84  if isempty(sestlog)
85  sestlog = '[]';
86  end;
87  spostpr_est = listbox_get_selected_1stname(handles.popupmenu_postpr_est);
88  if isempty(spostpr_est)
89  spostpr_est = '[]';
90  end;
91  spostpr_test = listbox_get_selected_1stname(handles.popupmenu_postpr_test);
92  if isempty(spostpr_test)
93  spostpr_test = '[]';
94  end;
95  ssgs = listbox_get_selected_1stname(handles.popupmenu_sgs);
96  if isempty(ssgs)
97  ssgs = '[]';
98  end;
99 
100  handles.output.params = {...
101  'clssr', sclssr, ...
102  'estlog', sestlog, ...
103  'postpr_est', spostpr_est, ...
104  'postpr_test', spostpr_test, ...
105  'sgs', ssgs ...
106  };
107  handles.output.flag_ok = 1;
108  guidata(hObject, handles);
109  uiresume();
110 catch ME
111  irerrordlg(ME.message, 'Cannot continue');
112 
113 end;
114 
115 
116 % --- Executes on selection change in popupmenu_estlog.
117 function popupmenu_estlog_Callback(hObject, eventdata, handles)
118 
119 % --- Executes during object creation, after setting all properties.
120 function popupmenu_estlog_CreateFcn(hObject, eventdata, handles)
121 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
122  set(hObject,'BackgroundColor','white');
123 end
124 
125 % --- Executes on selection change in popupmenu_data.
126 function popupmenu_data_Callback(hObject, eventdata, handles)
127 
128 % --- Executes during object creation, after setting all properties.
129 function popupmenu_data_CreateFcn(hObject, eventdata, handles)
130 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
131  set(hObject,'BackgroundColor','white');
132 end
133 
134 % --- Executes on selection change in popupmenu_sgs.
135 function popupmenu_sgs_Callback(hObject, eventdata, handles)
136 
137 % --- Executes during object creation, after setting all properties.
138 function popupmenu_sgs_CreateFcn(hObject, eventdata, handles)
139 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
140  set(hObject,'BackgroundColor','white');
141 end
142 
143 % --- Executes on selection change in popupmenu_decider.
144 function popupmenu_decider_Callback(hObject, eventdata, handles)
145 
146 function popupmenu_decider_CreateFcn(hObject, eventdata, handles)
147 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
148  set(hObject,'BackgroundColor','white');
149 end
150 
151 function popupmenu_clssr_Callback(hObject, eventdata, handles)
152 
153 function popupmenu_clssr_CreateFcn(hObject, eventdata, handles)
154 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
155  set(hObject,'BackgroundColor','white');
156 end
157 
158 function popupmenu_postpr_test_Callback(hObject, eventdata, handles)
159 
160 function popupmenu_postpr_test_CreateFcn(hObject, eventdata, handles)
161 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
162  set(hObject,'BackgroundColor','white');
163 end
164 
165 function popupmenu_postpr_est_Callback(hObject, eventdata, handles)
166 
167 function popupmenu_postpr_est_CreateFcn(hObject, eventdata, handles)
168 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
169  set(hObject,'BackgroundColor','white');
170 end
171 
172 %> @endcond
Property postpr_test
(Optional) Block to post-process the test data. For example, a grag_classes_first.
Definition: fsg_clssr.m:18
Property sgs
SGS object. If set,.
Definition: fsg.m:15
function irerror(in s)
function listbox_get_selected_1stname(in h_listbox)
Property clssr
Definition: fsg_clssr.m:13
function listbox_load_from_workspace(in classname, in h_list, in flag_blank, in string_empty, in input)
FSG that uses classifier to grade the subsets.
Definition: fsg_clssr.m:8
function gui_set_position(in hObject)
Property postpr_est
Definition: fsg_clssr.m:23
function irerrordlg(in errorstring, in dlgname)
Property estlog
Definition: fsg_clssr.m:15