For the first time, an algorithm for reconstructing an arbitrary distribution of residual stresses by the polarization tomography method for cylindrical rod structures with a radial distribution of the refractive index has been presented. The reconstruction took into account the ray refraction. The algorithm is based on the expansion of the tensor stress field in angular harmonics (singular value expansion). The case of an axisymmetric tensor field with an arbitrary stress gradient along the cylinder axis was considered. Numerical calculations were carried out for an axially symmetric stress distribution in a gradan for the case of a plane deformation state. The reconstruction was based on the expansion of the stress tensor in eigenfunctions of the boundary value problem. The regularized solution of the resolving equation (of Abelian type) used the expansion in Zernike polynomials. The results of the reconstruction are given with taking into account the additional term due to the deflection of the transmission rays as well as without this doing.