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:

pyezzi /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.8.0.tar.gz (9.2 MB view details)

Uploaded Source

Built Distributions

pyezzi-0.8.0-cp313-cp313-manylinux_2_38_x86_64.whl (3.2 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.38+ x86-64

pyezzi-0.8.0-cp312-cp312-manylinux_2_38_x86_64.whl (3.2 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.38+ x86-64

pyezzi-0.8.0-cp311-cp311-manylinux_2_38_x86_64.whl (3.2 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.38+ x86-64

pyezzi-0.8.0-cp310-cp310-manylinux_2_38_x86_64.whl (3.1 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.38+ x86-64

File details

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

File metadata

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

File hashes

Hashes for pyezzi-0.8.0.tar.gz
Algorithm Hash digest
SHA256 faf9e986821ec49db3cfff41f91469d9aa47872dd1809052bddd145651b9a423
MD5 1668f84cf88fcc7938b0cc37ad2dd108
BLAKE2b-256 b85c161945036b4653572dcfe7d5a09132f394cbecadab43bc9787591796b98e

See more details on using hashes here.

File details

Details for the file pyezzi-0.8.0-cp313-cp313-manylinux_2_38_x86_64.whl.

File metadata

File hashes

Hashes for pyezzi-0.8.0-cp313-cp313-manylinux_2_38_x86_64.whl
Algorithm Hash digest
SHA256 3d48f4792101db006fc47e6752094bbd5ef7385d6802b131942e2b91cdd6e2b9
MD5 15fcdee7b50b92c9422107fe7fd07804
BLAKE2b-256 3891873b9831a008413529f5c4df339bda52bdf8c0fc736d62a96e5a4a5e2bed

See more details on using hashes here.

File details

Details for the file pyezzi-0.8.0-cp312-cp312-manylinux_2_38_x86_64.whl.

File metadata

File hashes

Hashes for pyezzi-0.8.0-cp312-cp312-manylinux_2_38_x86_64.whl
Algorithm Hash digest
SHA256 139e971e39d2ea83bebeee1a970db27648546b076b78b033a51da55676dc3e65
MD5 8668cfd2432ad31cd81aefd77f85301e
BLAKE2b-256 9bc6fdfb88e77f69c3035104a43a8814948a798de4a3dc5f064e2525f3a8814a

See more details on using hashes here.

File details

Details for the file pyezzi-0.8.0-cp311-cp311-manylinux_2_38_x86_64.whl.

File metadata

File hashes

Hashes for pyezzi-0.8.0-cp311-cp311-manylinux_2_38_x86_64.whl
Algorithm Hash digest
SHA256 df3186f3130eb03297ccbdfea4d35274d9a13e84682ff5494115fa7c45762251
MD5 2ae709f1452860180da4f81b6f5358ec
BLAKE2b-256 355b9570e3bddf5ec5530e5820b463b7131c65305f5545a45ef608e54838150c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyezzi-0.8.0-cp310-cp310-manylinux_2_38_x86_64.whl
Algorithm Hash digest
SHA256 bc2cd85fb0138f71561d969431d5763734e8a7faaf2b467405febe45ce227277
MD5 9430ae7090fbb471a9b35775f7b98bf1
BLAKE2b-256 10340a5c5ddbd3be9585bf6149c5f2e697656660b82a1c4ab48a08e4a96d6ca0

See more details on using hashes here.

Supported by

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