IRootLab
An Open-Source MATLAB toolbox for vibrational biospectroscopy
uip_reptt_hiesplit.m
Go to the documentation of this file.
1 %> @ingroup guigroup
2 %> @file
3 %> @brief Properties Window for a reptt_hiesplit
4 %> @image html Screenshot-uip_reptt_hiesplit.png
5 %>
6 %> <b>Test Dataset</b> - see reptt_hiesplit::data_test
7 %>
8 %> <b>Number of repetitions</b> - see reptt_hiesplit::no_reps
9 %>
10 %> <b>Class levels to use for splitting</b> - see reptt_hiesplit::hie_split
11 %>
12 %> <b>Class levels to use for classification</b> - see reptt_hiesplit::hie_classify
13 %>
14 %> <b>Random seed</b> - see reptt_hiesplit::randomseed
15 %>
16 %> @sa reptt_hiesplit
17 
18 %> @cond
19 function varargout = uip_reptt_hiesplit(varargin)
20 % Begin initialization code - DO NOT EDIT
21 gui_Singleton = 0;
22 gui_State = struct('gui_Name', mfilename, ...
23  'gui_Singleton', gui_Singleton, ...
24  'gui_OpeningFcn', @uip_reptt_hiesplit_OpeningFcn, ...
25  'gui_OutputFcn', @uip_reptt_hiesplit_OutputFcn, ...
26  'gui_LayoutFcn', [] , ...
27  'gui_Callback', []);
28 if nargin && ischar(varargin{1})
29  gui_State.gui_Callback = str2func(varargin{1});
30 end
31 
32 if nargout
33  [varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});
34 else
35  gui_mainfcn(gui_State, varargin{:});
36 end
37 % End initialization code - DO NOT EDIT
38 
39 % --- Executes just before uip_reptt_hiesplit is made visible.
40 function uip_reptt_hiesplit_OpeningFcn(hObject, eventdata, handles, varargin)
41 handles.output.flag_ok = 0;
42 guidata(hObject, handles);
43 gui_set_position(hObject);
44 listbox_load_from_workspace('irdata', handles.popupmenu_data_test, 0);
45 
46 
47 % --- Outputs from this function are returned to the command line.
48 function varargout = uip_reptt_hiesplit_OutputFcn(hObject, eventdata, handles)
49 try
50  uiwait(handles.figure1);
51  handles = guidata(hObject); % Handles is not a handle(!), so gotta retrieve it again to see changes in .output
52  varargout{1} = handles.output;
53  delete(gcf);
54 catch
55  output.flag_ok = 0;
56  output.params = {};
57  varargout{1} = output;
58 end;
59 
60 
61 
62 % --- Executes on button press in pushbuttonOk.
63 function pushbuttonOk_Callback(hObject, eventdata, handles)
64 try
65  sdata_test = listbox_get_selected_1stname(handles.popupmenu_data_test);
66  if isempty(sdata_test)
67  error('Test dataset not specified!');
68  end;
69 
70  other = uip_reptt();
71  if other.flag_ok
72  handles.output.params = [other.params, {...
73  'data_test', sdata_test, ...
74  'no_reps', int2str(eval(get(handles.edit_no_reps, 'String'))), ...
75  'hie_split', mat2str(eval(get(handles.edit_hie_split, 'String'))), ...
76  'hie_classify', mat2str(eval(get(handles.edit_hie_classify, 'String'))), ...
77  'randomseed', num2str(eval(get(handles.edit_randomseed, 'String'))) ...
78  }];
79  handles.output.flag_ok = 1;
80  guidata(hObject, handles);
81  uiresume();
82  end;
83 catch ME
84  irerrordlg(ME.message, 'Cannot continue');
85 
86 end;
87 
88 % --- Executes on selection change in popupmenu_data_test.
89 function popupmenu_data_test_Callback(hObject, eventdata, handles)
90 
91 % --- Executes during object creation, after setting all properties.
92 function popupmenu_data_test_CreateFcn(hObject, eventdata, handles)
93 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
94  set(hObject,'BackgroundColor','white');
95 end
96 
97 function edit_no_reps_Callback(hObject, eventdata, handles)
98 
99 % --- Executes during object creation, after setting all properties.
100 function edit_no_reps_CreateFcn(hObject, eventdata, handles)
101 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
102  set(hObject,'BackgroundColor','white');
103 end
104 
105 function edit_hie_split_Callback(hObject, eventdata, handles)
106 
107 % --- Executes during object creation, after setting all properties.
108 function edit_hie_split_CreateFcn(hObject, eventdata, handles)
109 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
110  set(hObject,'BackgroundColor','white');
111 end
112 
113 function edit_hie_classify_Callback(hObject, eventdata, handles)
114 
115 % --- Executes during object creation, after setting all properties.
116 function edit_hie_classify_CreateFcn(hObject, eventdata, handles)
117 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
118  set(hObject,'BackgroundColor','white');
119 end
120 
121 
122 function edit_randomseed_Callback(hObject, eventdata, handles)
123 
124 % --- Executes during object creation, after setting all properties.
125 function edit_randomseed_CreateFcn(hObject, eventdata, handles)
126 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
127  set(hObject,'BackgroundColor','white');
128 end
129 %> @endcond
Property data_test
Test dataset.
Dataset class.
Definition: irdata.m:30
function listbox_get_selected_1stname(in h_listbox)
Hierarchical split.
Property hie_split
=1 . Class levels to use at splitting the dataset
function listbox_load_from_workspace(in classname, in h_list, in flag_blank, in string_empty, in input)
function gui_set_position(in hObject)
Property no_reps
Property randomseed
if > 0, MATLAB's rand('twister', o.randseed) will be called before. This can be used to repeat sequen...
function irerrordlg(in errorstring, in dlgname)
Property hie_classify
=2 . Class levels to use at selecting the relevant classes for classification