Skip to main content

Module bodyparts3d_resolver

Module bodyparts3d_resolver 

Source
Expand description

Ingest BodyParts3D (FMA-keyed, CC-BY-SA) — the muscles/bones/glands/nerves that complete the body CCF/HRA (viscera-only) cannot. Pure part-of→system mapping + a native fetch/pack producer. Ingest the BodyParts3D FMA-keyed anatomy meshes — the open library that completes the body the CCF/HRA reference organs cannot: 437 individual muscles, 251 bones, 99 nerves, endocrine + sense-organ glands. Where CCF is viscera-only, BodyParts3D fills the muscular / skeletal / nervous / endocrine / sensory systems.

Licence (precise): the mesh files originate from the BodyParts3D / Anatomography project at lifesciencedb.jp (© The Database Center for Life Science, DBCLS) and are licensed CC-BY-SA 2.1 Japan (Attribution-ShareAlike). We retrieve them via a redistribution repo, github.com/Kevin-Mattheus-Moerman/BodyParts3D — whose own LICENSE (MIT) covers only Moerman’s Julia code + OBJ→STL packaging, not the anatomy data: a permissive wrapper does not relicense the upstream copyleft meshes. So the meshes remain CC-BY-SA and ship as a separate, clearly-licensed pack (share-alike stays contained; the CCF CC-BY-4.0 pack stays permissive). Attribution + citation are recorded per the database’s terms ([BP3D_ATTRIBUTION], [BP3D_CITATION], [BP3D_DATA_DOI]). Data version 3.0 / 20110915 (a single male reference model).

The join (Timothy’s “organs are parts of systems” made real): every mesh is keyed by an FMA id; conventional_part_of.txt gives the part-of hierarchy with the systems themselves as FMA nodes (FMA72954 = muscular system, FMA9668 = endocrine system, …). Walking a structure up the part-of graph until it reaches a system root yields its system membership(s) — and a structure that reaches several roots is genuinely multi-system (the diaphragm resolves to both muscular and respiratory, straight from the ontology).

This module is pure (parse + graph walk), unit-tested against fixtures; the live fetch + pack producer are a #[cfg(not(wasm32))] transport layer at the bottom.

Structs§

Bp3dAsset
One available STL structure: its id and byte size (from the git-trees listing).
Bp3dHierarchy
The BodyParts3D part-of hierarchy: id→name and part→wholes, for resolving a structure to its system(s).
Bp3dPackReport
Honest report of a BodyParts3D pack build.
Bp3dSelection
What to include from BodyParts3D — the bandwidth control (the full set is ~1.3 GB / 937 files).

Constants§

BP3D_ATTRIBUTION
The exact attribution string the database’s terms require (do not paraphrase away).
BP3D_CITATION
The citation the database asks users of the content to include.
BP3D_DATA_DOI
The data-archive DOI for the BodyParts3D content.
BP3D_FMA_CSV
Repo-relative path of the FMA is-a table (FMAID,"Preferred Label",Parent FMAID).
BP3D_LICENCE
The BodyParts3D licence id, recorded in each mesh’s provenance sidecar and the pack attribution.
BP3D_PARTS_LIST
Repo-relative path of the id→English-name list ("id"\ten header, then tab-separated rows).
BP3D_PART_OF
Repo-relative path of the part-of hierarchy (id, name, part id, part namepart is part-of id).
BP3D_RAW_BASE
Raw base of the BodyParts3D fork we ingest (STL + the mapping files live under it).
BP3D_SOURCE_URL
The primary source of the mesh data (the originals; the GitHub repo is a redistribution mirror).
BP3D_STL_DIR
Repo-relative path of the STL directory (files are FMA<id>.stl / BP<id>.stl).

Functions§

build_bodyparts3d_pack
Build a separate, CC-BY-SA .hmc pack of BodyParts3D structures that complete the body (the muscles/bones/glands/nerves CCF lacks). Each mesh is resolved to its system(s) via the part-of walk, compiled to a sealed .10d attested with the BodyParts3D licence, and packed with its full multi-system AnatomyOrganMeta. Blocking network I/O; honest about what failed.
list_available_stl
List every STL structure available in the repo (id + byte size) via the GitHub git-trees API.
parse_fma_isa
Parse the FMA is-a CSV (FMAID,"Preferred Label",Parent FMAID) into a child→parent map, keyed in the FMA<id> form (matching the STL filenames). The label may contain commas (it is quoted), so the id and parent are taken as the first and last comma-separated fields — robust to embedded commas.
stl_url
The raw STL URL for a BodyParts3D structure id (FMA13295…/stl/FMA13295.stl).