git.schokokeks.org
Repositories
Help
Report an Issue
SVMCrossVal.git
Code
Commits
Branches
Tags
Suche
Strukturansicht:
fb860ba
Branches
Tags
master
SVMCrossVal.git
private
runROIImageMaskMode.m
normalization features enabled
Christoph Budziszewski
commited
fb860ba
at 2009-03-16 21:07:46
runROIImageMaskMode.m
Blame
History
Raw
function subjectStruct = runROIImageMaskMode(args) % global SVMCROSSVAL_SUBJECTSTRUCT_NAME; subjects = args.subjects; nSubjects = numel(subjects); sessionlist = args.sessionList; pstopts = args.psthOpts; pstopts.eventList = args.eventList; pstopts.sessionList = sessionlist; disp(sprintf('batch processing %g subjects.',nSubjects)); for s = 1:nSubjects subjectStruct{s}.dir = fullfile(args.basedir,cell2mat(subjects(s))); d = load(fullfile(subjectStruct{s}.dir,'results','SPM.mat')); subjectStruct{s}.des = d.SPM; subjectStruct{s}.name = cell2mat(subjects(s)); subjectStruct{s}.roiFile = ui_selectRoiImage(... sprintf('Select ROI Files for %s',subjectStruct{s}.name),... fullfile(subjectStruct{s}.dir,'results','roi')); end for s = 1:nSubjects % load image data disp('fetching volume definitions, please wait'); subjectStruct{s}.volumes = spm_vol(getImageFileList(subjectStruct{s}.dir,sessionlist,args.mask)); disp('computing volume values, please wait'); extr = calculateRoiImageData(subjectStruct{s}.volumes,subjectStruct{s}.roiFile); nVoxel = size(extr(1).dat,1); % calculate psth pstopts.des = subjectStruct{s}.des; disp('computing psth'); for iVoxel = 1:nVoxel rawdata = []; for iImage = 1:length(extr); tmp = extr(iImage); rawdata = [rawdata tmp.dat(iVoxel)]; end subjectStruct{s}.pst{iVoxel} = calculatePST(args.timeline,pstopts,rawdata); end disp('done'); end % assignin('base',SVMCROSSVAL_SUBJECTSTRUCT_NAME,subjectStruct); end