Skip to main content

No project description provided

Project description

stk

Toolkit for 3D volume processing

Build

mkdir build && cd build
cmake ..
make

CMake options:

  • STK_BUILD_EXAMPLES: build example programs
  • STK_BUILD_TESTS: build tests
  • STK_USE_CUDA: build with CUDA support
  • STK_WARNINGS_ARE_ERRORS: compilation will fail on warnings
  • STK_BUILD_WITH_DEBUG_INFO: include debug symbols in the binaries
  • STK_ENABLE_FAST_MATH: enable unsafe (non IEEE 754-compliant) optimisations
  • STK_LOGGING_PREFIX_FILE: add the file name as prefix to each log message

When building with STK_USE_CUDA, in case the version of gcc selected by CMake was not compatible with the one required by CUDA, it is possible to specify a different executable with -DCMAKE_CUDA_FLAGS="-ccbin gcc-XX", where gcc-XX is a version of gcc compatible with your CUDA version.

Python API

A minimalistic Python API is also provided.

Install

python setup.py install

Example usage

import stk
import numpy as np

# Create volume directly from numpy
vol = stk.Volume(np.zeros((5,5,5)).astype(np.float32), spacing=(2,2,2))
# or read volume from file
vol = stk.read_volume('test.nrrd')

# Modify data (numpy array points to the volume data)
data = np.array(vol, copy=False)
data[0:10] = 0.0

# Access meta data
vol.origin = (2, 2, 2)
vol.spacing = (3, 3, 3)

# Write volume
stk.write_volume('test-out.nrrd', vol)

Project details


Release history Release notifications | RSS feed

This version

0.4

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 Distributions

python_stk-0.4-cp38-cp38-win_amd64.whl (232.4 kB view hashes)

Uploaded CPython 3.8 Windows x86-64

python_stk-0.4-cp38-cp38-manylinux1_x86_64.whl (540.2 kB view hashes)

Uploaded CPython 3.8

python_stk-0.4-cp38-cp38-macosx_10_13_x86_64.whl (272.0 kB view hashes)

Uploaded CPython 3.8 macOS 10.13+ x86-64

python_stk-0.4-cp37-cp37m-win_amd64.whl (234.0 kB view hashes)

Uploaded CPython 3.7m Windows x86-64

python_stk-0.4-cp37-cp37m-manylinux1_x86_64.whl (566.3 kB view hashes)

Uploaded CPython 3.7m

python_stk-0.4-cp37-cp37m-macosx_10_9_x86_64.whl (274.7 kB view hashes)

Uploaded CPython 3.7m macOS 10.9+ x86-64

python_stk-0.4-cp36-cp36m-win_amd64.whl (234.1 kB view hashes)

Uploaded CPython 3.6m Windows x86-64

python_stk-0.4-cp36-cp36m-manylinux1_x86_64.whl (566.4 kB view hashes)

Uploaded CPython 3.6m

python_stk-0.4-cp36-cp36m-macosx_10_6_intel.whl (542.1 kB view hashes)

Uploaded CPython 3.6m macOS 10.6+ intel

python_stk-0.4-cp35-cp35m-manylinux1_x86_64.whl (566.4 kB view hashes)

Uploaded CPython 3.5m

python_stk-0.4-cp35-cp35m-macosx_10_6_intel.whl (542.1 kB view hashes)

Uploaded CPython 3.5m macOS 10.6+ intel

python_stk-0.4-cp34-cp34m-manylinux1_x86_64.whl (566.3 kB view hashes)

Uploaded CPython 3.4m

Supported by

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