IRootLab
An Open-Source MATLAB toolbox for vibrational biospectroscopy
uip_pre_bc_rubber.m
Go to the documentation of this file.
1 %> @ingroup guigroup
2 %> @file
3 %> @brief Properties Window for Rubberband-like baseline correction
4 %> @sa pre_bc_rubber
5 
6 %> @cond
7 function varargout = uip_pre_bc_rubber(varargin)
8 % Begin initialization code - DO NOT EDIT
9 gui_Singleton = 1;
10 gui_State = struct('gui_Name', mfilename, ...
11  'gui_Singleton', gui_Singleton, ...
12  'gui_OpeningFcn', @uip_pre_bc_rubber_OpeningFcn, ...
13  'gui_OutputFcn', @uip_pre_bc_rubber_OutputFcn, ...
14  'gui_LayoutFcn', [] , ...
15  'gui_Callback', []);
16 if nargin && ischar(varargin{1})
17  gui_State.gui_Callback = str2func(varargin{1});
18 end
19 
20 if nargout
21  [varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});
22 else
23  gui_mainfcn(gui_State, varargin{:});
24 end
25 % End initialization code - DO NOT EDIT
26 
27 
28 % --- Executes just before uip_pre_bc_rubber is made visible.
29 function uip_pre_bc_rubber_OpeningFcn(hObject, eventdata, handles, varargin)
30 handles.output.flag_ok = 0;
31 guidata(hObject, handles);
32 gui_set_position(hObject);
33 
34 
35 % --- Outputs from this function are returned to the command line.
36 function varargout = uip_pre_bc_rubber_OutputFcn(hObject, eventdata, handles)
37 try
38  uiwait(handles.figure1);
39  handles = guidata(hObject);
40  varargout{1} = handles.output;
41  delete(gcf);
42 catch
43  output.flag_ok = 0;
44  varargout{1} = output;
45 end;
46 
47 
48 
49 
50 % --- Executes on button press in pushbuttonCreate.
51 function pushbuttonCreate_Callback(hObject, eventdata, handles)
52 % hObject handle to pushbuttonCreate (see GCBO)
53 % eventdata reserved - to be defined in a future version of MATLAB
54 % handles structure with handles and user data (see GUIDATA)
55 
56 try
57  handles.output.params = {...
58  'flag_trim', sprintf('%d', get(handles.checkbox_flag_trim, 'Value') ~= 0) ...
59  };
60  handles.output.flag_ok = 1;
61  guidata(hObject, handles);
62  uiresume();
63 catch ME
64  irerrordlg(ME.message, 'Cannot continue');
65 
66 end;
67 
68 % --- Executes on button press in checkbox_flag_trim.
69 function checkbox_flag_trim_Callback(hObject, eventdata, handles)
70 %>@endcond
Convex Polygonal Line (Rubberband-like) Baseline Correction.
Definition: pre_bc_rubber.m:8
function gui_set_position(in hObject)
function irerrordlg(in errorstring, in dlgname)