IRootLab
An Open-Source MATLAB toolbox for vibrational biospectroscopy
uip_ovrcurves.m
Go to the documentation of this file.
1 %>@file
2 %>@ingroup guigroup
3 %>@brief Properties Window for @ref blmisc_split_ovr
4 %> @sa blmisc_split_ovr
5 
6 %>@cond
7 function varargout = uip_ovrcurves(varargin)
8 % Begin initialization code - DO NOT EDIT
9 gui_Singleton = 1;
10 gui_State = struct('gui_Name', mfilename, ...
11  'gui_Singleton', gui_Singleton, ...
12  'gui_OpeningFcn', @uip_ovrcurves_OpeningFcn, ...
13  'gui_OutputFcn', @uip_ovrcurves_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 
28 %############################################
29 
30 %#########
31 function refresh(handles)
32 listbox_load_from_workspace('fsg', handles.popupmenu_fsg, 0);
33 
34 %############################################
35 
36 
37 %#####
38 function uip_ovrcurves_OpeningFcn(hObject, eventdata, handles, varargin)
39 if nargin > 4
40  % Dataset is expected as parameter
41  ds = varargin{2};
42  set(handles.text_caption, 'String', [get(handles.text_caption, 'String'), sprintf(' (number of levels in dataset: %d)', ds.get_no_levels)]);
43 end;
44 handles.output.flag_ok = 0;
45 guidata(hObject, handles);
46 gui_set_position(hObject);
47 refresh(handles);
48 
49 
50 %#####
51 function varargout = uip_ovrcurves_OutputFcn(hObject, eventdata, handles)
52 try
53  uiwait(handles.figure1);
54  handles = guidata(hObject);
55  varargout{1} = handles.output;
56  delete(gcf);
57 catch %#ok<*CTCH>
58  output.flag_ok = 0;
59  varargout{1} = output;
60 end;
61 
62 
63 %#####
64 function pushbuttonOk_Callback(hObject, eventdata, handles) %#ok<*INUSL>
65 
66 
67 try
68  idxs = eval(get(handles.edit_hierarchy, 'String'));
69  if ~isnumeric(idxs)
70  irerror('Please type in a numerical vector!');
71  end;
72 
73  idx_ref = eval(get(handles.edit_idx_ref, 'String'));
74  if ~isnumeric(idx_ref) || isempty(idx_ref) || idx_ref < 1
75  irerror('Reference index is invalid! Please enter a number >= 1');
76  end;
77 
78  sfsg = listbox_get_selected_1stname(handles.popupmenu_fsg);
79  if isempty(sfsg)
80  error('FSG not specified!');
81  end;
82 
83 
84  handles.output.params = {...
85  'hierarchy', mat2str(idxs), ...
86  'idx_ref', int2str(idx_ref), ...
87  'fsg', sfsg, ...
88  };
89  handles.output.flag_ok = 1;
90  guidata(hObject, handles);
91  uiresume();
92 catch ME
93  irerrordlg(ME.message, 'Cannot continue');
94 end;
95 
96 %--------------------------------------------------------------------------------------------------------------
97 
98 function edit_hierarchy_Callback(hObject, eventdata, handles) %#ok<*INUSD,*DEFNU>
99 function edit_hierarchy_CreateFcn(hObject, eventdata, handles)
100 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
101  set(hObject,'BackgroundColor','white');
102 end
103 function edit_idx_ref_Callback(hObject, eventdata, handles)
104 function edit_idx_ref_CreateFcn(hObject, eventdata, handles)
105 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
106  set(hObject,'BackgroundColor','white');
107 end
108 function popupmenu_fsg_Callback(hObject, eventdata, handles)
109 function popupmenu_fsg_CreateFcn(hObject, eventdata, handles)
110 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
111  set(hObject,'BackgroundColor','white');
112 end
113 %>@endcond
function irerror(in s)
function listbox_get_selected_1stname(in h_listbox)
function listbox_load_from_workspace(in classname, in h_list, in flag_blank, in string_empty, in input)
function gui_set_position(in hObject)
FSG - Feature Subset Grader.
Definition: fsg.m:6
Analysis Session (AS) base class.
Definition: as.m:6
function irerrordlg(in errorstring, in dlgname)
One-Versus-Reference dataset split class combination.