IRootLab
An Open-Source MATLAB toolbox for vibrational biospectroscopy
uip_vis_curvefit.m
Go to the documentation of this file.
1 %> @ingroup guigroup
2 %> @file
3 %> @brief Properties Window for @ref vis_curvefit
4 %> @image html Screenshot-uip_vis_curvefit.png
5 %>
6 %> <b>Index of feature</b> - see vis_curvefit::idx_fea
7 %>
8 %> <b>Class concentrations</b> - see vis_curvefit::conc
9 %>
10 %> <b>Take absolute values of scores</b> - see vis_curvefit::flag_abs
11 %>
12 %> <b>Turn figure upside down</b> - see vis_curvefit::flag_ud
13 %>
14 %> @sa vis_curvefit
15 
16 %>@cond
17 function varargout = uip_vis_curvefit(varargin)
18 % Last Modified by GUIDE v2.5 04-Feb-2011 14:18:50
19 
20 % Begin initialization code - DO NOT EDIT
21 gui_Singleton = 1;
22 gui_State = struct('gui_Name', mfilename, ...
23  'gui_Singleton', gui_Singleton, ...
24  'gui_OpeningFcn', @uip_vis_curvefit_OpeningFcn, ...
25  'gui_OutputFcn', @uip_vis_curvefit_OutputFcn, ...
26  'gui_LayoutFcn', [] , ...
27  'gui_Callback', []);
28 if nargin && ischar(varargin{1})
29  gui_State.gui_Callback = str2func(varargin{1});
30 end
31 
32 if nargout
33  [varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});
34 else
35  gui_mainfcn(gui_State, varargin{:});
36 end
37 % End initialization code - DO NOT EDIT
38 
39 
40 % --- Executes just before uip_vis_curvefit is made visible.
41 function uip_vis_curvefit_OpeningFcn(hObject, eventdata, handles, varargin)
42 if nargin > 4
43  handles.input.data = varargin{2};
44 else
45  handles.input.data = [];
46 end;
47 handles.output.flag_ok = 0;
48 guidata(hObject, handles);
49 gui_set_position(hObject);
50 
51 
52 % --- Outputs from this function are returned to the command clae.
53 function varargout = uip_vis_curvefit_OutputFcn(hObject, eventdata, handles)
54 try
55  uiwait(handles.figure1);
56  handles = guidata(hObject);
57  varargout{1} = handles.output;
58  delete(gcf);
59 catch
60  output.flag_ok = 0;
61  output.params = {};
62  varargout{1} = output;
63 end;
64 
65 %############################################
66 
67 %#########
68 function params = get_params(handles)
69 types = {'threshold', 'ranges'};
70 
71 params = {...
72 'idx_fea', int2str(eval(get(handles.edit_idx_fea, 'String'))), ...
73 'flag_abs', int2str(get(handles.checkbox_flag_abs, 'Value')), ...
74 'flag_ud', int2str(get(handles.checkbox_flag_ud, 'Value')), ...
75 'conc', mat2str(eval(fel(get(handles.edit_conc, 'String')))) ...
76 };
77 
78 
79 %############################################
80 %############################################
81 
82 
83 % --- Executes on button press in pushbuttonOk.
84 function pushbuttonOk_Callback(hObject, eventdata, handles)
85 try
86  handles.output.params = get_params(handles);
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 edit_conc_Callback(hObject, eventdata, handles)
96 
97 % --- Executes during object creation, after setting all properties.
98 function edit_conc_CreateFcn(hObject, eventdata, handles)
99 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
100  set(hObject,'BackgroundColor','white');
101 end
102 
103 
104 % --- Executes on button press in pushbuttonPreview.
105 function pushbuttonPreview_Callback(hObject, eventdata, handles)
106 preview(handles);
107 
108 function edit_idx_fea_Callback(hObject, eventdata, handles)
109 
110 % --- Executes during object creation, after setting all properties.
111 function edit_idx_fea_CreateFcn(hObject, eventdata, handles)
112 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
113  set(hObject,'BackgroundColor','white');
114 end
115 
116 
117 % --- Executes on button press in checkbox_flag_abs.
118 function checkbox_flag_abs_Callback(hObject, eventdata, handles)
119 
120 % --- Executes on button press in checkbox_flag_ud.
121 function checkbox_flag_ud_Callback(hObject, eventdata, handles)
122 %> @endcond
Property flag_ud
Definition: vis_curvefit.m:11
function fel(in c, in n)
Property idx_fea
Definition: vis_curvefit.m:9
1D Scatterplot with x-axis values associated to classes and curve fit
Definition: vis_curvefit.m:4
function gui_set_position(in hObject)
function irerrordlg(in errorstring, in dlgname)
Property flag_abs
Definition: vis_curvefit.m:13
Property conc
Definition: vis_curvefit.m:15