IRootLab
An Open-Source MATLAB toolbox for vibrational biospectroscopy
uip_as_grades_fsg.m
Go to the documentation of this file.
1 %> @ingroup guigroup
2 %> @file
3 %> @brief Properties Window for @ref as_grades_fsg
4 %> @sa as_grades_fsg
5 
6 %> @cond
7 function varargout = uip_as_grades_fsg(varargin)
8 % Last Modified by GUIDE v2.5 26-Aug-2012 00:54:49
9 
10 % Begin initialization code - DO NOT EDIT
11 gui_Singleton = 1;
12 gui_State = struct('gui_Name', mfilename, ...
13  'gui_Singleton', gui_Singleton, ...
14  'gui_OpeningFcn', @uip_as_grades_fsg_OpeningFcn, ...
15  'gui_OutputFcn', @uip_as_grades_fsg_OutputFcn, ...
16  'gui_LayoutFcn', [] , ...
17  'gui_Callback', []);
18 if nargin && ischar(varargin{1})
19  gui_State.gui_Callback = str2func(varargin{1});
20 end
21 
22 if nargout
23  [varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});
24 else
25  gui_mainfcn(gui_State, varargin{:});
26 end
27 % End initialization code - DO NOT EDIT
28 
29 % --- Executes just before uip_as_grades_fsg is made visible.
30 function uip_as_grades_fsg_OpeningFcn(hObject, eventdata, handles, varargin) %#ok<*INUSL>
31 if numel(varargin) < 3
32  handles.input.flag_needs_fsg = 0;
33 else
34  handles.input.flag_needs_fsg = varargin{3};
35 end;
36 handles.output.flag_ok = 0;
37 guidata(hObject, handles);
38 gui_set_position(hObject);
39 refresh(handles);
40 
41 % --- Outputs from this function are returned to the command clae.
42 function varargout = uip_as_grades_fsg_OutputFcn(hObject, eventdata, handles)
43 try
44  uiwait(handles.figure1);
45  handles = guidata(hObject);
46  varargout{1} = handles.output;
47  delete(gcf);
48 catch
49  output.flag_ok = 0;
50  output.params = {};
51  varargout{1} = output;
52 end;
53 
54 %############################################
55 
56 %#########
57 function refresh(handles)
58 listbox_load_from_workspace('fsg', handles.popupmenu_fsg, 0);
59 
60 %############################################
61 %############################################
62 
63 
64 % --- Executes on button press in pushbuttonOk.
65 function pushbuttonOk_Callback(hObject, eventdata, handles) %#ok<*DEFNU>
66 try
67  sfsg = listbox_get_selected_1stname(handles.popupmenu_fsg);
68  if isempty(sfsg)
69  irerror('FSG not specified!');
70  end;
71 
72  handles.output.params = {...
73  'fsg', sfsg, ...
74  };
75  handles.output.flag_ok = 1;
76  guidata(hObject, handles);
77  uiresume();
78 catch ME
79  irerrordlg(ME.message, 'Cannot continue');
80 
81 end;
82 
83 function editVariables_Callback(hObject, eventdata, handles) %#ok<*INUSD>
84 
85 % --- Executes during object creation, after setting all properties.
86 function editVariables_CreateFcn(hObject, eventdata, handles)
87 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
88  set(hObject,'BackgroundColor','white');
89 end
90 
91 % --- Executes on selection change in popupmenuType.
92 function popupmenuType_Callback(hObject, eventdata, handles)
93 
94 % --- Executes during object creation, after setting all properties.
95 function popupmenuType_CreateFcn(hObject, eventdata, handles)
96 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
97  set(hObject,'BackgroundColor','white');
98 end
99 
100 function editNf_Callback(hObject, eventdata, handles)
101 
102 % --- Executes during object creation, after setting all properties.
103 function editNf_CreateFcn(hObject, eventdata, handles)
104 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
105  set(hObject,'BackgroundColor','white');
106 end
107 
108 function editThreshold_Callback(hObject, eventdata, handles)
109 
110 % --- Executes during object creation, after setting all properties.
111 function editThreshold_CreateFcn(hObject, eventdata, handles)
112 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
113  set(hObject,'BackgroundColor','white');
114 end
115 
116 function popupmenuFsg_Callback(hObject, eventdata, handles)
117 
118 function popupmenuFsg_CreateFcn(hObject, eventdata, handles)
119 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
120  set(hObject,'BackgroundColor','white');
121 end
122 
123 
124 function popupmenu_fsg_Callback(hObject, eventdata, handles)
125 
126 function popupmenu_fsg_CreateFcn(hObject, eventdata, handles)
127 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
128  set(hObject,'BackgroundColor','white');
129 end
130 
131 function checkbox_flag_optimize_Callback(hObject, eventdata, handles)
132 function popupmenu_data_Callback(hObject, eventdata, handles)
133 function popupmenu_data_CreateFcn(hObject, eventdata, handles)
134 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
135  set(hObject,'BackgroundColor','white');
136 end
137 %> @endcond
Calculates grades using a Feature Subset Grader (FSG) object.
Definition: as_grades_fsg.m:2
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
function irerrordlg(in errorstring, in dlgname)