← Tract viewer · Ideas · Modeling

Methods

How this page is built, which files it loads, and under which licences those files may be reused. Last updated 2026-08-22 (Variant A lamps; PAM50 and Brainstem Navigator are not used).

1. What this page is

A teaching viewer of named human white-matter bundles from the HCP1065 population atlas, with conservative pain-circuitry sketches, Glasser cortical tints, ghost volumes for selected subcortical structures, AMU7T cervical cord occupancy columns, and a Book dorsal-horn circuit schematic, and an AMU7T occupancy zoom of the cervical dorsal horn with Book DRG/rootlets aimed at Lissauer.

It is not a new tractography reconstruction. It does not claim fibre direction. Lengths are atlas medians, not one anatomical path.

The default brain scene is Variant A from /ideas: six systems as lamps (affect, motor, nociceptive processing, TPJ, value, descending modulation). Named nodes are tinted. There are no tracts until you pick a system. A lamp then shows only drawn streamlines that meet two nodes of that system. Overlap is not innervation. Story sketches (body map, unpleasantness, face pain) remain as a second control row. Rostral ventral medulla is named as absent on the descending lamp and is not drawn.

2. Original website and viewer code

The interactive layout and renderer are a fork of Amy Sterling’s MIT-licensed tract page:

This project keeps her copyright notices. Local patches are listed in file headers (js/tracts.js, js/holo3d.js, index.html). The HCP1065 binary was ingested here from Yeh’s public zip. We did not copy her processed tracts.bin or H01-derived meshes.

three.js (core, OrbitControls, GLTFLoader and helpers) is MIT, Copyright 2010–2026 three.js authors. See vendor/three/LICENSE. Those addons are not Amy Sterling’s code.

3. Tractography

  1. Download hcp1065_avg_tracts_trk.zip (SHA-256 344aad4394f18b8926ed5e1bda911ad56e328c6cf75faa45e1302512ad779c67).
  2. scripts/ingest_hcp1065.py reads every TrackVis .trk.gz, asserts 1 mm voxels, measures length on every positive-length streamline, and writes a drawing subsample (at most 160 streamlines × 24 points, int16 hundredths, seed 20260820).
  3. Anatomical checks must pass (left CST on the left, left arcuate frontal–temporal, callosum crosses midline) or the script refuses to write data/.
  4. The page loads data/tracts.json and data/tracts.bin only from that script. python3 scripts/fetch_hcp.py tracts is refused.

Yeh 2022 places the atlas in ICBM 2009a. Streamlines have no direction. The zip has 87 named files. It does not contain a spinothalamic tract, forceps minor, medial forebrain bundle, trigeminothalamic tract, or mammillothalamic tract.

4. Pain sketches and timing

Chains are written in data/pathways-source.json. scripts/build_pathways.py fills lengths from atlas medians and exits if a chain names a missing tract.

The three pain sketches are:

A millimetre total is the sum of per-bundle medians, with each bundle’s p5–p95 shown. Transit time is length / velocity plus 1 ms per hand-entered relay. Velocity is a control, not a measured conduction speed. Order of legs is a teaching device. Still shows the selected bundles without a pulse.

5. Cortical surface and “pain map”

  1. HCP S1200 fs_LR 32k midthickness (MSMAll) is converted to GLB (scripts/fetch_hcp.py surface).
  2. Yeo 7/17 and Glasser HCP-MMP1 labels on that mesh are packed in data/surface-labels.bin from DiedrichsenLab fs_LR_32 GIFTI files.
  3. The default tint (“Pain map”) colours Glasser parcels grouped as S1, S2, M1, SMA, TPJ, ACC, PFC, and insula. Mapping is in data/surface-highlights.json. These are MMP1 parcels, not Brodmann drawings and not a homunculus.

That surface is MNI152NLin6Asym, not ICBM 2009a.

6. Ghost volumes

scripts/fetch_nuclei.py builds translucent meshes:

Thalamus and accumbens are the unfilled Atlas_ROIs marching-cubes meshes (left and right labels in one ghost, openings left as in the atlas). Mesh-edit experiments are on /modeling and are not applied here. Rostral ventral medulla is not in either atlas and is not drawn. HCP1065 has no named tract to or from nucleus accumbens (no MFB). Corticostriatal files (CS_A, CS_P, CS_S) are striatum, not NAcc.

