zwischenspeicherung
Christoph Budziszewski

Christoph Budziszewski commited on 2009-02-18 18:24:30
Zeige 3 geänderte Dateien mit 36 Einfügungen und 67 Löschungen.


git-svn-id: https://svn.discofish.de/MATLAB/spmtoolbox/SVMCrossVal@135 83ab2cfd-5345-466c-8aeb-2b2739fb922d
... ...
@@ -1,4 +1,29 @@
1
-function main(action,parameterModel)
1
+function main(model,task)
2
+
3
+% parse the GUI and pass parameters as structure
4
+disp('RUN');
5
+timeLine = getTimeLineParams(model);
6
+subjects = getSubjectCellList(model);
7
+classDef = parseClassDef(model);
8
+% images
9
+% normalization
10
+
11
+
12
+
13
+switch task
14
+    case 'COORD'
15
+        disp('COORD');
16
+        coordinates= 'parse me'
17
+        runCoordTable()
18
+    case 'ROI'
19
+        disp('ROI');
20
+        runROIImageMaskMode(subjects,timeLine)
21
+    case 'FBS'
22
+        disp('FBS')
23
+end
24
+
25
+return
26
+
2 27
 timeline = getTimeLineParams(parameterModel);
3 28
 switch action
4 29
     case 'COORD-LOOKUP-TABLE'
... ...
@@ -1,51 +1,28 @@
1
-function runCoordTable(timeline,varargin)
2
-        paramModel = varargin{1};
1
+function ppsth = runCoordTable(baseDir,subjects,timeline,coordinates,volumeFileList,classDef)
2
+%         paramModel = varargin{1};
3
+    disp('run coord table')
3 4
     
4
-global SVMCROSSVAL_CROSSVAL_METHOD_DEF;
5
-global SVMCROSSVAL_VOXEL_SELECTION_MODE_DEF;
5
+    disp('does not work yet.')
6
+    return
6 7
         
7
-
8
-        %PROJECT_BASE_PATH = 'D:\Analyze\Stimolos';
9
-        PROJECT_BASE_PATH = paramModel.baseDir;
8
+        PROJECT_BASE_PATH = baseDir;
10 9
         PROJECT_RESULT_PATH = 'results\SPM.mat';
11 10
 
12 11
 
13
-        % timeline params (claculate and plot)
14 12
         timelineParams = timeline;
15 13
         
16
-%         timelineParams.frameShiftStart = getDouble(paramModel.txtFrameShiftStart);  % -20;
17
-%         timelineParams.frameShiftEnd   = getDouble(paramModel.txtFrameShiftEnd); %15;
18
-%         timelineParams.decodeDuration  = getDouble(paramModel.txtFrameShiftDur);
19
-%         timelineParams.psthStart       = getDouble(paramModel.txtPSTHStart); % -25;
20
-%         timelineParams.psthEnd         = getDouble(paramModel.txtPSTHEnd); % 20;
21
-%         timelineParams.baselineStart   = getDouble(paramModel.txtBaselineStart); % -22;
22
-%         timelineParams.baselineEnd     = getDouble(paramModel.txtBaselineEnd); % -20;       
23
-%        
24 14
         % common params
25 15
         calculateParams  = struct;
26 16
         
27
-%         calculateParams.SVMCROSSVAL_CROSSVAL_METHOD_DEF = SVMCROSSVAL_CROSSVAL_METHOD_DEF;
28
-        calculateParams.CROSSVAL_METHOD      = SVMCROSSVAL_CROSSVAL_METHOD_DEF.svmcrossval;
29
-        calculateParams.VOXEL_SELECTION_MODE = SVMCROSSVAL_VOXEL_SELECTION_MODE_DEF.roiImage;
30 17
         calculateParams.PROJECT_BASE_PATH    = PROJECT_BASE_PATH;
31 18
         calculateParams.PROJECT_RESULT_PATH  = PROJECT_RESULT_PATH;
32 19
         
33 20
         calculateParams.RANDOMIZE       = 0;
