Skip to content

faberno/vessel_voxelizer

Repository files navigation


Logo

Vessel Voxelizer

GPU accelerated (fuzzy) voxelization of vascular structures

Demo · Report Bug / Request Feature · Documentation

Table of Contents
  1. About The Project
  2. Getting Started
  3. Documentation
  4. License
  5. Acknowledgments

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

  1. 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

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 to
  • volume_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.

(back to top)

TODO

  • make number of sample points adaptable
  • add prebuilt wheels

(back to top)

Acknowledgments

About

GPU accelerated (fuzzy) voxelization of vascular structures.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors