IRootLab
An Open-Source MATLAB toolbox for vibrational biospectroscopy
uip_vis_cov.m
Go to the documentation of this file.
1 %> @ingroup guigroup
2 %> @file
3 %> @brief Properties Window for @ref vis_cov
4 %> @image html Screenshot-uip_vis_cov.png
5 %>
6 %> <b>Type</b> - see vis_cov::type
7 %>
8 %> <b>Dataset for hint</b> - see vis_cov::data_hint
9 %>
10 %> @sa vis_cov
11 
12 %>@cond
13 function varargout = uip_vis_cov(varargin)
14 % Last Modified by GUIDE v2.5 22-Aug-2011 16:21:03
15 
16 % Begin initialization code - DO NOT EDIT
17 gui_Singleton = 1;
18 gui_State = struct('gui_Name', mfilename, ...
19  'gui_Singleton', gui_Singleton, ...
20  'gui_OpeningFcn', @uip_vis_cov_OpeningFcn, ...
21  'gui_OutputFcn', @uip_vis_cov_OutputFcn, ...
22  'gui_LayoutFcn', [] , ...
23  'gui_Callback', []);
24 if nargin && ischar(varargin{1})
25  gui_State.gui_Callback = str2func(varargin{1});
26 end
27 
28 if nargout
29  [varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});
30 else
31  gui_mainfcn(gui_State, varargin{:});
32 end
33 % End initialization code - DO NOT EDIT
34 
35 
36 % --- Executes just before uip_vis_cov is made visible.
37 function uip_vis_cov_OpeningFcn(hObject, eventdata, handles, varargin)
38 handles.output.flag_ok = 0;
39 guidata(hObject, handles);
40 gui_set_position(hObject);
41 refresh(handles);
42 
43 % --- Outputs from this function are returned to the command clae.
44 function varargout = uip_vis_cov_OutputFcn(hObject, eventdata, handles)
45 try
46  uiwait(handles.figure1);
47  handles = guidata(hObject);
48  varargout{1} = handles.output;
49  delete(gcf);
50 catch
51  output.flag_ok = 0;
52  output.params = {};
53  varargout{1} = output;
54 end;
55 
56 
57 %############################################
58 
59 %#########
60 function refresh(handles)
61 listbox_load_from_workspace('irdata', handles.popupmenuDataHint, 1);
62 
63 %############################################
64 %############################################
65 
66 % --- Executes on button press in pushbuttonOK.
67 function pushbuttonOK_Callback(hObject, eventdata, handles)
68 try
69  types = 'cwb';
70  type = types(get(handles.popupmenu_type, 'Value'));
71 
72  sdata2 = listbox_get_selected_1stname(handles.popupmenuDataHint);
73  if isempty(sdata2)
74  sdata2 = '[]';
75  end;
76 
77  handles.output.params = {...
78  'data_hint', sdata2, ...
79  'type', ['''', type, ''''] ...
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 popupmenuDataHint.
91 function popupmenuDataHint_Callback(hObject, eventdata, handles)
92 
93 % --- Executes during object creation, after setting all properties.
94 function popupmenuDataHint_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_type.
100 function popupmenu_type_Callback(hObject, eventdata, handles)
101 
102 % --- Executes during object creation, after setting all properties.
103 function popupmenu_type_CreateFcn(hObject, eventdata, handles)
104 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
105  set(hObject,'BackgroundColor','white');
106 end
107 %> @endcond
Dataset class.
Definition: irdata.m:30
function listbox_get_selected_1stname(in h_listbox)
Covariance matrix.
Definition: vis_cov.m:4
Property type
'c': covariance; 'w': within-class covarianne matrix; 'b': between-class covariance matrix ...
Definition: vis_cov.m:10
function listbox_load_from_workspace(in classname, in h_list, in flag_blank, in string_empty, in input)
Property data_hint
Definition: vis_cov.m:12
function gui_set_position(in hObject)
function irerrordlg(in errorstring, in dlgname)