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

Uploaded Source

Built Distributions

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

pyezzi-0.8.1-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.1-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.1-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.1-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.1.tar.gz.

File metadata

  • Download URL: pyezzi-0.8.1.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.1.tar.gz
Algorithm Hash digest
SHA256 d2b8b23efac855a9a8a0b31874204a6863239e1c1b23eb76c37f0f7ab368a07b
MD5 e786f654a03a534fcc7d33611c6f6626
BLAKE2b-256 1dddf373f4832b3287fc25ce4e0e33ab744e34a994e9a06a81eb09d853514a32

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyezzi-0.8.1-cp313-cp313-manylinux_2_38_x86_64.whl
Algorithm Hash digest
SHA256 72c82e51a27bd9a9dacff439cb639ca4eb3423218903dde7dc27ef4ffae364d5
MD5 59ef048302489f7b305f22c5366ed6ed
BLAKE2b-256 eccd3f4bec06235d8286a08813ab86bb2ef72f6069f5b6a8ab792f9c8fde558b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyezzi-0.8.1-cp312-cp312-manylinux_2_38_x86_64.whl
Algorithm Hash digest
SHA256 2aadceca74672d7527da19429317194b69901808f4072df43faec0b1ba1a0e04
MD5 240a3a4dcb2fb23080754665de11b3e7
BLAKE2b-256 6aa7e061263e22a4768fc5503e72076bbc4fde98b7335021c7b05411f2bef6fa

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyezzi-0.8.1-cp311-cp311-manylinux_2_38_x86_64.whl
Algorithm Hash digest
SHA256 187677d723bd1c99895944879d235e227031bd92376c874d39b7ad24b4aaf6f6
MD5 c51211fea2b651e7c6efe925c33f539c
BLAKE2b-256 e49999b7b8adee469d14b2807a4c7a842ed2d090491b5914a7aa49c613a37e0f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyezzi-0.8.1-cp310-cp310-manylinux_2_38_x86_64.whl
Algorithm Hash digest
SHA256 ff7686204ebb110c778bf2a33cf582cef1167a87de5d7411646dc515cdea2753
MD5 f11ee9a1827cc88350f4c8c55f0eb029
BLAKE2b-256 5985be61f8aff051daf8d31feb6f6c49481fbce7894d353bfcbfcef228d0d7e3

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