IRootLab
An Open-Source MATLAB toolbox for vibrational biospectroscopy
uip_sgs.m
Go to the documentation of this file.
1 %> @ingroup guigroup
2 %> @file
3 %> @brief Properties Window common to all @ref sgs classes
4 %>
5 %> @image html Screenshot-uip_sgs.png
6 %>
7 %> <b>Always keep together rows from the same group</b> - see sgs::flag_group
8 %>
9 %> <b>Perform on each class separately, then merge</b> - see sgs::flag_perclass
10 %>
11 %> <b>Random sees</b> - see sgs::randomseed
12 %>
13 %> @sa @ref sgs
14 %
15 %> @cond
16 function varargout = uip_sgs(varargin)
17 % Last Modified by GUIDE v2.5 06-May-2011 17:25:22
18 
19 % Begin initialization code - DO NOT EDIT
20 gui_Singleton = 1;
21 gui_State = struct('gui_Name', mfilename, ...
22  'gui_Singleton', gui_Singleton, ...
23  'gui_OpeningFcn', @uip_sgs_OpeningFcn, ...
24  'gui_OutputFcn', @uip_sgs_OutputFcn, ...
25  'gui_LayoutFcn', [] , ...
26  'gui_Callback', []);
27 if nargin && ischar(varargin{1})
28  gui_State.gui_Callback = str2func(varargin{1});
29 end
30 
31 if nargout
32  [varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});
33 else
34  gui_mainfcn(gui_State, varargin{:});
35 end
36 % End initialization code - DO NOT EDIT
37 
38 
39 % --- Executes just before uip_sgs is made visible.
40 function uip_sgs_OpeningFcn(hObject, eventdata, handles, varargin)
41 handles.output.flag_ok = 0;
42 guidata(hObject, handles);
43 gui_set_position(hObject);
44 
45 % --- Outputs from this function are returned to the command clae.
46 function varargout = uip_sgs_OutputFcn(hObject, eventdata, handles)
47 try
48  uiwait(handles.figure1);
49  handles = guidata(hObject);
50  varargout{1} = handles.output;
51  delete(gcf);
52 catch
53  output.flag_ok = 0;
54  output.params = {};
55  varargout{1} = output;
56 end;
57 
58 function editReg_Callback(hObject, eventdata, handles)
59 
60 % --- Executes during object creation, after setting all properties.
61 function editReg_CreateFcn(hObject, eventdata, handles)
62 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
63  set(hObject,'BackgroundColor','white');
64 end
65 
66 % --- Executes on button press in pushbuttonOk.
67 function pushbuttonOk_Callback(hObject, eventdata, handles)
68 try
69  handles.output.params = {...
70  'flag_group', int2str(get(handles.checkbox_flag_group, 'Value')), ...
71  'flag_perclass', int2str(get(handles.checkbox_flag_perclass, 'Value')), ...
72  'randomseed', num2str(eval(get(handles.edit_randomseed, 'String'))), ...
73  };
74  handles.output.flag_ok = 1;
75  guidata(hObject, handles);
76  uiresume();
77 catch ME
78  irerrordlg(ME.message, 'Cannot continue');
79 
80 end;
81 
82 % --- Executes on button press in checkbox_flag_group.
83 function checkbox_flag_group_Callback(hObject, eventdata, handles)
84 
85 % --- Executes on button press in checkbox_flag_perclass.
86 function checkbox_flag_perclass_Callback(hObject, eventdata, handles)
87 
88 function edit_randomseed_Callback(hObject, eventdata, handles)
89 
90 % --- Executes during object creation, after setting all properties.
91 function edit_randomseed_CreateFcn(hObject, eventdata, handles)
92 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
93  set(hObject,'BackgroundColor','white');
94 end
95 %> @endcond
Base Sub-dataset Generation Specification (SGS) class.
Definition: sgs.m:6
Property flag_group
=0. Whether items from the same group (group) are to always remain together.
Definition: sgs.m:12
function gui_set_position(in hObject)
function irerrordlg(in errorstring, in dlgname)
Property randomseed
Definition: sgs.m:19