fbs timeline mod, model in base assignment
Christoph Budziszewski

Christoph Budziszewski commited on 2009-04-26 01:52:49
Zeige 3 geänderte Dateien mit 16 Einfügungen und 9 Löschungen.


git-svn-id: https://svn.discofish.de/MATLAB/spmtoolbox/SVMCrossVal@182 83ab2cfd-5345-466c-8aeb-2b2739fb922d
... ...
@@ -1,3 +1,3 @@
1 1
 function r = getSearchlightTimeline(model)
2
-r = eval('[' get('String',model.txtSearchlightTimeline) ']');
2
+r = eval(['[' get(model.txtSearchlightTimeline,'String') ']']);
3 3
 end
4 4
\ No newline at end of file
... ...
@@ -2,7 +2,7 @@ function dirs = listDirs(wd)
2 2
 % d = listDirs(dir) returns all directories below dir as a cell array. 
3 3
 % the Structure is the same as from the 'dir' command (because this
4 4
 % function relies on 'dir'
5
-% . and .. are filterd. no intetion to include an option switch for those
5
+% .* is filterd. no intetion to include an option switch for those
6 6
 % special dirs.
7 7
 allfiles = dir(wd);
8 8
 nDirs = 1;
... ...
@@ -20,6 +20,7 @@ DEFAULT.searchlightTimeline = '';
20 20
 
21 21
 
22 22
 DEFAULT.wd  = fullfile('d:','Analyze','Choice','24pilot');
23
+% DEFAULT.wd  = fullfile('/','home','chris');
23 24
 
24 25
 %  Initialize and hide the GUI as it is being constructed.
25 26
     frameWidth=450;
... ...
@@ -80,19 +81,19 @@ DEFAULT.wd  = fullfile('d:','Analyze','Choice','24pilot');
80 81
         btnSwitchPreprocessing = uicontrol(task.taskSwitch,'Style','pushbutton',...
81 82
             'String','ImageProcessing',...
82 83
             'Units','normalized','Position',[0.0 0.0 0.33 1]);
83
-        set(btnSwitchPreprocessing,'Callback',{@cbSwitchTask,'PRE',task}); 
84
+        set(btnSwitchPreprocessing,'Callback',{@cbSwitchTask,'PRE',task,model1}); 
84 85
         set(btnSwitchPreprocessing,'Enable','on');
85 86
 
86 87
         btnSwitchClassify = uicontrol(task.taskSwitch,'Style','pushbutton',...
87 88
             'String','Decode',...
88 89
             'Units','normalized','Position',[0.33 0.0 0.33 1]);
89
-        set(btnSwitchClassify,'Callback',{@cbSwitchTask,'CLASSIFY',task}); 
90
+        set(btnSwitchClassify,'Callback',{@cbSwitchTask,'CLASSIFY',task,model2}); 
90 91
         set(btnSwitchClassify,'Enable','on');
91 92
 
92 93
         btnSwitchPlot = uicontrol(task.taskSwitch,'Style','pushbutton',...
93 94
             'String','Plot',...
94 95
             'Units','normalized','Position',[0.66 0.0 0.33 1]);
95
-        set(btnSwitchPlot,'Callback',{@cbSwitchTask,'PLOT',task}); 
96
+        set(btnSwitchPlot,'Callback',{@cbSwitchTask,'PLOT',task,model3}); 
96 97
         set(btnSwitchPlot,'Enable','on');
97 98
 
98 99
     % menu
... ...
@@ -107,12 +108,11 @@ DEFAULT.wd  = fullfile('d:','Analyze','Choice','24pilot');
107 108
         
108 109
     uimenu(frame,'Label','change Study','Callback',{@mcb_cd,model1},'Enable','off');
109 110
     
110
-    cbSwitchTask(0,0,'PRE',task);
111
+    cbSwitchTask(0,0,'PRE',task,model1);
111 112
 
112 113
 
113 114
     set(frame,'Visible','on');
114 115
 
115
-    assignin('base','model',model1);
116 116
 end
117 117
 
118 118
 function model = createFirstStepPanel(model,parent,DEFAULT)
... ...
@@ -364,7 +364,7 @@ pSearchlight = uipanel(parent,'Units','normalized','Position',[0.0 0.1 1 0.3]);
364 364
     lSearchligh = createLabel(pSearchlight, [0 0.6 0.5 0.3],'Searchlight Radius');
365 365
     model.txtSearchlightRadius = createTextField(pSearchlight,[0.5 0.6 0.5 0.3],DEFAULT.searchlightradius);
366 366
     
367
-    lFBSTiming = createLabel(pSearchlight, [0 0.3 0.5 0.3],'Optional Timeline');
367
+    lFBSTiming = createLabel(pSearchlight, [0 0.3 0.5 0.3],'Optional Timeline ( e.g. ''-5 0 5 10 15''');
368 368
     model.txtSearchlightTimeline = createTextField(pSearchlight,[0.5 0.3 0.5 0.3],DEFAULT.searchlightTimeline);
369 369
 
370 370
     btnRunFBS = uicontrol(pSearchlight,'String','run Spatiotemporal FB classification',...
... ...
@@ -418,7 +418,7 @@ function model = createVisualStepPanel(model,parent,DEFAULT)
418 418
 end
419 419
 
420 420
 
421
-function cbSwitchTask(src,evnt,task,taskpanel)
421
+function cbSwitchTask(src,evnt,task,taskpanel,model)
422 422
 set(taskpanel.preprocessing,'Visible','off');
423 423
 set(taskpanel.classification,'Visible','off');
424 424
 set(taskpanel.plot,'Visible','off');
... ...
@@ -426,11 +426,18 @@ set(taskpanel.plot,'Visible','off');
426 426
 switch task
427 427
     case 'PRE'
428 428
         set(taskpanel.preprocessing,'Visible','on');
429
+
430
+
429 431
     case 'CLASSIFY'
430 432
         set(taskpanel.classification,'Visible','on');
433
+
431 434
     case 'PLOT'
432 435
         set(taskpanel.plot,'Visible','on');
436
+        
433 437
 end
438
+
439
+assignin('base','model',model);
440
+
434 441
 end
435 442
 
436 443
 
437 444