function [filein,pathin] = selectimages( title, mselect)

format = {'*.jpg';'*.png';'*.tif';'*.bmp';};

if  strcmp(mselect, 'on')
    [filein,pathin]=uigetfile( format,title,'MultiSelect','on');
else
    [filein,pathin]=uigetfile(format,title,'MultiSelect','off');
end
