GPU accelerated (fuzzy) voxelization of vascular structures.
Project description
Vessel Voxelizer
GPU accelerated (fuzzy) voxelization of vascular structures
Demo
·
Report Bug / Request Feature
·
Documentation
Table of Contents
About The Project
vessel-voxelizer is a CUDA-accelerated tool designed to convert vascular structures, defined by line segments with associated radii, into fuzzy voxel volumes, where
each voxel's value represents the fraction of its volume occupied by the vessels. This fuzzy representation is essential for simulations where the volume fraction plays
a critical role in assigning the correct parameters to each voxel, ensuring precise modeling of e.g. physical processes.
The project leverages CUDA for high performance and includes Python bindings for seamless integration into existing workflows.
Getting Started
Prerequisites
- a CUDA-capable GPU
Installation
- install from pip
pip install vessel_voxelizer
or clone the repository
git clone https://github.com/faberno/vessel_voxelizer.git
cd vessel_voxelizer
pip install .
Documentation
How it works
A vessel segment Vi is represented by a startpoint p0i, an endpoint p1i and a radius ri. We determine the value of a voxel by supersampling K3 points within it and checking how many of those points lie within the radius of the vessel (no points -> 0.0, all points -> 1.0). Currently K is chosen as 10, so 1000 points per voxel are checked.To avoid unnecessary checks of voxels that lie far away from any vessel, an initial bounding box intersection check is performed.
API
The voxelization is run by the function voxelize. It requires:
volume_shape: The shape of the volume that the results are written tovolume_origin: origin coordinates (x0, y0, z0) of the volume ( (x0, y0) in figure)volume_spacing: voxel side length (d in figure)vessel_positions: list of all vessel segments ((p00, p10), ..., (p0N, p1N))vessel_radii: list of all vessel radii
The array parameters should lie on the CPU as a np.ndarray and will automatically be moved to the GPU and back during the computation.
Example
For a full example, take a look at the following notebook.
License
Distributed under the MIT License. See LICENSE.txt for more information.
TODO
- make number of sample points adaptable
- add prebuilt wheels
Acknowledgments
- the bindings are created using
nanobind(https://nanobind.readthedocs.io/en/latest/index.html)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file vessel-voxelizer-0.0.4.tar.gz.
File metadata
- Download URL: vessel-voxelizer-0.0.4.tar.gz
- Upload date:
- Size: 881.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bd338d09d012c4636ecc00316cb5f3029946ede479fc6bb4d7398bab26078dbd
|
|
| MD5 |
57f8804ce60cd25462b4c23532b2ad1a
|
|
| BLAKE2b-256 |
e82b485c7b5bc623c7836a700f07a304417e14d2263543c3bbb908de8aedf803
|
Provenance
The following attestation bundles were made for vessel-voxelizer-0.0.4.tar.gz:
Publisher:
wheels.yml on faberno/vessel_voxelizer
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
vessel_voxelizer-0.0.4.tar.gz -
Subject digest:
bd338d09d012c4636ecc00316cb5f3029946ede479fc6bb4d7398bab26078dbd - Sigstore transparency entry: 247959897
- Sigstore integration time:
-
Permalink:
faberno/vessel_voxelizer@1e065d44953b61d9904e87da6cebef146a6a9093 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/faberno
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
wheels.yml@1e065d44953b61d9904e87da6cebef146a6a9093 -
Trigger Event:
workflow_dispatch
-
Statement type: