Obtaining metric value SimpleElastix

when SimpleElastix calculates a registration it does so by minimising a metric (e.g. Mettes Mutual Information). This is also printed on the console. I want to use registration quality as a way to fine-tune steps that come before the registration. Is there a way to get this number from the the Elastix Image Filter object? The only relevant post I found suggested parsing log files to find that info. Surely there must be a better way!