Browse code

enabled radius. but does not work with r>0 !

git-svn-id: https://svn.discofish.de/MATLAB/spmtoolbox/SVMCrossVal@156 83ab2cfd-5345-466c-8aeb-2b2739fb922d

Christoph Budziszewski authored on 16/03/2009 18:55:40
Showing 5 changed files
... ...
@@ -1,4 +1,4 @@
1
-function extr = calculateImageData(filenameList, voxelList)
1
+function extr = calculateImageData(filenameList, voxelList, rad)
2 2
 
3 3
 V = filenameList;
4 4
 
... ...
@@ -6,7 +6,7 @@ vox = voxelList;
6 6
 nVoxel = size(vox,1);
7 7
 nImage = numel(V);
8 8
 
9
-rad = 0;
9
+% rad = 0;
10 10
 
11 11
 for kImage=1:nImage
12 12
     roicenter = round(inv(V(kImage).mat)*[vox, ones(nVoxel,1)]');
... ...
@@ -42,6 +42,7 @@ switch task
42 42
         coordargs.eventList     = classDef.eventMatrix;
43 43
         coordargs.coords        = parseCoordinateTextField(model);
44 44
         coordargs.mask          = mask;
45
+        coordargs.radius        = getSearchlightRadius(model);
45 46
         
46 47
         out.subjectdata = runCoordTable(coordargs);
47 48
         
... ...
@@ -1,7 +1,5 @@
1 1
 function plotDecodePerformance(type,decode,subjectData)
2 2
 
3
-type
4
-
5 3
 header = decode.header;
6 4
 timeline = header.timeline;
7 5
 frameshift = header.frameShift;
... ...
@@ -7,6 +7,7 @@ function subjectData = runCoordTable(args)
7 7
     subjects = args.subjects;
8 8
     nSubjects = numel(subjects);
9 9
     sessionlist = args.sessionList;
10
+    radius = args.radius;
10 11
     
11 12
     disp(sprintf('batch processing %g subjects.',nSubjects));
12 13
 
... ...
@@ -24,7 +25,7 @@ function subjectData = runCoordTable(args)
24 25
         disp('fetching volume definitions, please wait');
25 26
         subjectStruct{s}.volumes = spm_vol(getImageFileList(subjectStruct{s}.dir,sessionlist,args.mask));
26 27
       
27
-        extr = calculateImageData(subjectStruct{s}.volumes,subjectStruct{s}.coords);
28
+        extr = calculateImageData(subjectStruct{s}.volumes,subjectStruct{s}.coords,radius);
28 29
          
29 30
         pstopts.des = subjectStruct{s}.des;
30 31
         pstopts.eventList = args.eventList;
... ...
@@ -13,7 +13,7 @@ DEFAULT.classdefstring  = 'left,\t[9,11,13]\nright,\t[10,12,14]';
13 13
 DEFAULT.voxelstring     = 'SPL l + [ 0, 0, 0] \nSPL r + [ 0, 0, 0]\n';
14 14
 DEFAULT.svmoptstring    = '-s 0 -t 0 -c 1';
15 15
 DEFAULT.svmnfold        = '6';
16
-DEFAULT.searchlightradius = 3;
16
+DEFAULT.searchlightradius = 0;
17 17
 
18 18
 DEFAULT.wd  = fullfile('d:','Analyze','Choice','24pilot');
19 19