annotate toolboxes/MIRtoolbox1.3.2/somtoolbox/sompak_init_gui.m @ 0:cc4b1211e677 tip

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