In situ imaging of vortices in Bose-Einstein condensates