Laser scanning measurement of the density distribution of confined 6Li+ ions