An angiogram is a test for heart disease. The doctor places a thin tube into your heart to take X-rays. It can tell your doctor if you’re at high risk of having a heart attack, or if you need surgery. But you may not need this test if you have stable heart disease. Instead, your doctor will probably prescribe certain medicines and recommend lifestyle changes.