IRootLab
An Open-Source MATLAB toolbox for vibrational biospectroscopy
uip_blmisc_split_ovr.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_blmisc_split_ovr(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_blmisc_split_ovr_OpeningFcn, ...
13  'gui_OutputFcn', @uip_blmisc_split_ovr_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 function uip_blmisc_split_ovr_OpeningFcn(hObject, eventdata, handles, varargin)
30 if nargin > 4
31  % Dataset is expected as parameter
32  ds = varargin{2};
33  set(handles.text_caption, 'String', [get(handles.text_caption, 'String'), sprintf(' (number of levels in dataset: %d)', ds.get_no_levels)]);
34 end;
35 handles.output.flag_ok = 0;
36 guidata(hObject, handles);
37 gui_set_position(hObject);
38 
39 
40 %#####
41 function varargout = uip_blmisc_split_ovr_OutputFcn(hObject, eventdata, handles)
42 try
43  uiwait(handles.figure1);
44  handles = guidata(hObject);
45  varargout{1} = handles.output;
46  delete(gcf);
47 catch %#ok<*CTCH>
48  output.flag_ok = 0;
49  varargout{1} = output;
50 end;
51 
52 
53 %#####
54 function pushbuttonOk_Callback(hObject, eventdata, handles) %#ok<*INUSL>
55 
56 
57 try
58  idxs = eval(get(handles.edit_hierarchy, 'String'));
59  if ~isnumeric(idxs)
60  irerror('Please type in a numerical vector!');
61  end;
62 
63  idx_ref = eval(get(handles.edit_idx_ref, 'String'));
64  if ~isnumeric(idx_ref) || isempty(idx_ref) || idx_ref < 1
65  irerror('Reference index is invalid! Please enter a number >= 1');
66  end;
67 
68  handles.output.params = {...
69  'hierarchy', mat2str(idxs), ...
70  'idx_ref', int2str(idx_ref), ...
71  };
72  handles.output.flag_ok = 1;
73  guidata(hObject, handles);
74  uiresume();
75 catch ME
76  irerrordlg(ME.message, 'Cannot continue');
77 end;
78 
79 %--------------------------------------------------------------------------------------------------------------
80 
81 function edit_hierarchy_Callback(hObject, eventdata, handles) %#ok<*INUSD,*DEFNU>
82 function edit_hierarchy_CreateFcn(hObject, eventdata, handles)
83 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
84  set(hObject,'BackgroundColor','white');
85 end
86 function edit_idx_ref_Callback(hObject, eventdata, handles)
87 function edit_idx_ref_CreateFcn(hObject, eventdata, handles)
88 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
89  set(hObject,'BackgroundColor','white');
90 end
91 %>@endcond
function irerror(in s)
function gui_set_position(in hObject)
Analysis Session (AS) base class.
Definition: as.m:6
function irerrordlg(in errorstring, in dlgname)
One-Versus-Reference dataset split class combination.