IRootLab
An Open-Source MATLAB toolbox for vibrational biospectroscopy
uip_aggr.m
Go to the documentation of this file.
1 %> @ingroup guigroup
2 %> @file
3 %> @brief Properties Window for @ref aggr
4 %>
5 %> <b>Estimaton aggregator</b> - see aggr::esag
6 %>
7 %> <b>Record the estimations from the individual component classifiers<b> - see aggr::flag_ests
8 %>
9 %> @sa @ref aggr
10 
11 %> @cond
12 function varargout = uip_aggr(varargin)
13 % Begin initialization code - DO NOT EDIT
14 gui_Singleton = 0;
15 gui_State = struct('gui_Name', mfilename, ...
16  'gui_Singleton', gui_Singleton, ...
17  'gui_OpeningFcn', @uip_aggr_OpeningFcn, ...
18  'gui_OutputFcn', @uip_aggr_OutputFcn, ...
19  'gui_LayoutFcn', [] , ...
20  'gui_Callback', []);
21 if nargin && ischar(varargin{1})
22  gui_State.gui_Callback = str2func(varargin{1});
23 end
24 
25 if nargout
26  [varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});
27 else
28  gui_mainfcn(gui_State, varargin{:});
29 end
30 % End initialization code - DO NOT EDIT
31 
32 % --- Executes just before uip_aggr is made visible.
33 function uip_aggr_OpeningFcn(hObject, eventdata, handles, varargin)
34 handles.output.flag_ok = 0;
35 guidata(hObject, handles);
36 gui_set_position(hObject);
37 listbox_load_from_workspace('esag', handles.popupmenu_esag, 1);
38 
39 
40 % --- Outputs from this function are returned to the command line.
41 function varargout = uip_aggr_OutputFcn(hObject, eventdata, handles)
42 try
43  uiwait(handles.figure1);
44  handles = guidata(hObject); % Handles is not a handle(!), so gotta retrieve it again to see changes in .output
45  varargout{1} = handles.output;
46  delete(gcf);
47 catch
48  output.flag_ok = 0;
49  output.params = {};
50  varargout{1} = output;
51 end;
52 
53 
54 
55 % --- Executes on button press in pushbuttonOk.
56 function pushbuttonOk_Callback(hObject, eventdata, handles)
57 try
58  sesag = listbox_get_selected_1stname(handles.popupmenu_esag);
59  if isempty(sesag)
60  sesag = '[]';
61  end;
62 
63  handles.output.params = {...
64  'esag', sesag, ...
65  'flag_ests', int2str(get(handles.checkbox_flag_ests, 'Value')) ...
66  };
67  handles.output.flag_ok = 1;
68  guidata(hObject, handles);
69  uiresume();
70 catch ME
71  irerrordlg(ME.message, 'Cannot continue');
72 
73 end;
74 
75 % --- Executes on selection change in popupmenu_esag.
76 function popupmenu_esag_Callback(hObject, eventdata, handles)
77 
78 % --- Executes during object creation, after setting all properties.
79 function popupmenu_esag_CreateFcn(hObject, eventdata, handles)
80 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
81  set(hObject,'BackgroundColor','white');
82 end
83 
84 function edit_no_bagreps_Callback(hObject, eventdata, handles)
85 
86 % --- Executes during object creation, after setting all properties.
87 function edit_no_bagreps_CreateFcn(hObject, eventdata, handles)
88 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
89  set(hObject,'BackgroundColor','white');
90 end
91 
92 
93 % --- Executes on button press in checkbox_flag_ests.
94 function checkbox_flag_ests_Callback(hObject, eventdata, handles)
95 %> @endcond
Base class for all ensemble classifiers.
Definition: aggr.m:6
Property flag_ests
=0. Whether to record the estimations of the component classifiers into the object (o ) itself in the...
Definition: aggr.m:15
function listbox_get_selected_1stname(in h_listbox)
Estimation Aggregator - combines estimato objects together.
Definition: esag.m:2
Property esag
=esag_linear1. Estimation Aggregator object
Definition: aggr.m:12
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)