Modelling of Thermal Line Scanning for the Inspection of Delamination in Composites and Cracking in Metals