stentFIT
Semi-automated virtual stent implantation with mixed-dimensional modelling
Full documentation, including the API reference and workflow diagrams, is hosted at stentfit.readthedocs.io.
stentFIT turns a stent surface mesh (.stl) into a 1D beam-element model ready for beam-to-solid contact simulation. It samples the stent surface, detects its rings, extracts a 2D skeleton per ring, wraps that skeleton back onto the 3D mid-surface, fits a B-spline to each strut curve, and meshes the result into Simo–Reissner beams with BeamMe. Extracting the stent's 1D wireframe is a semi-automated process: it allows manual edits of intermediate steps such as ring detection and 2D skeletonisation. It also provides a smoke test that verifies the quality of the 1D stent model inside a generated pipe-like 3D vessel.
Installation
Requires Python 3.13 (pinned to match BeamMe's supported range) and Git installed and available on your PATH — BeamMe uses the git executable to write commit metadata into generated 4C input files, and raises an error at runtime if it can't find one. Git is not a Python package, so pip/poetry cannot install it for you — the steps below install it via conda alongside everything else.
Option A — Just use the package
Same steps on macOS, Linux, and Windows (PowerShell) — on Windows, just make sure to run python/pip, not the py launcher, which ignores the active conda environment:
conda create -n stentfit-env python=3.13
conda activate stentfit-env
conda install -c conda-forge git
pip install stentfit
Core dependencies such as beamme (stent beam meshing and artery solid meshing), gmsh (artery solid meshing), and fourcipp are installed automatically by pip. Running the generated simulation input files additionally requires a compiled 4C executable, which is not included in this package.
Option B — Clone the repo and start developing
git clone https://github.com/VuralAktas/stentFIT.git
cd stentFIT
conda env create -f environment.yml # Python 3.13 + pip + git
conda activate env_stentfit
poetry install # installs stentfit + all dependency groups
This path pulls git in automatically via environment.yml, and also gives you the example notebooks, tests, and locked dependency versions (poetry.lock) matching the rest of the project.
What it does & How to use it
1. Stent skeletonisation (examples/stent_skeleton.ipynb)
- Sample a point cloud from the stent STL and align it to its centreline axis.
- Detect rings and skeletonise each ring in 2D (optional auto-tuning + manual edits).
- Wrap the 2D skeleton onto the local mid-surface, clean up the graph, and fit a B-spline per strut.
- Mesh the fitted splines into a 1D Simo–Reissner beam mesh with BeamMe.
Each stage writes skeleton_points.csv, skeleton_splines.json, stent_features.json, and interactive HTML views into the output directory.
2. Test artery generation & simulation setup (examples/test_sim_generation.ipynb)
A synthetic/parametric smoke test exercises the full mixed-dimensional chain end-to-end:
- Generate a parametric test artery (straight / curved / S-bend) sized to the stent, and mesh its wall as a 3D solid with GMSH.
- Warp the stent beam mesh onto the artery centreline.
- Check beam-to-solid coupling compatibility (stiffness ratio, element-size ratios) and visualize the stent inside the artery via Paraview.
- Tie the beam mesh to the artery lumen and write a schema-validated 4C simulation input file with a quasi-static radial expansion load.
This confirms the stent-to-artery mapping and 4C input generation work end-to-end, using placeholder materials and tied meshtying rather than real contact such as full deployment physics (contact, HGO-C artery material, elasto-plastic beam bending) is planned but not yet implemented.
License
stentfit was created by Vural Aktas. It is licensed under the terms of the MIT license.
Contributing
Interested in contributing? Reach out at vural.aktas@rwth-aachen.de.
Credits
stentfit was created with cookiecutter
and the py-pkgs-cookiecutter template.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file stentfit-0.1.1.tar.gz.
File metadata
- Download URL: stentfit-0.1.1.tar.gz
- Upload date:
- Size: 84.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
poetry/2.4.1 CPython/3.14.5 Darwin/25.5.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c70c813e093f589ff3fd8a68c1ff72a00d5f1cf51ee6cd1a77569223a964365b
|
|
| MD5 |
c8563bf67db124784f9b66e5de406127
|
|
| BLAKE2b-256 |
bb0f46a252ab102a68054c64d8ef85b28cc9f5d0e4e7dc400fae3c0abd26c1a3
|
File details
Details for the file stentfit-0.1.1-py3-none-any.whl.
File metadata
- Download URL: stentfit-0.1.1-py3-none-any.whl
- Upload date:
- Size: 90.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
poetry/2.4.1 CPython/3.14.5 Darwin/25.5.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8696fb20f291fd50fe6987ad0214a0f997e32e74daf629ee5880b5075bd4f06b
|
|
| MD5 |
5fb208ac4adf413196fc3bbf857b8e02
|
|
| BLAKE2b-256 |
272fa21b85bf0206e99ff2d6aee4b7425d7f36efda9f952d601a96d55ac57938
|