34
-        
35
-%         calculateParams.smoothed        = getChkValue(paramModel.chkSmoothed);
36
-
37
-%         calculateParams.svmargs         = get(paramModel.txtSVMopts,'String');
38 21
         calculateParams.sessionList     = 1:3;
39 22
         
40
-        classStruct = parseClassDef(paramModel);
41
-        
42
-        
43
-%         calculateParams.labelMap        = LabelMap(classStruct.labelCells , classStruct.conditionCells, 'auto'); % LabelMap({'<','>','<+<','>+>','<+>','>+<'},{-2,-1,1,2,3,4}); 0 is autolabel
44
-%         calculateParams.classList       = getClasses(calculateParams.labelMap);
45 23
         calculateParams.eventList       = classStruct.eventMatrix; %[9,11,13; 10,12,14];
46
-%         calculateParams.eventList       = getPSTEventMatrix(calculateParams.labelMap);
47 24
         
48
-        subjectSelection = {'JZ006'}; %getSubjectIDString(paramModel);
25
+        subjectSelection = subjects;
49 26
         calculateParams.subjectSelection = subjectSelection;
50 27
         
51 28
         decode = claculateMultiSubjectDecodePerformance(timelineParams,calculateParams,paramModel);
... ...
@@ -61,7 +61,7 @@ DEFAULT.wd  = fullfile('d:','Analyze','Choice','24pilot');
61 61
     uimenu(savemenu,'Label','Save','Callback',{@mcb_save,model});
62 62
     uimenu(savemenu,'Label','Load','Callback',{@mcb_load,model});
63 63
 
64
-    cdmenu = uimenu(frame,'Label','change Study','Callback',{@mcb_cd,model});
64
+    uimenu(frame,'Label','change Study','Callback',{@mcb_cd,model},'Enable','off');
65 65
     
66 66
     set(frame,'Visible','on');
67 67
 
... ...
@@ -85,7 +85,7 @@ classDefString = getClassDefString(model);
85 85
 coordDefString = getCoordDefString(model);
86 86
 
87 87
 [file path] = uiputfile('*.mat','Save current Params ...',model.baseDir);
88
-save( fullfile(path,file),'baseDir','timeLine','subjects','classDefString','coordDefString') ;
88
+save( fullfile(path,file),'baseDir','timeLine','classDefString','coordDefString') ;
89 89
 end
90 90
 
91 91
 function model = mcb_load(src,evnt,model)
... ...
@@ -328,41 +327,8 @@ function model = createFirstStepPanel(model,parent,DEFAULT)
328 327
 end
329 328
 
330 329
 function cbRunPreprocessing(src,evnt,model,task)
331
-
332
-% parse the GUI and pass parameters as structure
333
-disp('RUN');
334
-timeLine = getTimeLineParams(model);
335
-subjects = getSubjectCellList(model);
336
-classDef = parseClassDef(model);
337
-% images
338
-% normalization
339
-
340
-switch task
341
-    case 'COORD'
342
-        disp('COORD');
343
-        coordinates= 'parse me'
344
-    case 'ROI'
345
-        disp('ROI');
346
-        runROIImageMaskMode(subjects,timeLine)
347
-    case 'FBS'
348
-        disp('FBS')
330
+main(model,task)
349 331
 end
350
-end
351
-
352
-
353
-% function cbRunCoordTable(src,evnt,model)
354
-%     display('RUN Coord-Table Mode');
355
-%     main('COORD-LOOKUP-TABLE',model);
356
-% end
357
-% function cbRunROIImage(src,evnt,model)
358
-%     display('RUN Image-Mask Mode');
359
-%     main('ROI-IMAGE-MASK', model);
360
-% end
361
-% function cbRunFBS(src,evnt,model)
362
-%     display('RUN Full Brain Searchlight Mode');
363
-%     display('not implemented.');
364
-% end
365
-
366 332
 
367 333
 function label = createLabel(parent,  pos, labelText)
368 334
     label = uicontrol(parent,'Style','text','Units','normalized','String',labelText,'Position',pos);
369 335