In situ detection of thermally induced porosity in additively manufactured and sintered objects