function imageMask = imageMaskNames(subjectDir)

switch getSPMVersion
    case 'SPM5'
        filter = '^.*\.hdr$';
        [files, dirs] = spm_select('List', fullfile(subjectDir,'a'), filter);
%     case 'SPM2'
%         files = 'swrfandersen-0003-00001-000001.hdr';
    otherwise
        filter = '^.*\.hdr$';
        files = getFilteredFileList(fullfile(subjectDir,'a'),filter,0);
end

for i = 1:size(files,1)
%     rfiles = regexpi(files(i,:),'^.*.-','match')
    files(i,:);
    token{i} = strtok(files(i,:),'-');
end

imageMask = unique(token);

end