Calculation of three-dimensional refractive-index field using phase integrals