private/imageMaskNames.m
259bc793
 function imageMask = imageMaskNames(subjectDir)
 
55ebec12
 switch getSPMVersion
     case 'SPM5'
         filter = '^.*\.hdr$';
         [files, dirs] = spm_select('List', fullfile(subjectDir,'a'), filter);
de857369
     case 'SPM2x'
         files = 'swrfandersen-0003-00001-000001.hdr';
55ebec12
     otherwise
         filter = '^.*\.hdr$';
         files = getFilteredFileList(fullfile(subjectDir,'a'),filter,0);
 end
259bc793
 
55ebec12
 for i = 1:size(files,1)
259bc793
 %     rfiles = regexpi(files(i,:),'^.*.-','match')
     files(i,:);
     token{i} = strtok(files(i,:),'-');
 end
 
 imageMask = unique(token);
 
de857369
 end