An iterative algorithm based on optical path difference (OPD) and ray deflection is proposed to obtain the DT (deuterium-tritium)-layer refractive index and thickness of the ICF (inertial confinement fusion) target simultaneously. Starting from an assumed initial value, the refractive index and thickness are solved back and forth until the iteration stopping criterion is reached. Simulations show that the relative retrieval error of the DT-layer refractive index is better than 0.05% after finite iterations, and that of the thickness is better than 0.1%. Experiments show that the target shell refractive index and thickness can be retrieved with a relative error below ±2%. The test uncertainties from experiments were also analyzed.