feeb21e9909e70f1f74fbbf4b68c761502b17e17
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 first plot button. not work...

Christoph Budziszewski authored 15 years ago

10) disp(sprintf('batch processing  %g subjects.',nSubjects));
Christoph Budziszewski roi image working

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

31)     
Christoph Budziszewski schwimmen.

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

36)     % calculate psth
Christoph Budziszewski coordTabel works for JZ006

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

54)