Photorefractive imaging of semiconductor wafers