Adaptive compression algorithm from projections: Application on medical greyscale images