IRootLab
An Open-Source MATLAB toolbox for vibrational biospectroscopy
uip_aggr_mold.m
Go to the documentation of this file.
1 %> @ingroup guigroup
2 %> @file
3 %> @brief Properties Window for @ref aggr_mold
4 %>
5 %> <b>Mold classifier</b> - see aggr_mold::block_mold
6 %>
7 %> @sa @ref aggr_mold
8 
9 %> @cond
10 function varargout = uip_aggr_mold(varargin)
11 % Last Modified by GUIDE v2.5 16-Jan-2012 22:21:15
12 
13 % Begin initialization code - DO NOT EDIT
14 gui_Singleton = 1;
15 gui_State = struct('gui_Name', mfilename, ...
16  'gui_Singleton', gui_Singleton, ...
17  'gui_OpeningFcn', @uip_aggr_mold_OpeningFcn, ...
18  'gui_OutputFcn', @uip_aggr_mold_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 
33 % --- Executes just before uip_aggr_mold is made visible.
34 function uip_aggr_mold_OpeningFcn(hObject, eventdata, handles, varargin)
35 handles.output.flag_ok = 0;
36 guidata(hObject, handles);
37 gui_set_position(hObject);
38 refresh(handles);
39 
40 % --- Outputs from this function are returned to the command clae.
41 function varargout = uip_aggr_mold_OutputFcn(hObject, eventdata, handles)
42 try
43  uiwait(handles.figure1);
44  handles = guidata(hObject);
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 
56 %#########
57 function refresh(handles)
58 listbox_load_from_workspace({'clssr', 'block_cascade_base'}, handles.popupmenu_clssr, 0);
59 
60 
61 %############################################
62 %############################################
63 
64 % --- Executes on button press in pushbuttonOK.
65 function pushbuttonOK_Callback(hObject, eventdata, handles)
66 try
67  sclssr = listbox_get_selected_1stname(handles.popupmenu_clssr);
68  if isempty(sclssr)
69  sclssr = '[]';
70  end;
71  ssgs = listbox_get_selected_1stname(handles.popupmenu_sgs);
72  if isempty(ssgs)
73  ssgs = '[]';
74  end;
75 
76  other = uip_aggr();
77  if other.flag_ok
78  handles.output.params = [other.params, {...
79  'block_mold', sclssr ...
80  }];
81  handles.output.flag_ok = 1;
82  guidata(hObject, handles);
83  uiresume();
84  end;
85 catch ME
86  irerrordlg(ME.message, 'Cannot continue');
87 
88 end;
89 
90 
91 % --- Executes on selection change in popupmenu_clssr.
92 function popupmenu_clssr_Callback(hObject, eventdata, handles)
93 
94 
95 % --- Executes during object creation, after setting all properties.
96 function popupmenu_clssr_CreateFcn(hObject, eventdata, handles)
97 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
98  set(hObject,'BackgroundColor','white');
99 end
100 
101 %> @endcond
function listbox_get_selected_1stname(in h_listbox)
Property block_mold
This can either be a single block or a cell of blocks.
Definition: aggr_mold.m:10
function listbox_load_from_workspace(in classname, in h_list, in flag_blank, in string_empty, in input)
Fixed, pre-determined components.
Definition: aggr_mold.m:4
function gui_set_position(in hObject)
function irerrordlg(in errorstring, in dlgname)