7. Remainder (cerebellum / brainstem / deep grey shell)

scripts/fetch_cerebellum.py subtracts the cortical midthickness from the TemplateFlow MNI152NLin2009cAsym brain mask (voxels more than 10 mm from the surface), keeps the largest piece, and marching-cubes it. Extra mesh islands and leftover cerebral hull (near the HCP cortex and z > 0) are dropped. That mask is not the same template as the tracts or the S1200 surface.

8. Spaces

ObjectTemplate as used here
HCP1065 streamlinesICBM 2009a (Yeh 2022), via TrackVis vox_to_ras
S1200 cortex + Glasser/YeoMNI152NLin6Asym family, fs_LR 32k
Atlas_ROIs nucleiHCP CIFTI 2 mm MNI (NLin6Asym family)
AAN PAG / LCMNI152 1 mm
Remainder shellMNI152NLin2009cAsym
AMU7T cord columnsPAM50-aligned, straightened millimetres (C1–C7)
Book thoracic / lumbar / Sp5c schematicsLocal millimetres authored here. Not PAM50. Not AMU7T stretched. Not Brainstem Navigator.
Dorsal-horn circuit schematicLocal millimetres. Not AMU7T, not ICBM, not HCP1065.
Dorsal-horn anatomy view (default)AMU7T millimetres, C5 filled disk (same section as the cord canvas). Book DRG sits outside that envelope.

The TrackVis affine converts file millimetres to RAS millimetres. It does not convert one MNI variant into another. Laterality checks cannot detect a several-millimetre template offset.

9. Data sources and licences

