# diku-dk/open-full-jaw architecture

> Architecture diagram of the GitHub repository diku-dk/open-full-jaw, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-30). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/diku-dk/open-full-jaw
- Repository: https://github.com/diku-dk/open-full-jaw

## Overview

Open-Full-Jaw combines a 17-patient jaw-model dataset with a notebook-driven pipeline for producing finite-element-ready meshes and simulation files. The documented workflow is interactive: engineers run the pipeline notebook with patient meshes or their own inputs, configure meshing parameters, and generate model outputs. The graph preserves the six named processing stages and the dataset’s principal deliverables. Source excerpts show several internal calls, but not notebook orchestration or every stage transition; those links are therefore omitted or marked unverified.

Main entry points: [`src/OpenFullJaw/step4_volumetric_mesh_generation.py`](https://github.com/diku-dk/open-full-jaw/blob/main/src/OpenFullJaw/step4_volumetric_mesh_generation.py) (Volumetric meshing), [`src/OpenFullJaw/utils.py`](https://github.com/diku-dk/open-full-jaw/blob/main/src/OpenFullJaw/utils.py) (Mesh utilities), [`src/Pipeline.ipynb`](https://github.com/diku-dk/open-full-jaw/blob/main/src/Pipeline.ipynb) (Pipeline notebook), [`src/OpenFullJaw/step1_preprocessing.py`](https://github.com/diku-dk/open-full-jaw/blob/main/src/OpenFullJaw/step1_preprocessing.py) (Preprocessing)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_workflow["Model generation"]
  node_pipeline["Pipeline notebook<br/>[Pipeline.ipynb]"]
end

subgraph group_geometry["Geometry processing"]
  node_preprocessing["Preprocessing"]
  node_gap["Gap generation"]
  node_pdl["PDL rim generation"]
  node_cargen["PDL surface routines<br/>[pdl_function.py]"]
  node_geometry_utils["Mesh utilities<br/>[utils.py]"]
end

subgraph group_meshing["Volumetric meshing"]
  node_volume["Volumetric meshing"]
  node_ftetwild["fTetWild"]
  node_filtering["Tetrahedra filtering"]
end

subgraph group_deliverables["Dataset and simulation"]
  node_feb["FEB generation"]
  node_dataset[("Patient models")]
  node_simulation_files["Simulation files"]
  node_axes["Tooth principal axes"]
end

node_engineer(("Engineer"))

node_engineer -->|"runs"| node_pipeline
node_preprocessing -->|"uses"| node_geometry_utils
node_gap -->|"uses"| node_geometry_utils
node_pdl -->|"generates surfaces"| node_cargen
node_volume -->|"uses"| node_geometry_utils
node_volume -->|"invokes"| node_ftetwild
node_filtering -->|"uses"| node_geometry_utils
node_pipeline -.->|"orchestrates"| node_preprocessing
node_preprocessing -.->|"prepares geometry"| node_gap
node_gap -.->|"provides meshes"| node_pdl
node_pdl -.->|"provides surfaces"| node_volume
node_volume -.->|"provides tetrahedra"| node_filtering
node_filtering -.->|"supplies mesh"| node_feb
node_pipeline -->|"reproduces models"| node_dataset
node_feb -.->|"produces"| node_simulation_files
node_dataset -->|"includes"| node_axes
node_dataset -->|"includes"| node_simulation_files

click node_pipeline "https://github.com/diku-dk/open-full-jaw/blob/main/src/Pipeline.ipynb"
click node_preprocessing "https://github.com/diku-dk/open-full-jaw/blob/main/src/OpenFullJaw/step1_preprocessing.py"
click node_gap "https://github.com/diku-dk/open-full-jaw/blob/main/src/OpenFullJaw/step2_gap_generation.py"
click node_pdl "https://github.com/diku-dk/open-full-jaw/blob/main/src/OpenFullJaw/step3_pdl_rim_generation.py"
click node_cargen "https://github.com/diku-dk/open-full-jaw/blob/main/src/OpenFullJaw/other_libs/cargen/pdl_function.py"
click node_geometry_utils "https://github.com/diku-dk/open-full-jaw/blob/main/src/OpenFullJaw/utils.py"
click node_volume "https://github.com/diku-dk/open-full-jaw/blob/main/src/OpenFullJaw/step4_volumetric_mesh_generation.py"
click node_filtering "https://github.com/diku-dk/open-full-jaw/blob/main/src/OpenFullJaw/step5_tet_filtering.py"
click node_feb "https://github.com/diku-dk/open-full-jaw/blob/main/src/OpenFullJaw/step6_feb_generation.py"
click node_dataset "https://github.com/diku-dk/open-full-jaw/tree/main/dataset"
click node_simulation_files "https://github.com/diku-dk/open-full-jaw/tree/main/dataset"
click node_axes "https://github.com/diku-dk/open-full-jaw/tree/main/dataset"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_pipeline toneBlue
class node_preprocessing,node_gap,node_pdl,node_cargen,node_geometry_utils toneAmber
class node_volume,node_ftetwild,node_filtering toneMint
class node_feb,node_dataset,node_simulation_files,node_axes toneRose
class node_engineer toneIndigo
```

## Components

### Model generation

- [Pipeline notebook](https://github.com/diku-dk/open-full-jaw/blob/main/src/Pipeline.ipynb): `src/Pipeline.ipynb`

### Geometry processing

- [Preprocessing](https://github.com/diku-dk/open-full-jaw/blob/main/src/OpenFullJaw/step1_preprocessing.py): `src/OpenFullJaw/step1_preprocessing.py`
- [Gap generation](https://github.com/diku-dk/open-full-jaw/blob/main/src/OpenFullJaw/step2_gap_generation.py): `src/OpenFullJaw/step2_gap_generation.py`
- [PDL rim generation](https://github.com/diku-dk/open-full-jaw/blob/main/src/OpenFullJaw/step3_pdl_rim_generation.py): `src/OpenFullJaw/step3_pdl_rim_generation.py`
- [PDL surface routines](https://github.com/diku-dk/open-full-jaw/blob/main/src/OpenFullJaw/other_libs/cargen/pdl_function.py): `src/OpenFullJaw/other_libs/cargen/pdl_function.py`
- [Mesh utilities](https://github.com/diku-dk/open-full-jaw/blob/main/src/OpenFullJaw/utils.py): `src/OpenFullJaw/utils.py`

### Volumetric meshing

- [Volumetric meshing](https://github.com/diku-dk/open-full-jaw/blob/main/src/OpenFullJaw/step4_volumetric_mesh_generation.py): `src/OpenFullJaw/step4_volumetric_mesh_generation.py`
- **fTetWild**
- [Tetrahedra filtering](https://github.com/diku-dk/open-full-jaw/blob/main/src/OpenFullJaw/step5_tet_filtering.py): `src/OpenFullJaw/step5_tet_filtering.py`

### Dataset and simulation

- [FEB generation](https://github.com/diku-dk/open-full-jaw/blob/main/src/OpenFullJaw/step6_feb_generation.py): `src/OpenFullJaw/step6_feb_generation.py`
- [Patient models](https://github.com/diku-dk/open-full-jaw/tree/main/dataset): `dataset`
- [Simulation files](https://github.com/diku-dk/open-full-jaw/tree/main/dataset): `dataset`
- [Tooth principal axes](https://github.com/diku-dk/open-full-jaw/tree/main/dataset): `dataset`

### Other components

- **Engineer**

## Connections

- Engineer → Pipeline notebook: runs (evidence: `README.md`)
- Preprocessing → Mesh utilities: uses (evidence: `src/OpenFullJaw/step1_preprocessing.py`)
- Gap generation → Mesh utilities: uses (evidence: `src/OpenFullJaw/step2_gap_generation.py`)
- PDL rim generation → PDL surface routines: generates surfaces (evidence: `src/OpenFullJaw/step3_pdl_rim_generation.py`)
- Volumetric meshing → Mesh utilities: uses (evidence: `src/OpenFullJaw/step4_volumetric_mesh_generation.py`)
- Volumetric meshing → fTetWild: invokes (evidence: `src/OpenFullJaw/step4_volumetric_mesh_generation.py`)
- Tetrahedra filtering → Mesh utilities: uses (evidence: `src/OpenFullJaw/step5_tet_filtering.py`)
- Pipeline notebook → Preprocessing: orchestrates
- Preprocessing → Gap generation: prepares geometry
- Gap generation → PDL rim generation: provides meshes
- PDL rim generation → Volumetric meshing: provides surfaces
- Volumetric meshing → Tetrahedra filtering: provides tetrahedra
- Tetrahedra filtering → FEB generation: supplies mesh
- Pipeline notebook → Patient models: reproduces models (evidence: `README.md`)
- FEB generation → Simulation files: produces
- Patient models → Tooth principal axes: includes (evidence: `README.md`)
- Patient models → Simulation files: includes (evidence: `README.md`)
