comparison toolboxes/MIRtoolbox1.3.2/somtoolbox/sompak_init_gui.m @ 0:e9a9cd732c1e tip

first hg version after svn
author wolffd
date Tue, 10 Feb 2015 15:05:51 +0000
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:e9a9cd732c1e
1 function sompak_init_gui()
2
3 %SOMPAK_INIT_GUI A GUI for using SOM_PAK initialization programs from Matlab.
4 %
5 % sompak_init_gui
6 %
7 % Launches a GUI which allows the use of SOM_PAK initialization
8 % programs (randinit and lininit) from Matlab. Notice that to use this
9 % function, the SOM_PAK programs must be in your search path, or the
10 % variable 'SOM_PAKDIR' which is a string containing the program path,
11 % must be defined in the workspace. SOM_PAK programs can be found
12 % from: http://www.cis.hut.fi/research/som_lvq_pak.shtml
13 %
14 % See also SOMPAK_INIT, SOMPAK_GUI, SOMPAK_SAMMON_GUI,
15 % SOMPAK_TRAIN_GUI, SOM_GUI.
16
17 % Contributed to SOM Toolbox vs2, February 2nd, 2000
18 % Copyright (c) by Juha Parhankangas
19 % http://www.cis.hut.fi/projects/somtoolbox/
20
21 % Juha Parhankangas 050100
22
23 h=findobj(get(0,'Children'),'Tag','InitGUI');
24
25 if ~isempty(h)
26 figure(h);
27 return;
28 end
29
30 a = figure('Color',[0.8 0.8 0.8], ...
31 'PaperType','a4letter', ...
32 'Position',[483 407 172 440], ...
33 'Tag','InitGUI');
34 b = uicontrol('Parent',a, ...
35 'Units','points', ...
36 'BackgroundColor',[0.701961 0.701961 0.701961], ...
37 'Callback','close gcf',...
38 'FontWeight','demi', ...
39 'Position',[8 20 50 20], ...
40 'String','CLOSE', ...
41 'Tag','Pushbutton1');
42 b = uicontrol('Parent',a, ...
43 'Units','points', ...
44 'BackgroundColor',[0.701961 0.701961 0.701961], ...
45 'Callback','sompak_rb_control init_ok', ...
46 'FontWeight','demi', ...
47 'Position',[86 20 50 20], ...
48 'String','OK', ...
49 'Tag','Pushbutton2');
50 b = uicontrol('Parent',a, ...
51 'Units','points', ...
52 'BackgroundColor',[0.701961 0.701961 0.701961], ...
53 'Position',[8 50 130 300], ...
54 'Style','frame', ...
55 'Tag','Frame1');
56 b = uicontrol('Parent',a, ...
57 'Units','points', ...
58 'BackgroundColor',[0.8 0.8 0.8], ...
59 'Position',[12 54 122 40], ...
60 'Style','frame', ...
61 'Tag','Frame2');
62 b = uicontrol('Parent',a, ...
63 'Units','points', ...
64 'BackgroundColor',[0.8 0.8 0.8], ...
65 'FontWeight','demi', ...
66 'Position',[45.5 78 55 12], ...
67 'String','INIT TYPE', ...
68 'Style','text', ...
69 'Tag','StaticText1');
70 b = uicontrol('Parent',a, ...
71 'Callback','sompak_rb_control linear',...
72 'Units','points', ...
73 'BackgroundColor',[0.701961 0.701961 0.701961], ...
74 'Position',[14 56 17 16], ...
75 'Style','radiobutton', ...
76 'Tag','LINEAR', ...
77 'Value',1);
78
79 udata.inittype = 'linear';
80
81 b = uicontrol('Parent',a, ...
82 'Callback','sompak_rb_control rand',...
83 'Units','points', ...
84 'BackgroundColor',[0.701961 0.701961 0.701961], ...
85 'Position',[73 56 17 16], ...
86 'Style','radiobutton', ...
87 'Tag','RANDOM');
88 b = uicontrol('Parent',a, ...
89 'Units','points', ...
90 'BackgroundColor',[0.8 0.8 0.8], ...
91 'FontWeight','demi', ...
92 'HorizontalAlignment','left', ...
93 'Position',[33 58 30 12], ...
94 'String','Linear', ...
95 'Style','text', ...
96 'Tag','StaticText2');
97 b = uicontrol('Parent',a, ...
98 'Units','points', ...
99 'BackgroundColor',[0.8 0.8 0.8], ...
100 'FontWeight','demi', ...
101 'HorizontalAlignment','left', ...
102 'Position',[91 58 37 12], ...
103 'String','Random', ...
104 'Style','text', ...
105 'Tag','StaticText3');
106 b = uicontrol('Parent',a, ...
107 'Units','points', ...
108 'BackgroundColor',[0.8 0.8 0.8], ...
109 'Position',[12 96 122 40], ...
110 'Style','frame', ...
111 'Tag','Frame3');
112 b = uicontrol('Parent',a, ...
113 'Units','points', ...
114 'BackgroundColor',[0.8 0.8 0.8], ...
115 'FontWeight','demi', ...
116 'Position',[36.4235 118.588 74 12], ...
117 'String','NEIGHBORHOOD', ...
118 'Style','text', ...
119 'Tag','StaticText4');
120 b = uicontrol('Parent',a, ...
121 'Callback','sompak_rb_control bubble',...
122 'Units','points', ...
123 'BackgroundColor',[0.701961 0.701961 0.701961], ...
124 'Position',[14 98 17 16], ...
125 'Style','radiobutton', ...
126 'Tag','BUBBLE', ...
127 'Value',1);
128
129 udata.neigh='bubble';
130
131 b = uicontrol('Parent',a, ...
132 'Callback','sompak_rb_control gaussian',...
133 'Units','points', ...
134 'BackgroundColor',[0.701961 0.701961 0.701961], ...
135 'Position',[73 98 17 16], ...
136 'Style','radiobutton', ...
137 'Tag','GAUSSIAN');
138 b = uicontrol('Parent',a, ...
139 'Units','points', ...
140 'BackgroundColor',[0.8 0.8 0.8], ...
141 'FontWeight','demi', ...
142 'HorizontalAlignment','left', ...
143 'Position',[33 100 32 12], ...
144 'String','Bubble', ...
145 'Style','text', ...
146 'Tag','StaticText5');
147 b = uicontrol('Parent',a, ...
148 'Units','points', ...
149 'BackgroundColor',[0.8 0.8 0.8], ...
150 'FontWeight','demi', ...
151 'HorizontalAlignment','left', ...
152 'Position',[89.5 100 43 12], ...
153 'String','Gaussian', ...
154 'Style','text', ...
155 'Tag','StaticText6');
156 b = uicontrol('Parent',a, ...
157 'Units','points', ...
158 'BackgroundColor',[0.8 0.8 0.8], ...
159 'Position',[12 138 122 40], ...
160 'Style','frame', ...
161 'Tag','Frame4');
162 b = uicontrol('Parent',a, ...
163 'Units','points', ...
164 'BackgroundColor',[0.8 0.8 0.8], ...
165 'FontWeight','demi', ...
166 'Position',[45 162 55 12], ...
167 'String','TOPOLOGY', ...
168 'Style','text', ...
169 'Tag','StaticText7');
170 b = uicontrol('Parent',a, ...
171 'Callback','sompak_rb_control hexa',...
172 'Units','points', ...
173 'Position',[14 140 17 16], ...
174 'Style','radiobutton', ...
175 'Tag','HEXA', ...
176 'Value',1);
177
178 udata.topol='hexa';
179
180 b = uicontrol('Parent',a, ...
181 'Callback','sompak_rb_control rect',...
182 'Units','points', ...
183 'Position',[73 140 17 16], ...
184 'Style','radiobutton', ...
185 'Tag','RECT');
186 b = uicontrol('Parent',a, ...
187 'Units','points', ...
188 'BackgroundColor',[0.8 0.8 0.8], ...
189 'FontWeight','demi', ...
190 'HorizontalAlignment','left', ...
191 'Position',[33 142 30 12], ...
192 'String','Hexa', ...
193 'Style','text', ...
194 'Tag','StaticText8');
195 b = uicontrol('Parent',a, ...
196 'Units','points', ...
197 'BackgroundColor',[0.8 0.8 0.8], ...
198 'FontWeight','demi', ...
199 'HorizontalAlignment','left', ...
200 'Position',[90 142 30 12], ...
201 'String','Rect', ...
202 'Style','text', ...
203 'Tag','StaticText9');
204 b = uicontrol('Parent',a, ...
205 'Units','points', ...
206 'BackgroundColor',[0.8 0.8 0.8], ...
207 'Position',[12 180 122 40], ...
208 'Style','frame', ...
209 'Tag','Frame5');
210 b = uicontrol('Parent',a, ...
211 'Units','points', ...
212 'BackgroundColor',[0.8 0.8 0.8], ...
213 'FontWeight','demi', ...
214 'HorizontalAlignment','left', ...
215 'Position',[25 202 33 12], ...
216 'String','X-dim', ...
217 'Style','text', ...
218 'Tag','StaticText10');
219 b = uicontrol('Parent',a, ...
220 'Units','points', ...
221 'BackgroundColor',[0.8 0.8 0.8], ...
222 'FontWeight','demi', ...
223 'HorizontalAlignment','left', ...
224 'Position',[89 202 33 12], ...
225 'String','Y-dim', ...
226 'Style','text', ...
227 'Tag','StaticText11');
228 b = uicontrol('Parent',a, ...
229 'Units','points', ...
230 'BackgroundColor',[1 1 1], ...
231 'Callback','sompak_rb_control xdim',...
232 'Position',[20 183 40 20], ...
233 'Style','edit', ...
234 'Tag','XDIM');
235 b = uicontrol('Parent',a, ...
236 'Units','points', ...
237 'BackgroundColor',[1 1 1], ...
238 'Callback','sompak_rb_control ydim',...
239 'Position',[85 183 40 20], ...
240 'Style','edit', ...
241 'Tag','YDIM');
242
243 udata.xdim=[];
244 udata.ydim=[];
245
246 b = uicontrol('Parent',a, ...
247 'Units','points', ...
248 'BackgroundColor',[0.8 0.8 0.8], ...
249 'Position',[12 222 122 40], ...
250 'Style','frame', ...
251 'Tag','Frame6');
252 b = uicontrol('Parent',a, ...
253 'Units','points', ...
254 'BackgroundColor',[0.8 0.8 0.8], ...
255 'FontWeight','demi', ...
256 'Position',[25 245 95 12], ...
257 'String','OUTPUT VARIABLE', ...
258 'Style','text', ...
259 'Tag','StaticText12');
260 b = uicontrol('Parent',a, ...
261 'Units','points', ...
262 'BackgroundColor',[1 1 1], ...
263 'Callback','sompak_rb_control out_var',...
264 'Position',[22 226 102 20], ...
265 'String','''ans''', ...
266 'Style','edit', ...
267 'Tag','OUT_VAR');
268
269 udata.out_var='ans';
270
271 b = uicontrol('Parent',a, ...
272 'Units','points', ...
273 'BackgroundColor',[0.8 0.8 0.8], ...
274 'Position',[12 264 122 40], ...
275 'Style','frame', ...
276 'Tag','Frame7');
277 b = uicontrol('Parent',a, ...
278 'Units','points', ...
279 'BackgroundColor',[1 1 1], ...
280 'Callback','sompak_rb_control out_file',...
281 'Position',[15 267 50 20], ...
282 'Style','edit', ...
283 'Tag','OUT_FILE');
284
285 udata.out_file=[];
286
287 b = uicontrol('Parent',a, ...
288 'Units','points', ...
289 'BackgroundColor',[0.8 0.8 0.8], ...
290 'FontWeight','demi', ...
291 'HorizontalAlignment','left', ...
292 'Position',[40 288 60 12], ...
293 'String','OUTPUT FILE', ...
294 'Style','text', ...
295 'Tag','StaticText13');
296 b = uicontrol('Parent',a, ...
297 'Units','points', ...
298 'BackgroundColor',[0.701961 0.701961 0.701961], ...
299 'Callback','sompak_rb_control out_ft',...
300 'FontSize',9, ...
301 'FontWeight','demi', ...
302 'HorizontalAlignment','left', ...
303 'Max',3, ...
304 'Min',1, ...
305 'Position',[70 272 62 15], ...
306 'String',{'No File';'mat-file';'cod-file'}, ...
307 'Style','popupmenu', ...
308 'Tag','OUT_FILE_TYPE', ...
309 'Value',1);
310
311 udata.out_file_type='';
312
313 b = uicontrol('Parent',a, ...
314 'Units','points', ...
315 'BackgroundColor',[0.8 0.8 0.8], ...
316 'Position',[12 306 122 40], ...
317 'Style','frame', ...
318 'Tag','Frame8');
319 b = uicontrol('Parent',a, ...
320 'Units','points', ...
321 'BackgroundColor',[0.8 0.8 0.8], ...
322 'FontWeight','demi', ...
323 'HorizontalAlignment','left', ...
324 'Position',[57 330 30 12], ...
325 'String','DATA', ...
326 'Style','text', ...
327 'Tag','StaticText14');
328 b = uicontrol('Parent',a, ...
329 'Units','points', ...
330 'BackgroundColor',[1 1 1], ...
331 'Callback','sompak_rb_control data',...
332 'Position',[15 309 50 20], ...
333 'Style','edit', ...
334 'Tag','DATA');
335
336 udata.data=[];
337
338 b = uicontrol('Parent',a, ...
339 'Units','points', ...
340 'Callback','sompak_rb_control input_ft',...
341 'FontSize',9, ...
342 'FontWeight','demi', ...
343 'HorizontalAlignment','left', ...
344 'Max',3, ...
345 'Min',1, ...
346 'Position',[70 314 62 15], ...
347 'String',{'Variable';'mat-file';'dat-file'}, ...
348 'Style','popupmenu', ...
349 'Tag','INPUT_FILE_TYPE', ...
350 'Value',1);
351 udata.input_file_type='';
352
353 b = uicontrol('Parent',a, ...
354 'Units','points', ...
355 'BackgroundColor',[0.8 0.8 0.8], ...
356 'FontSize',12, ...
357 'FontWeight','bold', ...
358 'HorizontalAlignment','left', ...
359 'Position',[57 355 30 12], ...
360 'String','INIT', ...
361 'Style','text', ...
362 'Tag','StaticText15');
363
364 set(gcf,'UserData',udata);
365
366
367
368
369