function dspim(inim,new,normalize,cmap)
if nargin>=4, [colors dummy] = size(cmap);end;
if nargin<4, colors=64; cmap=hsv(colors);end;
if nargin<3, normalize=1;end;
if nargin<2, new=1;end;
if new==1
figure
end
if normalize==1
% minmat.m version 1.1
mn=min(inim(:));
% maxmat.m version 1.1
mx=max(inim(:));
inim = round((inim-mn)/(mx-mn) * ( colors - 1));
% inim = round(inim * (colors - 1));
image(inim);
else
image(inim)
end
% axis image;
axis normal;
% colormap([linspace(0,1,255)'*ones(1,3)]);
colormap( cmap );
colorbar;
end