IRootLab
An Open-Source MATLAB toolbox for vibrational biospectroscopy
uip_clssr_dist.m
Go to the documentation of this file.
1 %> @ingroup guigroup
2 %> @file
3 %> @brief Properties Window for @ref clssr_dist
4 %> @image html Screenshot-uip_clssr_dist.png
5 %>
6 %> <b>Type of distance</b> - see clssr_dist::normtype
7 %>
8 %> <b>Weigh data points using recursive potential</b> - see clssr_dist::flag_pr
9 %>
10 %> @sa @ref clssr_dist
11 
12 %> @cond
13 function varargout = uip_clssr_dist(varargin)
14 % Last Modified by GUIDE v2.5 04-Feb-2011 14:40:39
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_clssr_dist_OpeningFcn, ...
21  'gui_OutputFcn', @uip_clssr_dist_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_clssr_dist is made visible.
37 function uip_clssr_dist_OpeningFcn(hObject, eventdata, handles, varargin)
38 handles.output.flag_ok = 0;
39 guidata(hObject, handles);
40 gui_set_position(hObject);
41 
42 
43 % --- Outputs from this function are returned to the command line.
44 function varargout = uip_clssr_dist_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  varargout{1} = output;
53 end;
54 
55 
56 % --- Executes on button press in pushbuttonCreate.
57 function pushbuttonCreate_Callback(hObject, eventdata, handles)
58 % hObject handle to pushbuttonCreate (see GCBO)
59 % eventdata reserved - to be defined in a future version of MATLAB
60 % handles structure with handles and user data (see GUIDATA)
61 
62 methods = {'euclidean', 'classify'};
63 method = methods{get(handles.popupmenuMethod, 'Value')};
64 
65 try
66  handles.output.params = {...
67  'normtype', ['''' method ''''], ...
68  'flag_pr', int2str(get(handles.checkboxPr, 'Value')) ...
69  };
70  handles.output.flag_ok = 1;
71  guidata(hObject, handles);
72  uiresume();
73 catch ME
74  irerrordlg(ME.message, 'Cannot continue');
75 
76 end;
77 
78 % --- Executes on selection change in popupmenuMethod.
79 function popupmenuMethod_Callback(hObject, eventdata, handles)
80 % hObject handle to popupmenuMethod (see GCBO)
81 % eventdata reserved - to be defined in a future version of MATLAB
82 % handles structure with handles and user data (see GUIDATA)
83 
84 % Hints: contents = get(hObject,'String') returns popupmenuMethod contents as cell array
85 % contents{get(hObject,'Value')} returns selected item from popupmenuMethod
86 
87 
88 % --- Executes during object creation, after setting all properties.
89 function popupmenuMethod_CreateFcn(hObject, eventdata, handles)
90 % hObject handle to popupmenuMethod (see GCBO)
91 % eventdata reserved - to be defined in a future version of MATLAB
92 % handles empty - handles not created until after all CreateFcns called
93 
94 % Hint: popupmenu controls usually have a white background on Windows.
95 % See ISPC and COMPUTER.
96 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
97  set(hObject,'BackgroundColor','white');
98 end
99 
100 
101 % --- Executes on button press in checkboxPr.
102 function checkboxPr_Callback(hObject, eventdata, handles)
103 %>@endcond
Property normtype
Definition: clssr_dist.m:21
Least-Distance-to-Class-Mean Classifier.
Definition: clssr_dist.m:16
function gui_set_position(in hObject)
Analysis Session (AS) base class.
Definition: as.m:6
function irerrordlg(in errorstring, in dlgname)
Property flag_pr
Definition: clssr_dist.m:23