Automatic detection of hippocampal atrophy on magnetic resonance images