0e963b354da4072cdc459ff95838f440385ee9fa
Christoph Budziszewski roi image working

Christoph Budziszewski authored 15 years ago

1) function runROIImageMaskMode(args)
Christoph Budziszewski moved things

Christoph Budziszewski authored 15 years ago

2) 
Christoph Budziszewski snapshot, classification

Christoph Budziszewski authored 15 years ago

3) global SVMCROSSVAL_SUBJECTSTRUCT_NAME;
4) 
Christoph Budziszewski roi image working

Christoph Budziszewski authored 15 years ago

5) subjects = args.subjects;
Christoph Budziszewski coordTabel works for JZ006

Christoph Budziszewski authored 15 years ago

6)    
Christoph Budziszewski roi image working

Christoph Budziszewski authored 15 years ago

7) nSubjects = size(subjects);
Christoph Budziszewski coordTabel works for JZ006

Christoph Budziszewski authored 15 years ago

8) sessionlist = args.sessionList;
Christoph Budziszewski roi image working

Christoph Budziszewski authored 15 years ago

9) 
10) 
11) for s = 1:nSubjects
12)     subjectStruct{s}.dir = fullfile(args.basedir,cell2mat(subjects(s)));
Christoph Budziszewski coordTabel works for JZ006

Christoph Budziszewski authored 15 years ago

13)     d = load(fullfile(subjectStruct{s}.dir,'results','SPM.mat'));
14)     subjectStruct{s}.des = d.SPM;
Christoph Budziszewski roi image working

Christoph Budziszewski authored 15 years ago

15)     subjectStruct{s}.name = cell2mat(subjects(s));
16)     subjectStruct{s}.roiFile = ui_selectRoiImage(...
17)         sprintf('Select ROI Files for %s',subjectStruct{s}.name),...
18)         fullfile(subjectStruct{s}.dir,'results','roi'));
19) end
20) 
21) 
22) 
23) for s = 1:nSubjects
24)     % load image data
25)    
26)     disp('fetching volume definitions, please wait');
Christoph Budziszewski coordTabel works for JZ006

Christoph Budziszewski authored 15 years ago

27)     subjectStruct{s}.volumes = spm_vol(getImageFileList(subjectStruct{s}.dir,sessionlist,args.mask));
Christoph Budziszewski roi image working

Christoph Budziszewski authored 15 years ago

28) 
29)     disp('computing volume values, please wait');
Christoph Budziszewski coordTabel works for JZ006

Christoph Budziszewski authored 15 years ago

30)     
Christoph Budziszewski schwimmen.

Christoph Budziszewski authored 15 years ago

31)     extr = calculateRoiImageData(subjectStruct{s}.volumes,subjectStruct{s}.roiFile);
32)     
33)     nVoxel = size(extr(1).dat,1);
34) 
Christoph Budziszewski roi image working

Christoph Budziszewski authored 15 years ago

35)     % calculate psth
Christoph Budziszewski coordTabel works for JZ006

Christoph Budziszewski authored 15 years ago

36)     pstopts.des = subjectStruct{s}.des;
37)     pstopts.eventList = args.eventList;
38)     pstopts.sessionList = sessionlist;
39) 
40)     disp('computing psth');
Christoph Budziszewski schwimmen.

Christoph Budziszewski authored 15 years ago

41)     for iVoxel = 1:nVoxel
42)         rawdata = [];
43)         for iImage = 1:length(extr);
44)             tmp = extr(iImage);
45)             rawdata = [rawdata tmp.dat(iVoxel)];
46)         end
47)         subjectStruct{s}.pst{iVoxel} = calculatePST(args.timeline,pstopts,rawdata);
48)     end
Christoph Budziszewski coordTabel works for JZ006

Christoph Budziszewski authored 15 years ago

49)     disp('done');
Christoph Budziszewski moved things

Christoph Budziszewski authored 15 years ago

50) end
51) 
Christoph Budziszewski snapshot, classification

Christoph Budziszewski authored 15 years ago

52) assignin('base',SVMCROSSVAL_SUBJECTSTRUCT_NAME,subjectStruct);
Christoph Budziszewski roi image working

Christoph Budziszewski authored 15 years ago

53)