Skip to main content

Thickness calculation on binary 3D images

Project description

Compute the thickness of a solid using Anthony J. Yezzi’s method described in the article “An Eulerian PDE Approach for Computing Tissue Thickness, IEEE TRANSACTIONS ON MEDICAL IMAGING, VOL. 22, NO. 10, OCTOBER 2003”:

A C implementation by Rubén Cárdenes can be found at and helped me write this, especially the anisotropic part.


numpy, cython, scikit-image. Tested with Debian Jessie and Fedora 24, miniconda-python 3.5.2, cython 0.24, numpy 1.11.2, scikit image 0.12.3

Installation instruction

Available on pypi: . Use pip: pip install pyezzi

Alternatively, clone the repository and build cython modules with python build_ext --inplace.


from pyezzi.thickness import compute_thickness
thickness = compute_thickness(labeled_image, debug=True)

labeled_image is a 3 dimensional numpy array where the wall is labeled 2 and the interior is labeled 1.

A spacing parameter specifying the spacing between voxels along the axes can optionnaly be specified.

Check out the included jupyter notebooks in the example folder for more details.


Feel free to submit pull requests. I know the code is nowhere near optimal as it is.


You’re free to use and modify the code, but please cite me and the original paper.

Project details

Download files

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

Filename, size & hash SHA256 hash help File type Python version Upload date
pyezzi-0.2.1.tar.gz (290.3 kB) Copy SHA256 hash SHA256 Source None

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page