Skip to main content

CUDA-accelerated 3D affine transformations for Python

Project description

voltools

CUDA-accelerated numpy/cupy 3D affine transformations

Overview

Currently implemented:

  1. transforms module that offers CUDA-accelerated affine transformations for cupy/numpy ndarrays.
import cupy as cp
from voltools import transform

volume = cp.random.random((200, 200, 200), dtype=cp.float32)
transformed_volume = transform(volume,
                               translation=(10, 0, -10),
                               rotation=(0, 45, 0), rotation_units='deg', rotation_order='rzxz')
  1. StaticVolume class optimized for multiple transformations of the same data. The data transfer is minimized to just the transformation matrix for each transformation.
import cupy as cp
from voltools import StaticVolume, Interpolations

volume = StaticVolume(cp.random.random((200, 200, 200), dtype=cp.float32), interpolation=Interpolations.FILT_BSPLINE)
for i in range(0, 180):
    rotated_vol = volume.rotate(rotation=(0, i, 0), rotation_units='deg', rotation_order='rzxz', profile=True)
  1. Various interpolations:
  • Interpolation.LINEAR, tri-linear interpolation
  • Interpolation.BSPLINE, cubic b-spline interpolation (optimized, 8 texture lookups)
  • Interpolation.BSPLINE_SIMPLE, cubic b-spline interpolation (simple implementation, 27 texture lookups)
  • Interpolation.FILT_BSPLINE, prefiltered cubic b-spline interpolation (8 texture lookups)
  • Interpolation.FILT_BSPLINE_SIMPLE, prefiltered cubic b-spline interpolation (27 texture lookups)

Installation

PIP: pip install voltools
Source: pip install git+https://github.com/the-lay/voltools

TODO

  • Benchmarks
  • FFT
  • Tests
  • Travis? Other CI?
  • Visualizations?
  • Return scripts: projections
  • Develop branch for cleaner sepration of code
  • Remove _old code

Notes

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

voltools-0.1.2-py3-none-any.whl (17.5 kB view details)

Uploaded Python 3

File details

Details for the file voltools-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: voltools-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 17.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.3

File hashes

Hashes for voltools-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 fdddec7c5b69f3d5fbac6ede6546e4231a3cc4ead0b31cbef837d189b566ae12
MD5 f5219476c69dc0f824208d7d00f54d39
BLAKE2b-256 d90abeaaab29bf65d97eaee093dd5ebf30f73d1d634a81747375af3343d5f906

See more details on using hashes here.

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