IRootLab
An Open-Source MATLAB toolbox for vibrational biospectroscopy
uip_aggr_pairs.m
Go to the documentation of this file.
1 %> @ingroup guigroup
2 %> @file
3 %> @brief Properties Window for @ref aggr_bag
4 %> @image html Screenshot-uip_aggr_pairs.png
5 %>
6 %> <b>Mold classifier</b> - see aggr_pairs::block_mold
7 %>
8 %> @sa @ref aggr_pairs
9 
10 %> @cond
11 function varargout = uip_aggr_pairs(varargin)
12 % Last Modified by GUIDE v2.5 03-Sep-2011 13:30:08
13 
14 % Begin initialization code - DO NOT EDIT
15 gui_Singleton = 1;
16 gui_State = struct('gui_Name', mfilename, ...
17  'gui_Singleton', gui_Singleton, ...
18  'gui_OpeningFcn', @uip_aggr_pairs_OpeningFcn, ...
19  'gui_OutputFcn', @uip_aggr_pairs_OutputFcn, ...
20  'gui_LayoutFcn', [] , ...
21  'gui_Callback', []);
22 if nargin && ischar(varargin{1})
23  gui_State.gui_Callback = str2func(varargin{1});
24 end
25 
26 if nargout
27  [varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});
28 else
29  gui_mainfcn(gui_State, varargin{:});
30 end
31 % End initialization code - DO NOT EDIT
32 
33 
34 % --- Executes just before uip_aggr_pairs is made visible.
35 function uip_aggr_pairs_OpeningFcn(hObject, eventdata, handles, varargin)
36 handles.output.flag_ok = 0;
37 guidata(hObject, handles);
38 gui_set_position(hObject);
39 refresh(handles);
40 
41 % --- Outputs from this function are returned to the command clae.
42 function varargout = uip_aggr_pairs_OutputFcn(hObject, eventdata, handles)
43 try
44  uiwait(handles.figure1);
45  handles = guidata(hObject);
46  varargout{1} = handles.output;
47  delete(gcf);
48 catch
49  output.flag_ok = 0;
50  output.params = {};
51  varargout{1} = output;
52 end;
53 
54 
55 %############################################
56 
57 %#########
58 function refresh(handles)
59 listbox_load_from_workspace({'clssr', 'block_cascade_base'}, handles.popupmenu_clssr, 0);
60 
61 
62 %############################################
63 %############################################
64 
65 % --- Executes on button press in pushbuttonOK.
66 function pushbuttonOK_Callback(hObject, eventdata, handles)
67 try
68  sclssr = listbox_get_selected_1stname(handles.popupmenu_clssr);
69  if isempty(sclssr)
70  sclssr = '[]';
71  end;
72 
73  other = uip_aggr();
74  if other.flag_ok
75  handles.output.params = [other.params, {...
76  'block_mold', sclssr ...
77  }];
78  handles.output.flag_ok = 1;
79  guidata(hObject, handles);
80  uiresume();
81  end;
82 catch ME
83  irerrordlg(ME.message, 'Cannot continue');
84 
85 end;
86 
87 % --- Executes on selection change in popupmenu_clssr.
88 function popupmenu_clssr_Callback(hObject, eventdata, handles)
89 
90 % --- Executes during object creation, after setting all properties.
91 function popupmenu_clssr_CreateFcn(hObject, eventdata, handles)
92 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
93  set(hObject,'BackgroundColor','white');
94 end
95 
96 %> @endcond
Pairwise classifier.
Definition: aggr_pairs.m:7
function listbox_get_selected_1stname(in h_listbox)
Bagging ensemble.
Definition: aggr_bag.m:9
Property block_mold
Definition: aggr_pairs.m:13
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)