git.schokokeks.org
Repositories
Help
Report an Issue
SVMCrossVal.git
Code
Commits
Branches
Tags
Suche
Strukturansicht:
b8f957c
Branches
Tags
master
SVMCrossVal.git
private
parseVoxelList.m
GUI parsing halfway done.
Christoph Budziszewski
commited
b8f957c
at 2008-12-17 17:57:53
parseVoxelList.m
Blame
History
Raw
function voxelList = parseVoxelList(model) voxelList = []; %<ROI Name>,<ROI Modifier>; txt = get(model.txtVoxelDef,'String'); map = model.subjectMap; SubjectID = getSubjectIDString(model); assignin('base','txt',txt); rows = size(txt,1); while all(isspace(txt(rows,:))) rows = rows -1; end for i = 1:rows line = txt(i,:); roi = parseROIName(line); roimod = parseModifier(line); voxelList = [voxelList; getCoordinate(map,SubjectID,roi)+eval(roimod)]; end % voxelList = [... % getCoordinate(map,SubjectID,'SPL l')+[0,0,0];... % getCoordinate(map,SubjectID,'SPL l')+[1,0,0];... % getCoordinate(map,SubjectID,'SPL l')+[-1,0,0];... % getCoordinate(map,SubjectID,'SPL l')+[0,1,0];... % getCoordinate(map,SubjectID,'SPL l')+[0,-1,0];... % getCoordinate(map,SubjectID,'SPL l')+[0,0,1];... % getCoordinate(map,SubjectID,'SPL l')+[0,0,-1];... % getCoordinate(map,SubjectID,'SPL r')+[0,0,0];... % getCoordinate(map,SubjectID,'SPL r')+[1,0,0];... % getCoordinate(map,SubjectID,'SPL r')+[-1,0,0];... % getCoordinate(map,SubjectID,'SPL r')+[0,1,0];... % getCoordinate(map,SubjectID,'SPL r')+[0,-1,0];... % getCoordinate(map,SubjectID,'SPL r')+[0,0,1];... % getCoordinate(map,SubjectID,'SPL r')+[0,0,-1];... % getCoordinate(map,SubjectID,'M1 r')+[0,0,0];... % getCoordinate(map,SubjectID,'M1 l')+[0,0,0];... % ]; 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