We trained a three-dimensional visual foundation model directly on 5.24 million routine clinical computed tomography (CT) and magnetic resonance imaging (MRI) image series so that it learned a shared representation of neuroanatomy and disease. The model demonstrated state-of-the-art diagnosis, in contrast to foundation models that are trained on public Internet and medical data, and enabled preliminary report generation and triage in real health systems.