Cerebral Angio

How it was made

One real MRA case, public atlases, and a set of scripts that turn them into a model you can rotate.

Parts are measured from a scan and parts are generated or stylized. Each step below says which. Nothing here has been formally validated against clinical imaging.

1. One real case

The arteries come from a single patient, case topcow_mr_025, in the TopBrain data release (University Hospital Zurich; TopCoW and TopBrain challenges). The release pairs CT and MR angiography of 25 patients with expert labels for each artery. This site uses the MR angiography image and its labels. It is one anatomy, not an average, and it has a complete circle of Willis.

2. From labels to a vessel graph

The labeled arteries are skeletonized into centerlines, and the radius is measured along each one. The result is a directed graph: each segment knows its name, its radius and which way blood flows from the injection site. Contrast filling is computed on that graph, which is why the anterior and posterior communicating arteries can be switched on and off.

The labels stop at the proximal branches. Further distal vessels were traced from the MRA image itself with a ridge filter and added to the graph. They are incomplete.

3. Brain and anatomy from atlases

The brain surface, the skull envelope and the deep structures come from the MNI152 template and the Neuromorphometrics atlas. The vessel graph is then placed in that space by anatomical landmarks: the basilar artery on the ventral brain stem, the M2 branches on the insula, the distal anterior cerebral artery along the cingulate gyrus, A1 just above the optic chiasm. The match is approximate, within a few millimetres.

More layers come from other atlases: Brodmann areas and thalamic nuclei (Talairach), white matter pathways (Juelich), cerebellar lobules (AAL) and the main sulci (Destrieux). Optic nerves, optic tracts, eyes, pituitary and infundibulum are schematic and placed from the chiasm.

4. Small branches: generated, not measured

An MRA does not show the small cortical arteries, but a real angiogram does. The Extended branches switch adds them. They are grown from the labeled arteries across the brain surface by space colonisation, an algorithm that makes branching trees, with calibres following Murray's law. Density, branch length and angles were tuned against 50 labeled real DSA sequences from the DIAS dataset, measured with the same rules on real and simulated images. They look plausible, but they are schematic and not patient data. Switch them off to see only what the scan shows.

5. Veins and the venous phase

Cortical veins come from the VENAT atlas (7 T susceptibility maps of 20 volunteers). The sagittal and straight sinuses, the vein of Galen and the internal cerebral veins come from the CT labels of the same patient. The transverse and sigmoid sinuses and the jugular veins are schematic. The timing is a stylized model: each vein starts to fill after a capillary delay, flow speed grows with calibre, and a sinus gets denser as its tributaries deliver contrast. It is not a measurement.

6. Stroke territories and the infarct

The borders of the supply territories come from the Johns Hopkins Arterial Atlas (ACA, the parts of the MCA, PCA, lenticulostriate, choroidal and cerebellar territories). For each point on the cortex and in the deep structures, the atlas says which artery family may feed it, and the nearest branch of this patient's vessel graph in that family becomes its owner. So the borders are an atlas average and the branches are from one patient. The brain stem uses a simpler level rule. Cutting an artery stops filling beyond the cut and marks the tissue it fed. The time bar grows a core, a penumbra, edema and a midline shift with smooth curves and invented time constants. It is a teaching illustration, not a prediction.

7. Visual pathway

The optic radiation is drawn as fibre streamlines: least-cost paths through the Juelich probability map from the lateral geniculate body to the calcarine cortex. They are an illustration, not tractography of this patient. The visual field charts are teaching schematics.

8. The viewer

The site is a single web page. The 3D view uses three.js. A small C-arm window beside the angle map is linked to the sliders, the angiogram and the 3D view. It is a drawing, not a scaled device. The angiogram is drawn in the browser from the same 3D centerlines, projected with the C-arm angles you choose. The data is embedded in the page, so nothing is sent to a server while you use it.

Built with Claude Code

The code and the data-processing scripts were written with Claude Code, Anthropic's AI coding assistant, following the author's instructions and feedback. The choice of data sets, the anatomy rules and the stylized models were made during that work, so the limits above apply. If you find an error in the anatomy or the teaching content, please use the feedback page. The author is on the Author page.