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