IRootLab
An Open-Source MATLAB toolbox for vibrational biospectroscopy
uip_vis_featuregrades.m
Go to the documentation of this file.
1 %> @ingroup guigroup
2 %> @file
3 %> @brief Properties Dialog for @ref vis_featuregrades
4 %>
5 %> <b>FSG</b> - see vis_featuregrades::fsg
6 %>
7 %> @image html Screenshot-uip_vis_featuregrades.png
8 %>
10 
11 %> @cond
12 function varargout = uip_vis_featuregrades(varargin)
13 % Last Modified by GUIDE v2.5 05-Sep-2011 14:52:44
14 
15 % Begin initialization code - DO NOT EDIT
16 gui_Singleton = 1;
17 gui_State = struct('gui_Name', mfilename, ...
18  'gui_Singleton', gui_Singleton, ...
19  'gui_OpeningFcn', @uip_vis_featuregrades_OpeningFcn, ...
20  'gui_OutputFcn', @uip_vis_featuregrades_OutputFcn, ...
21  'gui_LayoutFcn', [] , ...
22  'gui_Callback', []);
23 if nargin && ischar(varargin{1})
24  gui_State.gui_Callback = str2func(varargin{1});
25 end
26 
27 if nargout
28  [varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});
29 else
30  gui_mainfcn(gui_State, varargin{:});
31 end
32 % End initialization code - DO NOT EDIT
33 
34 
35 % --- Executes just before uip_vis_featuregrades is made visible.
36 function uip_vis_featuregrades_OpeningFcn(hObject, eventdata, handles, varargin)
37 handles.output.flag_ok = 0;
38 guidata(hObject, handles);
39 gui_set_position(hObject);
40 refresh(handles);
41 
42 % --- Outputs from this function are returned to the command clae.
43 function varargout = uip_vis_featuregrades_OutputFcn(hObject, eventdata, handles)
44 try
45  uiwait(handles.figure1);
46  handles = guidata(hObject);
47  varargout{1} = handles.output;
48  delete(gcf);
49 catch
50  output.flag_ok = 0;
51  output.params = {};
52  varargout{1} = output;
53 end;
54 
55 
56 %############################################
57 
58 %#########
59 function refresh(handles)
60 listbox_load_from_workspace('fsg', handles.popupmenu_fsg, 0);
61 listbox_load_from_workspace('irdata', handles.popupmenu_data_hint, 1);
62 
63 %############################################
64 
65 % --- Executes on button press in pushbuttonOK.
66 function pushbuttonOK_Callback(hObject, eventdata, handles)
67 try
68  sfsg = listbox_get_selected_1stname(handles.popupmenu_fsg);
69  if isempty(sfsg)
70  error('FSG not specified!');
71  end;
72  sdata_hint = listbox_get_selected_1stname(handles.popupmenu_data_hint);
73  if isempty(sdata_hint)
74  sdata_hint = '[]';
75  end;
76 
77  handles.output.params = {...
78  'fsg', sfsg, ...
79  'data_hint', sdata_hint, ...
80  };
81  handles.output.flag_ok = 1;
82  guidata(hObject, handles);
83  uiresume();
84 catch ME
85  irerrordlg(ME.message, 'Cannot continue');
86 
87 end;
88 
89 
90 % --- Executes on selection change in popupmenu_fsg.
91 function popupmenu_fsg_Callback(hObject, eventdata, handles)
92 
93 % --- Executes during object creation, after setting all properties.
94 function popupmenu_fsg_CreateFcn(hObject, eventdata, handles)
95 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
96  set(hObject,'BackgroundColor','white');
97 end
98 
99 % --- Executes on selection change in popupmenu_data_hint.
100 function popupmenu_data_hint_Callback(hObject, eventdata, handles)
101 
102 % --- Executes during object creation, after setting all properties.
103 function popupmenu_data_hint_CreateFcn(hObject, eventdata, handles)
104 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
105  set(hObject,'BackgroundColor','white');
106 end
107 %> @endcond
Feature Grades using a fsg object to grade the features.
Dataset class.
Definition: irdata.m:30
Property fsg
FSG object to grade the data features.
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)