function cimage=scaleimage(imagedata)
% This function scales and inverts an image
% Kevin Baggett
% 01 Aug 2001 17:31:42 
% Inputs: imagedata - image of the subplot
% Outputs: cimage - 3D-image

maximage=max(max(imagedata));
minimage=min(min(imagedata));
scaledimage=(imagedata-minimage)/(maximage-minimage);
newimage=scaledimage;

cimage=cat(3,newimage,newimage,newimage);
