IRootLab
An Open-Source MATLAB toolbox for vibrational biospectroscopy
uip_pre_diff_sg.m
Go to the documentation of this file.
1 %>@file
2 %>@ingroup guigroup
3 %>@brief Properties Window for @ref pre_diff_sg
4 %>
5 %>@image html Screenshot-uip_pre_diff_sg.png
6 %>
7 %> <b>Differentiation order</b> - see pre_diff_sg::order
8 %>
9 %> <b>Polynomial order</b> - see pre_diff_sg::porder
10 %>
11 %> <b>Number of filter coefficients</b> - see pre_diff_sg::ncoeff
12 %>
13 %> @sa pre_diff_sg
14 
15 %>@cond
16 function varargout = uip_pre_diff_sg(varargin)
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_pre_diff_sg_OpeningFcn, ...
22  'gui_OutputFcn', @uip_pre_diff_sg_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_pre_diff_sg is made visible.
38 function uip_pre_diff_sg_OpeningFcn(hObject, eventdata, handles, varargin)
39 handles.output.flag_ok = 0;
40 guidata(hObject, handles);
41 gui_set_position(hObject);
42 
43 
44 % --- Outputs from this function are returned to the command clae.
45 function varargout = uip_pre_diff_sg_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  varargout{1} = output;
54 end;
55 
56 
57 
58 function editReg_Callback(hObject, eventdata, handles)
59 % hObject handle to editReg (see GCBO)
60 % eventdata reserved - to be defined in a future version of MATLAB
61 % handles structure with handles and user data (see GUIDATA)
62 
63 % Hints: get(hObject,'String') returns contents of editReg as text
64 % str2double(get(hObject,'String')) returns contents of editReg as a double
65 
66 
67 % --- Executes during object creation, after setting all properties.
68 function editReg_CreateFcn(hObject, eventdata, handles)
69 % hObject handle to editReg (see GCBO)
70 % eventdata reserved - to be defined in a future version of MATLAB
71 % handles empty - handles not created until after all CreateFcns called
72 
73 % Hint: edit controls usually have a white background on Windows.
74 % See ISPC and COMPUTER.
75 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
76  set(hObject,'BackgroundColor','white');
77 end
78 
79 
80 
81 % --- Executes on button press in pushbuttonOk.
82 function pushbuttonOk_Callback(hObject, eventdata, handles)
83 try
84  handles.output.params = {...
85  'order', int2str(eval(get(handles.edit_order, 'String'))) ...
86  'porder', int2str(eval(get(handles.edit_porder, 'String'))) ...
87  'ncoeff', int2str(eval(get(handles.edit_ncoeff, 'String'))) ...
88  };
89  handles.output.flag_ok = 1;
90  guidata(hObject, handles);
91  uiresume();
92 catch ME
93  irerrordlg(ME.message, 'Cannot continue');
94 
95 end;
96 
97 
98 function edit_order_Callback(hObject, eventdata, handles)
99 
100 % --- Executes during object creation, after setting all properties.
101 function edit_order_CreateFcn(hObject, eventdata, handles)
102 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
103  set(hObject,'BackgroundColor','white');
104 end
105 
106 function edit_porder_Callback(hObject, eventdata, handles)
107 
108 % --- Executes during object creation, after setting all properties.
109 function edit_porder_CreateFcn(hObject, eventdata, handles)
110 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
111  set(hObject,'BackgroundColor','white');
112 end
113 
114 function edit_ncoeff_Callback(hObject, eventdata, handles)
115 
116 % --- Executes during object creation, after setting all properties.
117 function edit_ncoeff_CreateFcn(hObject, eventdata, handles)
118 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
119  set(hObject,'BackgroundColor','white');
120 end
121 %>@endcond
Property order
=1. Differentiation order.
Definition: pre_diff_sg.m:10
Property ncoeff
=9. Number of coefficients of filter.
Definition: pre_diff_sg.m:16
Savitsky-Golay (SG) Differentiation.
Definition: pre_diff_sg.m:4
Property porder
=2. Polynomial order.
Definition: pre_diff_sg.m:13
function gui_set_position(in hObject)
Analysis Session (AS) base class.
Definition: as.m:6
function irerrordlg(in errorstring, in dlgname)