What the page uses Source Licence Where it lives here
Viewer JS, HTML layout, pathway builder, HCP fetch, cerebellum script Amy Sterling, human-brain; original page tracts.html MIT js/, index.html, scripts/build_pathways.py, scripts/fetch_hcp.py, scripts/fetch_cerebellum.py, third_party/human-brain/
three.js renderer and addons three.js authors MIT vendor/three/ (LICENSE in that folder)
Named streamlines (87 bundles) and derived tracts.* Yeh FC. Nat Commun 13, 4933 (2022). Zip: hcp1065_avg_tracts_trk.zip CC-BY-SA 4.0 data/tracts.json, data/tracts.bin, data/LICENSE
Group-average cortical surface (fs_LR 32k midthickness) HCP S1200; Van Essen et al., NeuroImage 80, 62 (2013) HCP Open Access Data Use Terms meshes/cortex/L.glb, R.glb; terms in third_party/hcp/OPEN-ACCESS-DATA-USE-TERMS.md
Yeo 7/17 network labels on fs_LR 32k Yeo et al., J Neurophysiol 106, 1125 (2011); GIFTI via DiedrichsenLab fs_LR_32 Original paper CC-BY (journal); HCP surface DUT still applies to the mesh. The GitHub listing has no separate licence file in this tree. data/surface-labels.bin (yeo7, yeo17 blocks)
HCP-MMP1 (Glasser) labels on fs_LR 32k Glasser et al., Nature 536, 171 (2016); GIFTI via DiedrichsenLab fs_LR_32 Paper is not a data licence. Mesh remains HCP DUT. Label-file licence is not archived here beyond the papers. data/surface-labels.bin (glasser block), data/surface-highlights.json
Subcortical aseg volumes (thalamus, caudate, putamen, accumbens, amygdala, hippocampus, brainstem) HCP Atlas_ROIs.2.nii.gz (HCPpipelines templates) HCP Open Access Data Use Terms meshes/nuclei/*.glb, data/nuclei.json
PAG and locus coeruleus Edlow et al., Harvard AAN atlas v2.0 (Zenodo 10.5281/zenodo.8161638); methods: Edlow et al., J Neuropathol Exp Neurol 71, 531 (2012) CC0 1.0 meshes/nuclei/pag.glb, lc.glb; third_party/aan/
Remainder shell (cerebellum / brainstem / deep grey) TemplateFlow MNI152NLin2009cAsym brain mask; Fonov et al., NeuroImage 54, 313 (2011) CC BY 4.0 meshes/cerebellum/rest-clipped.glb, data/cerebellum.json
Pain-chain text and parcel groupings This project MIT (repository LICENSE), except numbers quoted from CC-BY-SA medians data/pathways-source.json, data/surface-highlights.json
Cervical cord occupancy columns (C1–C7) AMU7T template (Le Troter et al., ISMRM 2023). WM parcels from Lévy et al., Neuroimage 2015. GM parcels from Hausman 1962. GitHub MIT: template-AMU7T, commit c9f69954. MIT (derived meshes). Histology topology, not 7 T tractography. data/cord-atlas.json, meshes/cord/, third_party/amu7t/
Dorsal-horn circuit schematic (cervical, thoracic, lumbar, Sp5c views) and Book DRG/rootlets Teaching art authored here. Lamina names: Rexed 1952 (cat). Circuit: Todd 2010 (mainly rat I–III). DRG soma and approaching rootlets are Book, aimed at AMU7T Lissauer MIT (repository LICENSE). Book material bookHatch, never atlas fill data/dorsal-horn.json, js/dorsal-horn.js
Cervical dorsal-horn anatomy occupancy (default DH view) AMU7T Hausman GM parcels: dorsomarginal, DH reticular formation, dorsolateral fasciculus (Lissauer), dorsal intermediate zone; Lévy cuneate. Same MIT meshes as the cord canvas MIT. Lissauer is occupancy of the fine-afferent entry zone, not reconstructed DRG axons. Not Rexed laminae meshes/cord/, third_party/amu7t/
PAM50_rootlets.nii.gz (C2–C8 dorsal rootlets on PAM50) Valošek et al., Imaging Neuroscience 2024. File lives in spinalcordtoolbox/PAM50 Not used. Same missing data licence as PAM50 NIfTI. The MIT rootlets code repo does not ship the NIfTI Queued in papers/papers-wanted.html
Thoracic / lumbar / brainstem cord schematics and cord pain sketches (including descending control) Teaching art authored here. Not PAM50. Not AMU7T. Scale cues for enlargement from De Leener 2018 CSA profile. Descending sketch cites Todd 2010 on the horn canvas; AAN PAG/LC stay on the brain canvas MIT (repository LICENSE). Book material data/cord-book.json, js/cord.js
PAM50 template NIfTI (C1–L2 + brainstem) De Leener et al., NeuroImage 165, 170 (2018). Data repo spinalcordtoolbox/PAM50 Not used. No LICENSE file in that data repo (checked 2026-08-22, release r20250730). SCT LGPLv3 covers the toolbox, not these voxels. neuropoly/template MIT covers generation scripts, not PAM50 voxels. A local cache from an earlier pass was deleted. Not in meshes/ Queued in papers/papers-wanted.html. Notice: third_party/pam50/NOTICE
Brainstem Navigator nuclei Bianciardi et al., NITRC toolkit v1.0 (2024). DOI 10.25790/bml0cm.96 Not used. NITRC v1.0 click-through (“Brainstem Navigator License”, read 2026-08-22): non-commercial research only, and “YOU MAY NOT DISTRIBUTE COPIES of the Brainstem Navigator files, or copies of files or of information derived from them, to others outside your organization.” The atlas, templates, and derived meshes are not downloaded and not shipped. Sp5c remains Book Licence text only: third_party/brainstem-navigator/LICENSE. No NIfTI in this tree
Harvard AAN v2.0 Edlow & Kinney 2023, Dryad CC0 1.0. Used for PAG and LC only. File list has no Sp5c / spinal trigeminal nucleus third_party/aan/, meshes/nuclei/pag.glb, lc.glb
Ingest, literature merge, nucleus/AAN meshing This project (ingest_hcp1065.py follows the same TrackVis layout as the MIT fetch_hcp.py) MIT scripts/

10. Cervical cord scene (Atlas)

scripts/build_cord_atlas.py meshes AMU7T per-label binary occupancy (not AMU7T_50_labels.nii.gz intensity codes). The checkout is pinned to commit c9f69954f4bf00f481ced5ef5e37ad55b41c73ec. The template coverage is vertebral C1–C7. The page draws a filled C5 cross-section: 2D occupancy at mid-C5, holes filled only when they are accidental, then extruded 2 mm. That disk is not a GPU clip of a hollow C1–C7 marching-cubes shell (the clip is what looked like a cookie cutter). White-matter keeps its anatomical gray-matter hole. Default highlight is spinal lemniscus and Hausman dorsal-horn parcels. Display name is spinal lemniscus, not spinothalamic tract. Pain sketches on this canvas are teaching chains (nociception, fine touch, CST, face at caudalis, descending control). They do not add pulse timing: occupancy meshes have no atlas median path length. Hemisphere left/right follows the occupancy files (subject left is negative x). Dorsal is toward the top of the screen.

11. Thoracic, lumbar, and brainstem (Book only)

Those sites have no occupancy mesh in this tree. The picker shows a hatched schematic from data/cord-book.json (bookHatch). It is not PAM50 stretched to look like AMU7T. The camera sits closer so the schematic fills the frame. PAM50 and Brainstem Navigator are not used (see the sources table). Brainstem / Sp5c is not AAN. HCP1065 CNV is the trigeminal nerve root on the brain canvas; it is not the spinal trigeminal nucleus.

12. Dorsal-horn schematic

The default third-canvas view is the Book Rexed/Todd cervical circuit. C5 anatomy remains a selectable Atlas view: AMU7T occupancy of the cervical dorsal horn (dorsomarginal nucleus, DH reticular formation, dorsal intermediate zone) plus the dorsolateral fasciculus (Lissauer) and cuneate, on the same C5 filled disk as the cord canvas. Lissauer is the licensed stand-in for fine DRG afferents after they enter the cord. It is not a reconstructed axon and not Rexed lamina I. DRG soma and approaching rootlets are Book teaching geometry aimed at that Lissauer occupancy. No licensed DRG volume is drawn. PAM50_rootlets.nii.gz exists scientifically (Valošek 2024) and is not used (same missing PAM50 data licence).

Rexed/Todd circuit views are Book teaching art. Geometry is authored in data/dorsal-horn.json and drawn by js/dorsal-horn.js. Circuit material is bookHatch, never atlasFill. Lamina names follow Rexed 1952 (cat). Outer/inner lamina II follow Todd 2010, not the 1952 paper. Circuit edges follow Todd 2010 (mainly rat, laminae I–III). Each edge has from, to, sign, species, evidence, citation, and a locator. The rat L4 figure that about 5% of lamina I cells are projection neurons is not a human count. Sp5c is shown as a laminated homologue; the drawing is the spinal circuit, not a trigeminal connectome. Thoracic/lumbar views only change a scale cue and the caption. Gobel stalked cells are not drawn. No pulse timing and no human synaptic counts. Lamina names are drawn as sprites. Selecting a circuit highlight lists each edge as a chain (from, to, sign, species, citation). This canvas is not MRI and not HCP1065. The cord site picker broadcasts tractography-cord-site and stores window.__lastCordSite so a lazy-loaded dorsal-horn canvas can replay the last site. Descending control is a Book arrow (Todd 2010 context). It is not an AMU7T occupancy column and not an HCP1065 PAG–horn tract. PAG and locus coeruleus remain Harvard AAN v2.0 (CC0) on the brain canvas only.

13. What is not shown

14. Reproduce

python3 -m pytest scripts/tests
python3 scripts/ingest_hcp1065.py
python3 scripts/build_pathways.py
python3 scripts/fetch_hcp.py surface
python3 scripts/fetch_cerebellum.py
python3 scripts/fetch_nuclei.py
python3 scripts/build_cord_atlas.py
python3 -m http.server 8765

Open the viewer at the repository root and this page at /methods/.

15. How to cite

Cite the data papers, not this page. For HCP-derived meshes, include:

“Data were provided [in part] by the Human Connectome Project, WU-Minn Consortium (Principal Investigators: David Van Essen and Kamil Ugurbil; 1U54MH091657) funded by the 16 NIH Institutes and Centers that support the NIH Blueprint for Neuroscience Research; and by the McDonnell Center for Systems Neuroscience at Washington University.”

If you reuse the viewer code, keep Amy Sterling’s MIT copyright notice.