This document describes a method for analyzing cardiac MRI images to identify scar tissue from a previous heart attack and assess the risk of future cardiac arrhythmias. Analysis of the scar tissue location and extent seen on MRI images can indicate the likelihood of arrhythmias occurring and help determine whether a patient should receive an implantable cardiac defibrillator. The technology provides improved risk stratification by predicting arrhythmia risk based on MRI findings, which could help guide decisions about costly defibrillator implants.