function imisto(image)


classim=class(image);
switch classim
case 'double'
    limits(1)=0;
    limits(2)=max(max(image));
case 'uint8'
    limits(1)=0;
    limits(2)=255;
case 'uint16'
    limits(1)=0;
    limits(2)=65535;
end
tempd=double(image);

figure;
edge=[limits(1):limits(2)]-0.5;
x=histc(tempd(:),edge);
bar(x);
%hist(tempd,limits(2)+1);

v=axis; % ottiene i limiti correnti degli assi
axis([limits v(3:4)]); % corregge i limiti dell'asse x a [limits(1) limits(2)]
