function [ bil ] = imget( numberofimages );
%Opens a file dialog a number of times equal to the specified argument. 
%Reads the image file specified [commented out: and immediately range-scales it]. All n*m images
%are stacked into a n*m*i matrix for further use, where i is the number of images.
%
%Type "help imread" and "help rangescale" for more information on the
%functions used herein.
%
%OUTPUTS: bil matrix
global bil;
titlestr = sprintf('Choose File %d of %d',1,numberofimages);
file=uigetfile({'*.jpg;*.bmp;*.png'},titlestr);
img=imread(file);
%img=rangescale(img);
xrows=size(img,1);
xcols=size(img,2);
bil=zeros(xrows,xcols,numberofimages);
bil(:,:,1)=img;
for n=2:numberofimages
titlestr = sprintf('Choose File %d of %d',n,numberofimages);
file=uigetfile({'*.jpg;*.bmp;*.png'},titlestr);
img=imread(file);
%img=rangescale(img);
bil(:,:,n)=img;
end        
end

