f780216026974f7d59ac9c2ea819a96d10bf8af6
Christoph Budziszewski working: SingleSubject, Coo...

Christoph Budziszewski authored 15 years ago

1) function subjectStruct  = runROIImageMaskMode(args)
Christoph Budziszewski moved things

Christoph Budziszewski authored 15 years ago

2) 
Christoph Budziszewski working: SingleSubject, Coo...

Christoph Budziszewski authored 15 years ago

3) % global SVMCROSSVAL_SUBJECTSTRUCT_NAME;
Christoph Budziszewski snapshot, classification

Christoph Budziszewski authored 15 years ago

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 working: SingleSubject, Coo...

Christoph Budziszewski authored 15 years ago

7) nSubjects = numel(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) 
Christoph Budziszewski working: SingleSubject, Coo...

Christoph Budziszewski authored 15 years ago

10) disp(sprintf('we have %g subjects. Press ANY-Key to continue.\n Use Retrun if your Keyboard lacks the ANY-Key.',nSubjects));
11) pause
Christoph Budziszewski roi image working

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

32)     
Christoph Budziszewski schwimmen.

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

37)     % calculate psth
Christoph Budziszewski coordTabel works for JZ006

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

52) end
53) 
Christoph Budziszewski working: SingleSubject, Coo...

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

55)