function contrast(imagedata)
%Gets the contrast from the plot
%Input: imagedata
%Kevin Baggett
%Thu Jul 26 22:26:55 UTC 2001

[nrows,ncols]=size(imagedata.mimage);
array=reshape(imagedata.mimage,1,nrows*ncols);
minVal=min(array);
maxVal=max(array);
figure(50)
hist(array,[minVal:(maxVal-minVal)/199:maxVal]);
title('Pixel Intensity Histogram');
Trshd=input(['Insert Threshold Value [between ' num2str(minVal) ' and ' num2str(maxVal) ']:  ']);
if Trshd<minVal | Trshd>maxVal
	disp(['Threshold Value must be between ' num2str(minVal) ' and ' num2str(maxVal)]);
	Trshd=maxVal;
end
figure(1)
caxis([minVal Trshd]);
close(50)