Skip to main content

Fast local thickness in 3D and 2D.

Project description

localthickness

Fast local thickness in 3D and 2D.

Installation

Install the module using pip install localthickness or clone the repository.

Use

import localthickness as lt

#  Make a binary test volume. 
B = lt.create_test_volume((100, 500, 400), sigma=15, boundary=0.001)

# Compute thickness and separation.
thickness = lt.local_thickness(B, scale=0.5)
separation = lt.local_thickness(~B, scale=0.5)

# Visualize.
import matplotlib.pyplot as plt
fig, ax = plt.subplots(1, 3, figsize=(10, 5))
ax[0].imshow(B[10])
ax[1].imshow(thickness[10], cmap=lt.black_plasma())
ax[2].imshow(separation[10], cmap=lt.white_viridis())

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

localthickness-0.1.2.tar.gz (19.4 kB view hashes)

Uploaded Source

Built Distribution

localthickness-0.1.2-py3-none-any.whl (19.6 kB view hashes)

Uploaded Python 3

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