Skip to main content Switch to mobile version anatomy-cardiovasc-network 0.1.1 Research-sourced cardiovascular vessel graph for the 3D Anatomy Model, with figure and 3D mesh export code
pip install anatomy-cardiovasc-network Copy PIP instructions
A graph-driven cardiovascular module for 3D Anatomy Model (isaac070405.github.io/3D-Anatomy-Model). Vessels are stored as a directed graph (nodes + edges) with 4D centerlines ([x, y, z, radius_mm]). The viewer builds tapered tubes, layer peeling, flow-path tracing and solid lumen cross-sections on transverse, coronal and sagittal planes.
pip install -e "anatomy-cardiovasc-network[png,test]" # from the repository root anatomy-cardiovasc figures --out figures # figures 1 to 4, 6 and 7 anatomy-cardiovasc figures --only 4 7 --out figures # a subset anatomy-cardiovasc build # regenerate aorta_centerline.json from the generator anatomy-cardiovasc data-path # where the packaged graph JSON lives anatomy-cardiovasc blender-script # path of the Blender curve import script import anatomy_cardiovasc_network as cv graph = cv.load() # dict with nodes and edges, every edge tagged "sourced" or "estimate" from anatomy_cardiovasc_network.figures import REGISTRY REGISTRY[4].run("figures") # one figure from Python Core dependencies are numpy, matplotlib, networkx, scipy, plotly and trimesh. The png extra adds kaleido for PNG copies of the Plotly figures, which needs a Chrome or Chromium binary. Without it, only the HTML files are written. Tests: pytest anatomy-cardiovasc-network/tests.
Blender Curves (Bezier / NURBS + Alt+S radii) | v export_vascular_graph.py (bpy) vascular_network.json (Directed Graph + 4D Centerlines) | v VascularNetworkLoader.js (Three.js) 1. Tapered tube BufferGeometry 2. Layer peeling (artery / vein / portal) 3. Anatomical plane slicing + lumen caps 4. Raycast inspection and graph pathfinding Data schema (vascular_network.json)
source to target follows the direction of blood flow. Coordinates are world millimetres.
Authoring in Blender
Model Bezier or NURBS curves in the same coordinate space and origin as the skeletal and visceral meshes.
Draw curves in flow direction (heart to organs for arteries, organs to heart for veins). Use Edit Mode, Segments, Switch Direction to reverse.
Set taper with Alt + S (Set Curve Radius) on control points in Edit Mode.
Optional: place Empty objects named NODE_
Optional: add custom properties (vessel_name, circuit, vessel_type, depth_layer, oxygenated) on a curve to override name-based inference.
Run: open the Scripting workspace, load src/anatomy_cardiovasc_network/blender/export_vascular_graph.py, check SCALE_TO_MM (1000.0 for metre scenes, 1.0 for mm scenes) and SNAP_TOLERANCE_MM (1.5), select the curves (none selected exports all visible curves), then Run Script.
Three.js integration
import { VascularNetworkManager } from './js/VascularNetworkLoader.js'; renderer.localClippingEnabled = true; // required for plane clipping const vascular = new VascularNetworkManager({ scale: 0.001, tubularSegments: 48, radialSegments: 16 }); scene.add(await vascular.load('./src/anatomy_cardiovasc_network/data/vascular_network.json')); Layer peeling:
vascular.setLayerVisibility({ showArteries: true, showVeins: true, showPortal: true, showSuperficial: false, showDeep: true }); Slicing clips the tubes and adds elliptic lumen caps (semi-axes r / cos(theta) and r) so oblique cuts look sealed:
vascular.setAnatomicalSlice('transverse', 0.965, false); // 'transverse' (Y), 'coronal' (Z), 'sagittal' (X) vascular.setAnatomicalSlice(null); // clear Raycast inspection (mesh.userData holds the vessel attributes):
const hits = raycaster.intersectObjects(vascular.vesselsGroup.children); if (hits.length) { const v = hits[0].object.userData; vascular.highlightVessel(v.id); console.log(v.vessel_name, v.circuit, `${v.radius_mm} mm`); } Sources
Thoracic aortic radii from the brachiocephalic origin to the diaphragm (Hager 2002, healthy CT, n=70), abdominal aortic radii (Ezenwugo 2020, healthy ultrasound, n=400), the sinus bulge (14.9 mm) and the three arch branch origins (Chassin-Trubert 2020, patients) now come from research_findings.md. The CT to ultrasound step at the diaphragm (12.15 to 7.9 mm) is a method difference between cohorts. Visceral branch radii other than the sourced ostia remain estimates. Visceral branches (celiac Adachi Type I, SMA, renals, IMA) are in src/anatomy_cardiovasc_network/data/aorta_centerline.json as edges ABD01 to ABD08; paths follow the viewer and end at the viewer kidney hilum. Upper-limb arteries are edges ARL01 to ARL10 (left) and ARR01 to ARR10 (right, x-mirrored): axillary, brachial, radial, ulnar, interosseous and both palmar arches. Their radii are estimates. Recurrent, collateral and digital branches are not modelled.
Literature checked for radii (PubMed, abstracts only)
No paper was found for brachiocephalic, carotid, subclavian, axillary, brachial or interosseous radii.
Head and neck sources (PubMed abstracts only)
No source found yet for vertebral, middle, anterior and posterior cerebral, communicating, facial, lingual, occipital and superior thyroid radii. Circle of Willis paths are the viewer's, joined into a graph: PCA P1 and P2 split at the posterior communicating junction (viewer PCA path bent to meet it), anterior communicating artery directed right to left (flow runs either way).
Pelvis and leg sources
Not sourced: taper ends of the superficial femoral (3.4 start), popliteal (2.4 end), tibioperoneal trunk, anterior tibial end, fibular end, internal iliac end, inferior epigastric and profunda radii. The viewer draws the common iliac as 38.5 mm and the external iliac as 43.6 mm, against roughly 50 to 60 mm and 80 to 100 mm in adults, so both are short, and the registration is kept. The inferior epigastric starts at the inguinal node and skips the viewer's first control point, which sits 58 mm in front of the artery. Not modelled (no viewer path): median sacral, iliolumbar, circumflex iliac, circumflex femoral, genicular, perforating and plantar arteries, and the branches of the internal iliac.
Shoulder and arm branch sources
Estimates: axillary, brachial and forearm trunk radii from the arm section, plus the superior thoracic, thoracoacromial (now 2.2 to 2.0, from mean D 4.2 mm in 12 fixed cadavers, PMID 31018692) and its acromial, deltoid and pectoral branches, lateral thoracic, thoracodorsal, anterior circumflex humeral, profunda brachii, the collaterals, the ulnar and interosseous recurrents, and all taper ends. A search for normal axillary and brachial diameters found only patient series (axillary median 10.7 to 14.6 mm in aortic disease candidates), so those stay estimates. The viewer draws these branches thicker than adult anatomy, so its radii were not used. The elbow anastomosis closes at four shared nodes (anterior, posterior, posterior medial, lateral), merged where the viewer paths end within 12 mm of each other. The thyrocervical trunk and its branches, the hand branches (palmar carpal, digital, dorsal carpal) and the vertebral to subclavian side branches are not modelled yet.
Coronary and thyrocervical sources
Estimates: taper ends of all four coronary arteries, thyrocervical trunk (1.9 to 1.7), inferior thyroid, suprascapular, dorsal scapular and its two small branches. The viewer's coronary tubes start at valve level, 15 mm below the ostia (15 mm above the annulus, Xu 2023), so each coronary edge begins at the ostium node and passes through the viewer's first point. Both ostium nodes sit on the aortic axis at the same point. Not modelled (no viewer path): diagonal, marginal, septal, sinoatrial, conus and posterior descending branches, and the coronary veins.
Vein sources, stage 1 (caval trunks, brachiocephalic, jugular, subclavian, axillary, azygos, renal, gonadal, iliac, femoral)
Veins run in the direction of flow toward the heart (vessel_type "vein", oxygenated false). Paths are the viewer's vein splines, reversed. Right-side veins are the x mirror of the left where the viewer draws one side. Caval trunks end at the right atrium orifice nodes RA_SVC_ORIFICE and RA_IVC_ORIFICE (no chamber node exists yet).
Estimates (no source found): brachiocephalic vein (7.0), subclavian vein (5.0), renal veins (4.0), gonadal veins (1.5 to 2.0), femoral vein (4.5), external iliac vein (5.5), internal iliac vein (3.5), azygos taper to the arch (3.0). The right iliac and the renal vein papers found gave no usable diameter in the abstract. Lengths follow the viewer paths, so the common and external iliac veins are about half the adult length, as for the iliac arteries. The azygos arch is re-routed to enter the SVC at about T4, because the viewer arch ends 25 mm above the SVC origin. Not yet modelled: hepatic, lumbar, hemiazygos, inferior mesenteric, arm and leg deep and superficial veins, head and neck veins and sinuses, portal system, cardiac veins.
Vein sources, stage 2 (arm and leg veins)
Paths are the viewer's vein splines (anatomy-part1.js, anatomy-extras.js), reversed where needed so flow runs toward the heart. Superficial veins carry depth_layer "superficial". The viewer computes the saphenous veins from thigh and calf surface profiles at runtime, so both saphenous paths here are drawn by hand along the medial thigh and calf (estimate).
Estimates: radial and ulnar veins (1.2), brachial veins (2.0), cephalic (1.8 to 2.5), basilic (2.0 to 3.0), median cubital (1.5), median antebrachial (1.2), dorsal network (1.2), popliteal (3.5), tibial veins (1.5 to 2.5), small saphenous (1.5 to 2.5), great saphenous taper below the junction (1.6). Not modelled: perforating veins, profunda femoris vein, and the digital and metacarpal veins.
Vein sources, stage 3 (head and neck veins and dural sinuses)
Estimates: all sinuses (superior sagittal 3.0, straight 2.0, transverse and sigmoid 3.0, inferior petrosal 1.5), inferior ophthalmic vein (0.9), supraorbital, supratrochlear and angular veins (0.8 to 1.1), facial vein (1.3 to 1.5), lingual vein (0.9), superficial temporal vein (1.0), retromandibular vein and its anterior division (2.0, 1.5), external jugular vein (2.0), deep facial vein (0.8), maxillary vein (1.1), inferior alveolar vein (0.5). No paper with a usable human diameter was found for these. The external jugular vein ends on the subclavian vein 14 mm from the viewer's end point so that it joins the vein. The inferior petrosal sinus has no viewer path and is drawn from the cavernous sinus to the jugular bulb. The ten pterygoid plexus loops are one node and the cavernous sinus is one node. Not modelled: cerebral, cerebellar and emissary veins, vertebral and occipital veins, thyroid veins, the internal jugular's lower tributaries, the superior and inferior sagittal tributaries, and the sphenoparietal, petrosal and occipital sinuses other than the inferior petrosal.
Vein sources, stage 4 (portal system)
Paths are the viewer's portal vein splines (anatomy-part1.js). Edges use vessel_type "portal_vein" and circuit "hepatic_portal", and all three drain to the porta hepatis node. The viewer draws no inferior mesenteric vein or right and left portal branches, so those three edges (VPV04 to VPV06) are hand-drawn and listed below the table.
The three trunk radii are sourced. The splenic vein is 204 mm in the model, which is about the adult length range, and the portal vein is 87 mm.
Added to stage 4: right portal vein VPV04 (r 7.85, 21.0 mm, from Huang 2023 diameter 15.7 mm and the 20.96 mm male cast length, PMID 30637156, 10.5115/acb.2018.51.4.232) and left portal vein VPV05 (r 6.7, 33.7 mm, diameter 13.4 mm and 34.5 mm male cast length). Inferior mesenteric vein VPV06 has r 2.7 from a CT diameter of 5.4 +/- 0.9 mm in 28 rectal cancer patients without venous invasion (PMID 31582328, 10.1016/j.carj.2019.06.006, abstract only, patient series). Its 153.5 mm path and the join with the splenic vein (which now splits into VPV02A and VPV02B) are estimates. Hemiazygos and accessory hemiazygos veins have no adult diameter in the PubMed results, so they stay unmodelled.
Vein sources, stage 5 (cardiac veins)
Paths are the viewer's cardiac vein splines (anatomy-part1.js). The great cardiac vein runs from the apex to the coronary sinus start, the middle cardiac vein joins the coronary sinus, and the coronary sinus ends at the right atrium coronary sinus orifice node RA_CS_ORIFICE.
Estimate: middle cardiac vein r 1.2 mm. The radius steps from 1.38 to 4.35 mm at the coronary sinus start because the two sources use different methods (fixed hearts against CT). The viewer's great cardiac vein is 229 mm long against the cadaver mean of 68 mm, the same mismatch as the viewer's left anterior descending and circumflex arteries. Not modelled: anterior, posterior and left marginal cardiac veins, the small cardiac vein, Thebesian veins and the oblique vein of the left atrium, because the viewer draws no path for them.
Length comparison with the literature
Path lengths come from the viewer splines and are not rescaled. The review in research/research_findings.md found adult length data only for the coronary arteries, and those are CT visualised segments, so they are lower bounds.
One 1975 angiographic series (Shendrik, PMID 1217982, Russian-language, no DOI) gives a mean abdominal aorta length of 177.1 mm against 236.3 mm here (ratio 1.33). No adult length was found for the common and external iliac arteries or veins, the great cardiac vein (second source) or the ascending aorta, so the shortened iliac paths stay undocumented.
Pulmonary circuit, chambers and valve annuli
The pulmonary trunk, both pulmonary arteries and the four pulmonary veins are in src/anatomy_cardiovasc_network/data/aorta_centerline.json as edges PUL01 to PUL07 (circuit "pulmonary"), with paths from the viewer (anatomy-part1.js lines 753 to 795) and radii from the table below. Each vessel keeps one radius along its path (trunk 12.95, right and left artery 10.15 and 9.85, veins 8.8, 8.3, 8.55 and 7.4 mm). The trunk starts at a pulmonary valve node, the arteries end at the lung hila, the veins start at the hila and end at four left atrium orifice nodes. The lung capillary bed is not modelled. The four heart chambers are single chamber nodes (CH_LV, CH_RV, CH_LA, CH_RA) placed at the viewer chamber centres, with no edges. Their reference field holds the sourced ventricular volume indices, septal and posterior wall thickness, left ventricular internal diameter and left atrial volume from the table below. The right atrium node has no reference values because no adult volume was found, and no valve annulus value is stored because no healthy-adult source exists (the viewer annulus radii of 9.5 to 12.5 mm are unsourced estimates). The ostium to first bifurcation distances (14.5, 17.6, 7.0 and 13.5 mm) are not drawn. Values come from research_findings.csv (Section D), all from PubMed abstracts. Radius is half the printed diameter.
Recommended value per vessel
The pulmonary veins come from a patient series, and the two pulmonary artery diameters carry the unit warning above.
Items with no usable adult source (current gap)
Pulmonary trunk bifurcation angle. Current gap.
Lobar pulmonary arteries. Current gap.
Common pulmonary venous ostium frequency. Current gap.
Tricuspid annulus diameter, healthy adults. Current gap.
Mitral annulus diameter, healthy adults. Current gap.
Pulmonary valve annulus diameter, healthy adults. Current gap.
Aortic annulus diameter, healthy adults. Current gap. The aortic root here keeps the annulus D 22.0 mm from Xu 2023.
Right atrium volume and dimensions. Current gap.
Every annulus figure the search returned came from a surgical or transcatheter patient cohort, so none is listed as normal.
Vein sources, stage 6 (hepatic and deep cerebral veins)
The viewer has no hepatic or cerebral vein paths, so all seven edges are hand-drawn inside its liver (anatomy-part1.js, right lobe centre x -70 mm, left lobe centre x +20 mm) and brain. The hepatic vein entry node IVC_HEPATIC moved from y 1180 to y 1140 mm, just above the viewer's liver dome, so the hepatic veins join the IVC where the liver ends. The caval segment above it is renamed suprahepatic and the renal segment VCA02 now ends at the entry (86 mm instead of 134 mm).
Estimates: right hepatic vein start radius 3.2 and its 89 mm path, the common trunk radius 3.8, the middle (2.5 to 3.4) and left (2.2 to 3.2) hepatic veins with their paths, and the great cerebral vein radius (1.03 to 2.0, matched to its neighbours). The straight sinus is 60 mm in the model against 43.6 mm in the CT series, because the viewer path is kept. Not modelled: caudate and accessory hepatic veins, the superficial middle cerebral and basal veins (no adult measurement found), the septal and thalamostriate tributaries, and the right and left portal branches.
The vein graph holds 136 edges from six stages, all ending at right atrium orifice nodes (RA_SVC_ORIFICE, RA_IVC_ORIFICE, RA_CS_ORIFICE) or on a larger vein. Sourced radii: SVC, IVC, common iliac, axillary, internal jugular, azygos origin, common femoral, femoral, great saphenous, superior ophthalmic, common facial, portal system and its right and left branches, coronary sinus, right hepatic vein and internal cerebral veins. All other vein radii are labelled estimates, including the inferior mesenteric vein path. Not modelled: lumbar and hemiazygos veins, the superficial cerebral and basal veins, and the minor cardiac veins.
Figures and 3D export
anatomy-cardiovasc figures writes every figure below. Figure 5 (graph tubes over the viewer organ meshes) is not scripted.
To add a figure, create figures/
Released: Dec 3, 2026
Both files in this release have provenance metadata.
View provenance details
MIT View SPDX License List
anatomy cardiovascular vascular network networkx three.js education
Development Status 3 - Alpha
Intended Audience Education
Programming Language Python :: 3
Topic Scientific/Engineering :: Medical Science Apps.
Scientific/Engineering :: Visualization
Release files for anatomy-cardiovasc-network 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
Built distribution (wheel)
Total release size: 239.3 kB
Release files / anatomy_cardiovasc_network-0.1.1.tar.gz
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 3, 2026.
Security for anatomy-cardiovasc-network 0.1.1
Both files in this release have been uploaded with provenance metadata.
With provenance anatomy_cardiovasc_network-0.1.1.tar.gz Dec 3, 2026
Attestation for anatomy_cardiovasc_network-0.1.1.tar.gz
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.
Release history Release notifications | RSS feed
Dec 3, 2026 2 release files Full provenance
"PyPI", "Python Package Index", and the blocks logos are registered trademarks of the Python Software Foundation.
© 2026 Python Software Foundation
Deployed from 107c339











