IRootLab
An Open-Source MATLAB toolbox for vibrational biospectroscopy
uip_vis_stackedhists.m
Go to the documentation of this file.
1 %> @ingroup guigroup
2 %> @file
3 %> @brief Properties Window for @ref vis_stackedhists
4 %>
5 %> <b>Dataset for hint</b> - see report_log_fselrepeater_hist::data_hint
6 %>
7 %> <b>Peak Detector</b> - see report_log_fselrepeater_hist::peakdetector
8 %>
9 %> <b>Colors</b> - see @c colors parameter in colors2map.m
10 %>
12 
13 %>@cond
14 function varargout = uip_vis_stackedhists(varargin)
15 % Last Modified by GUIDE v2.5 31-Jul-2013 12:17:22
16 
17 % Begin initialization code - DO NOT EDIT
18 gui_Singleton = 1;
19 gui_State = struct('gui_Name', mfilename, ...
20  'gui_Singleton', gui_Singleton, ...
21  'gui_OpeningFcn', @uip_vis_stackedhists_OpeningFcn, ...
22  'gui_OutputFcn', @uip_vis_stackedhists_OutputFcn, ...
23  'gui_LayoutFcn', [] , ...
24  'gui_Callback', []);
25 if nargin && ischar(varargin{1})
26  gui_State.gui_Callback = str2func(varargin{1});
27 end
28 
29 if nargout
30  [varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});
31 else
32  gui_mainfcn(gui_State, varargin{:});
33 end
34 % End initialization code - DO NOT EDIT
35 
36 
37 % --- Executes just before uip_vis_stackedhists is made visible.
38 function uip_vis_stackedhists_OpeningFcn(hObject, eventdata, handles, varargin)
39 handles.output.flag_ok = 0;
40 guidata(hObject, handles);
41 gui_set_position(hObject);
42 refresh(handles);
43 
44 % --- Outputs from this function are returned to the command clae.
45 function varargout = uip_vis_stackedhists_OutputFcn(hObject, eventdata, handles)
46 try
47  uiwait(handles.figure1);
48  handles = guidata(hObject);
49  varargout{1} = handles.output;
50  delete(gcf);
51 catch
52  output.flag_ok = 0;
53  output.params = {};
54  varargout{1} = output;
55 end;
56 
57 
58 %############################################
59 
60 %#########
61 function refresh(handles)
62 listbox_load_from_workspace('peakdetector', handles.popupmenu_peakdetector, 1);
63 listbox_load_from_workspace('irdata', handles.popupmenu_data_hint, 1);
64 
65 
66 %############################################
67 %############################################
68 
69 % --- Executes on button press in pushbuttonOK.
70 function pushbuttonOK_Callback(hObject, eventdata, handles) %#ok<*DEFNU,*INUSL>
71 try
72  speakdetector = listbox_get_selected_1stname(handles.popupmenu_peakdetector);
73  if isempty(speakdetector)
74  speakdetector = '[]';
75  end;
76  sdata_hint = listbox_get_selected_1stname(handles.popupmenu_data_hint);
77  if isempty(sdata_hint)
78  sdata_hint = '[]';
79  end;
80  scolors = cell2str(eval(get(handles.edit_colors, 'String')));
81 
82  handles.output.params = {...
83  'peakdetector', speakdetector, ...
84  'data_hint', sdata_hint, ...
85  'colors', scolors, ...
86  };
87  handles.output.flag_ok = 1;
88  guidata(hObject, handles);
89  uiresume();
90 catch ME
91  irerrordlg(ME.message, 'Cannot continue');
92 
93 end;
94 
95 function popupmenu_subsetsprocessor_Callback(hObject, eventdata, handles)
96 function popupmenu_subsetsprocessor_CreateFcn(hObject, eventdata, handles)
97 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
98  set(hObject,'BackgroundColor','white');
99 end
100 function popupmenu_data_hint_Callback(hObject, eventdata, handles)
101 function popupmenu_data_hint_CreateFcn(hObject, eventdata, handles)
102 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
103  set(hObject,'BackgroundColor','white');
104 end
105 function popupmenu_peakdetector_Callback(hObject, eventdata, handles)
106 function popupmenu_peakdetector_CreateFcn(hObject, eventdata, handles)
107 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
108  set(hObject,'BackgroundColor','white');
109 end
110 function edit_colors_Callback(hObject, eventdata, handles)
111 function edit_colors_CreateFcn(hObject, eventdata, handles)
112 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
113  set(hObject,'BackgroundColor','white');
114 end
115 %> @endcond
function cell2str(in c)
function colors2map(in colors, in no_hists, in no_informative)
Property peakdetector
=def_peakdetector()
Dataset class.
Definition: irdata.m:30
Peak Detector.
Definition: peakdetector.m:6
function listbox_get_selected_1stname(in h_listbox)
Property data_hint
=[]. Hint dataset
Visualization - Stacked histograms.
function listbox_load_from_workspace(in classname, in h_list, in flag_blank, in string_empty, in input)
function gui_set_position(in hObject)
function irerrordlg(in errorstring, in dlgname)