Skip to main content

GPU accelerated (fuzzy) voxelization of vascular structures.

Project description


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

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

vessel-voxelizer-0.0.4.tar.gz (881.6 kB view details)

Uploaded Source

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

Hashes for vessel-voxelizer-0.0.4.tar.gz
Algorithm Hash digest
SHA256 bd338d09d012c4636ecc00316cb5f3029946ede479fc6bb4d7398bab26078dbd
MD5 57f8804ce60cd25462b4c23532b2ad1a
BLAKE2b-256 e82b485c7b5bc623c7836a700f07a304417e14d2263543c3bbb908de8aedf803

See more details on using hashes here.

Provenance

The following attestation bundles were made for vessel-voxelizer-0.0.4.tar.gz:

Publisher: wheels.yml on faberno/vessel_voxelizer

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page