Nearly all advanced mobile robotic tasks require some knowledge of the robot location in the environment. Autonomous Underwater Vehicles are usually endowed with acoustic devices to perform localization, because underwater scenarios pose important limitations to light based sensors. One of these acoustic devices is the Mechanically Scanned Imaging Sonar (MSIS). This sensor scans the environment by emitting ultrasonic pulses and it provides echo intensity profiles (beams) of the scanned area. Our goal is to obtain range scans instead of the beams as they are provided by the MSIS. Accordingly, the proposal of this paper is to process the acoustic images in order to compute accurate distances from the sensor to the relevant obstacles in the beam. These range scans are suitable to be used in scan matching, SLAM or other approaches to estimate the robot pose.