Skip to main content

No project description provided

Project description

Compute the thickness of a solid using Yezzi and Prince method described in the article “An Eulerian PDE Approach for Computing Tissue Thickness”, IEEE TRANSACTIONS ON MEDICAL IMAGING, VOL. 22, NO. 10, OCTOBER 2003. [1]

A C implementation by Rubén Cárdenes [2] helped me a lot writing this, especially the anisotropic part.

Requirements

Runtime: numpy.

Build time: cython.

Test time: scikit-image, scipy.

Installation instruction

Available on pypi. [3] Use pip: pip install pyezzi

Alternatively, clone the repository and build cython modules with pip install ..

Usage

Command line

This package provides a basic CLI. Example usage:

yezzi /path/to/endo.mha /path/to/epi.mha /path/to/output.mha [--weights /path/to/thickness_weights.mha]

Python API

Full API documentation is available on gitlabpages.inria.fr.

from pyezzi import compute_thickness_cardiac

thickness = compute_thickness_cardiac(endo, epi)

endo and epi are numpy binary masks. endo represents the “inside” boundary of the domain, e.g., the cardiac ventricular blood pool. epi represents the “outside” boundary of the domain, e.g., the cardiac ventricular epicardium.

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

A weights parameter can be added to account for “holes” in the wall, cf “Cedilnik & Peyrat, Weighted tissue thickness, FIMH 2023”. [4]

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

Contributions

We recommend using uv for project management and pre-commit to ensure code quality.

After cloning, use uv sync --frozen --all-groups --all-extras to install dev dependencies. This will set up a virtualenv in .venv that you can activate with source .venv/bin/activate. Tests can then be run with pytest test.

To build the cython extension modules in place, use python setup.py develop.

License

This work is licensed under the french CeCILL license. [5] You’re free to use and modify the code, but please cite the original paper and me.

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

pyezzi-0.7.0.tar.gz (9.1 MB view details)

Uploaded Source

Built Distribution

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

pyezzi-0.7.0-cp310-cp310-manylinux_2_38_x86_64.whl (3.0 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.38+ x86-64

File details

Details for the file pyezzi-0.7.0.tar.gz.

File metadata

  • Download URL: pyezzi-0.7.0.tar.gz
  • Upload date:
  • Size: 9.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.6.2

File hashes

Hashes for pyezzi-0.7.0.tar.gz
Algorithm Hash digest
SHA256 7caa68900da1cb42e8532fa3c5c5a234bab964a2887f53cf11202977392c8404
MD5 648021b905bf549870e04249d5e1e7a1
BLAKE2b-256 23c0883de635ef9bc861830e8d4c952e50884e97e43b5482f0a92b5cf44cbe41

See more details on using hashes here.

File details

Details for the file pyezzi-0.7.0-cp310-cp310-manylinux_2_38_x86_64.whl.

File metadata

File hashes

Hashes for pyezzi-0.7.0-cp310-cp310-manylinux_2_38_x86_64.whl
Algorithm Hash digest
SHA256 cd18fd38a0f3b35fda782339a0ba25e99cda62d462cb0a3f4a7b94c589bd15f0
MD5 c601031713c23307dff90bca828892da
BLAKE2b-256 5f7040a74b50dfecbbc6b12fc5df090aa1b80da78d116b7fff62e2546b47738f

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