GPU accelerated (fuzzy) voxelization of vascular structures
Demo
·
Report Bug / Request Feature
·
Documentation
Table of Contents
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.
- a CUDA-capable GPU
- 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 .
To avoid unnecessary checks of voxels that lie far away from any vessel, an initial bounding box intersection check is performed.
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.
For a full example, take a look at the following notebook.
Distributed under the MIT License. See LICENSE.txt for more information.
- make number of sample points adaptable
- add prebuilt wheels
- the bindings are created using
nanobind(https://nanobind.readthedocs.io/en/latest/index.html)