IRootLab
An Open-Source MATLAB toolbox for vibrational biospectroscopy
uip_estlog_groupxclass.m
Go to the documentation of this file.
1 %> @ingroup guigroup
2 %> @file
3 %> @brief Properties Window for @ref estlog_groupxclass
5 
6 %> @cond
7 function varargout = uip_estlog_groupxclass(varargin)
8 % Begin initialization code - DO NOT EDIT
9 gui_Singleton = 0;
10 gui_State = struct('gui_Name', mfilename, ...
11  'gui_Singleton', gui_Singleton, ...
12  'gui_OpeningFcn', @uip_estlog_groupxclass_OpeningFcn, ...
13  'gui_OutputFcn', @uip_estlog_groupxclass_OutputFcn, ...
14  'gui_LayoutFcn', [] , ...
15  'gui_Callback', []);
16 if nargin && ischar(varargin{1})
17  gui_State.gui_Callback = str2func(varargin{1});
18 end
19 
20 if nargout
21  [varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});
22 else
23  gui_mainfcn(gui_State, varargin{:});
24 end
25 % End initialization code - DO NOT EDIT
26 
27 % --- Executes just before uip_estlog_groupxclass is made visible.
28 function uip_estlog_groupxclass_OpeningFcn(hObject, eventdata, handles, varargin)
29 handles.output.flag_ok = 0;
30 guidata(hObject, handles);
31 gui_set_position(hObject);
32 
33 
34 % --- Outputs from this function are returned to the command line.
35 function varargout = uip_estlog_groupxclass_OutputFcn(hObject, eventdata, handles)
36 try
37  uiwait(handles.figure1);
38  handles = guidata(hObject); % Handles is not a handle(!), so gotta retrieve it again to see changes in .output
39  varargout{1} = handles.output;
40  delete(gcf);
41 catch
42  output.flag_ok = 0;
43  output.params = {};
44  varargout{1} = output;
45 end;
46 
47 
48 
49 % --- Executes on button press in pushbuttonOk.
50 function pushbuttonOk_Callback(hObject, eventdata, handles)
51 try
52  handles.output.params = {...
53  'groupcodes', get(handles.edit_groupcodes, 'String'), ...
54  'estlabels', get(handles.edit_estlabels, 'String'), ...
55  'flag_support', int2str(get(handles.checkbox_flag_support, 'Value')) ...
56  };
57  handles.output.flag_ok = 1;
58  guidata(hObject, handles);
59  uiresume();
60 catch ME
61  irerrordlg(ME.message, 'Cannot continue');
62 
63 end;
64 
65 % --- Executes on selection change in popupmenu_ratemode.
66 function popupmenu_ratemode_Callback(hObject, eventdata, handles)
67 local_show_description(handles, handles.popupmenu_ratemode);
68 
69 % --- Executes during object creation, after setting all properties.
70 function popupmenu_ratemode_CreateFcn(hObject, eventdata, handles)
71 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
72  set(hObject,'BackgroundColor','white');
73 end
74 
75 function edit_idx_rate_Callback(hObject, eventdata, handles)
76 
77 % --- Executes during object creation, after setting all properties.
78 function edit_idx_rate_CreateFcn(hObject, eventdata, handles)
79 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
80  set(hObject,'BackgroundColor','white');
81 end
82 
83 
84 
85 function edit_groupcodes_Callback(hObject, eventdata, handles)
86 
87 
88 % --- Executes during object creation, after setting all properties.
89 function edit_groupcodes_CreateFcn(hObject, eventdata, handles)
90 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
91  set(hObject,'BackgroundColor','white');
92 end
93 
94 
95 function edit_estlabels_Callback(hObject, eventdata, handles)
96 
97 % --- Executes during object creation, after setting all properties.
98 function edit_estlabels_CreateFcn(hObject, eventdata, handles)
99 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
100  set(hObject,'BackgroundColor','white');
101 end
102 
103 
104 % --- Executes on button press in pushbutton_pick_test.
105 function pushbutton_pick_test_Callback(hObject, eventdata, handles)
106 ouch = ask_dataset([], 'Dataset to pick class labels from', 0);
107 if ouch.flag_ok
108  set(handles.edit_groupcodes, 'String', ['unique(', ouch.params{2}, '.groupcodes)']);
109 end;
110 
111 
112 % --- Executes on button press in pushbutton_pick_est.
113 function pushbutton_pick_est_Callback(hObject, eventdata, handles)
114 ouch = ask_dataset([], 'Dataset to pick class labels from', 0);
115 if ouch.flag_ok
116  set(handles.edit_estlabels, 'String', [ouch.params{2}, '.classlabels']);
117 end;
118 function checkbox_flag_support_Callback(hObject, eventdata, handles)
119 %> @endcond
function gui_set_position(in hObject)
Records (test group)x([rejected, estimation class]) hits.
function irerrordlg(in errorstring, in dlgname)
function ask_dataset(in varargin)