IRootLab
An Open-Source MATLAB toolbox for vibrational biospectroscopy
uip_logrecorder.m
Go to the documentation of this file.
1 %> @ingroup guigroup
2 %> @file
3 %> @brief Log recorder Properties Window
4 %> @sa @ref logrecorder
5 
6 
7 %> @cond
8 function varargout = uip_logrecorder(varargin)
9 % Last Modified by GUIDE v2.5 09-Nov-2012 18:13:16
10 
11 % Begin initialization code - DO NOT EDIT
12 gui_Singleton = 1;
13 gui_State = struct('gui_Name', mfilename, ...
14  'gui_Singleton', gui_Singleton, ...
15  'gui_OpeningFcn', @uip_logrecorder_OpeningFcn, ...
16  'gui_OutputFcn', @uip_logrecorder_OutputFcn, ...
17  'gui_LayoutFcn', [] , ...
18  'gui_Callback', []);
19 if nargin && ischar(varargin{1})
20  gui_State.gui_Callback = str2func(varargin{1});
21 end
22 
23 if nargout
24  [varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});
25 else
26  gui_mainfcn(gui_State, varargin{:});
27 end
28 % End initialization code - DO NOT EDIT
29 
30 
31 % --- Executes just before uip_logrecorder is made visible.
32 function uip_logrecorder_OpeningFcn(hObject, eventdata, handles, varargin)
33 handles.output.flag_ok = 0;
34 guidata(hObject, handles);
35 gui_set_position(hObject);
36 refresh(handles);
37 
38 % --- Outputs from this function are returned to the command clae.
39 function varargout = uip_logrecorder_OutputFcn(hObject, eventdata, handles) %#ok<*INUSL>
40 try
41  uiwait(handles.figure1);
42  handles = guidata(hObject);
43  varargout{1} = handles.output;
44  delete(gcf);
45 catch %#ok<*CTCH>
46  output.flag_ok = 0;
47  output.params = {};
48  varargout{1} = output;
49 end;
50 
51 
52 %############################################
53 
54 %#########
55 function refresh(handles)
56 listbox_load_from_workspace('block', handles.popupmenu_postpr_test, 1);
57 listbox_load_from_workspace('irdata', handles.popupmenu_ds_test, 1);
58 listbox_load_from_workspace('ttlog', handles.popupmenu_estlog, 1);
59 listbox_load_from_workspace('block', handles.popupmenu_postpr_est, 1);
60 listbox_load_from_workspace({'clssr', 'block_cascade_base'}, handles.popupmenu_clssr, 1);
61 
62 
63 %############################################
64 %############################################
65 
66 % --- Executes on button press in pushbuttonOK.
67 function pushbuttonOK_Callback(hObject, eventdata, handles)
68 try
69  sclssr = listbox_get_selected_1stname(handles.popupmenu_clssr);
70  if isempty(sclssr)
71  sclssr = '[]';
72  end;
73  sds_test = listbox_get_selected_1stname(handles.popupmenu_ds_test);
74  if isempty(sds_test)
75  sds_test = '[]';
76  end;
77  sestlog = listbox_get_selected_1stname(handles.popupmenu_estlog);
78  if isempty(sestlog)
79  sestlog = '[]';
80  end;
81  spostpr_test = listbox_get_selected_1stname(handles.popupmenu_postpr_test);
82  if isempty(spostpr_test)
83  spostpr_test = '[]';
84  end;
85  spostpr_est = listbox_get_selected_1stname(handles.popupmenu_postpr_est);
86  if isempty(spostpr_est)
87  spostpr_est = '[]';
88  end;
89 
90  handles.output.params = {...
91  'clssr', sclssr, ...
92  'ds_test', sds_test, ...
93  'ttlog', sestlog, ...
94  'postpr_est', spostpr_est, ...
95  'postpr_test', spostpr_test ...
96  };
97  handles.output.flag_ok = 1;
98  guidata(hObject, handles);
99  uiresume();
100 catch ME
101  irerrordlg(ME.message, 'Cannot continue');
102 
103 end;
104 
105 
106 function popupmenu_estlog_Callback(hObject, eventdata, handles)
107 function popupmenu_estlog_CreateFcn(hObject, eventdata, handles)
108 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
109  set(hObject,'BackgroundColor','white');
110 end
111 function popupmenu_postpr_test_Callback(hObject, eventdata, handles)
112 function popupmenu_postpr_test_CreateFcn(hObject, eventdata, handles)
113 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
114  set(hObject,'BackgroundColor','white');
115 end
116 function popupmenu_ds_test_Callback(hObject, eventdata, handles)
117 function popupmenu_ds_test_CreateFcn(hObject, eventdata, handles)
118 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
119  set(hObject,'BackgroundColor','white');
120 end
121 function popupmenu_postpr_est_Callback(hObject, eventdata, handles)
122 function popupmenu_postpr_est_CreateFcn(hObject, eventdata, handles)
123 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
124  set(hObject,'BackgroundColor','white');
125 end
126 function popupmenu_clssr_Callback(hObject, eventdata, handles)
127 function popupmenu_clssr_CreateFcn(hObject, eventdata, handles) %#ok<*INUSD,*DEFNU>
128 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
129  set(hObject,'BackgroundColor','white');
130 end
131 %> @endcond
Dataset class.
Definition: irdata.m:30
function listbox_get_selected_1stname(in h_listbox)
Base Block class.
Definition: block.m:2
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)
Used to record a ttlog based on test and estimation data.
Definition: logrecorder.m:4
Train-Test Log.
Definition: ttlog.m:4