A two-step discrete method for reconstruction of temperature distribution in a three-dimensional participating medium