git.schokokeks.org
Repositories
Help
Report an Issue
SVMCrossVal.git
Code
Commits
Branches
Tags
Suche
Strukturansicht:
8437677
Branches
Tags
master
SVMCrossVal.git
private
parseVoxelList.m
multi-subject support
Christoph Budziszewski
commited
8437677
at 2009-01-05 18:25:16
parseVoxelList.m
Blame
History
Raw
function voxelList = parseVoxelList(model,multisubjectid) voxelList = []; %<ROI Name>,<ROI Modifier>; txt = get(model.txtVoxelDef,'String'); map = model.subjectMap; switch nargin case 1 SubjectID = getSubjectIDString(model); case 2 SubjectID = multisubjectid; otherwise error('spmtoolbox:SVMCrossVal:parseVoxelList:nargin','wrong number of arguments given'); end rows = size(txt,1); for i = 1:rows if all(isspace(txt(i,:))) continue; end line = txt(i,:); roi = parseROIName(line); roimod = parseModifier(line); voxelList = [voxelList; getCoordinate(map,SubjectID,roi)+eval(roimod)]; end end function roi = parseROIName(line) c = 1; roi = ''; while line(c)~=',' roi = [roi line(c)]; c = c+1; end roi = strtrunc(roi); end function roimod = parseModifier(line) c = 1; while line(c)~=',' % skip roi c=c+1; end c=c+1; % skip ',' roimod=''; while line(c) ~= ';' roimod = [roimod line(c)]; c = c+1; end end