Quantitative stress analysis by means of the thermoelastic effect