Causes of a cavitating lesion in the chest radiograph are all except -
Haematoma (not hamartoma) causes lung cavitation.
Pulmonary infarct, squamous cell carcinoma of lung, RA & Caplan's syndrome can also cause lung cavitation.
Hamartoma
Pulmonary infarction
Squamous carcinoma of the bronchus
Caplan's syndrome