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.post1.tar.gz (9.1 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.7.0.post1-cp313-cp313-manylinux_2_38_x86_64.whl (3.1 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.38+ x86-64

pyezzi-0.7.0.post1-cp312-cp312-manylinux_2_38_x86_64.whl (3.1 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.38+ x86-64

pyezzi-0.7.0.post1-cp311-cp311-manylinux_2_38_x86_64.whl (3.1 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.38+ x86-64

pyezzi-0.7.0.post1-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.post1.tar.gz.

File metadata

  • Download URL: pyezzi-0.7.0.post1.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.post1.tar.gz
Algorithm Hash digest
SHA256 5a5ddd34c5e9141006c92fe50ee398413ea1c596d8f8b3da94e5e1d7e434aa17
MD5 27272caed44302fbc157feadac3496e4
BLAKE2b-256 a831681e9a855ec3c5be2195d084b6933deea4344a6596b8bd17c76e81be7b91

See more details on using hashes here.

File details

Details for the file pyezzi-0.7.0.post1-cp313-cp313-manylinux_2_38_x86_64.whl.

File metadata

File hashes

Hashes for pyezzi-0.7.0.post1-cp313-cp313-manylinux_2_38_x86_64.whl
Algorithm Hash digest
SHA256 74ea35c383747d076d940c4eaef56c8591c763a563acbf47ec7b93a4a3c2f57d
MD5 ae9a470cc6c074ef018efdf600a25b0e
BLAKE2b-256 2e74974abbaffff5d4419a2a05a26ab361c034400b27f034ee29510026885f90

See more details on using hashes here.

File details

Details for the file pyezzi-0.7.0.post1-cp312-cp312-manylinux_2_38_x86_64.whl.

File metadata

File hashes

Hashes for pyezzi-0.7.0.post1-cp312-cp312-manylinux_2_38_x86_64.whl
Algorithm Hash digest
SHA256 abd13d5078a82431aacf24292a7ffafcffdbeb27139d1b75eedbb0d185be9674
MD5 27ae340dec0d69c2a612df7e6a434f34
BLAKE2b-256 ad3429b807182e64e3c15395f847b143bc2ece985c0bf12f413b546cac9426f5

See more details on using hashes here.

File details

Details for the file pyezzi-0.7.0.post1-cp311-cp311-manylinux_2_38_x86_64.whl.

File metadata

File hashes

Hashes for pyezzi-0.7.0.post1-cp311-cp311-manylinux_2_38_x86_64.whl
Algorithm Hash digest
SHA256 51bc58030587f596d7071ab784eaed06815ca2379b4e6edcc6744cda1bbb731d
MD5 7391bd293559a0a3ff226c2a9c493b43
BLAKE2b-256 8d2752d10cf681dcc73a54caebd3a2ecd757944e5d7ddfa86086dd49cddc9f48

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyezzi-0.7.0.post1-cp310-cp310-manylinux_2_38_x86_64.whl
Algorithm Hash digest
SHA256 9c1f615d8ae5a92289a3284cd624604bb2833192a1bdab50cf985c5ac5642ca5
MD5 635204f3b83569345495e7d05909983c
BLAKE2b-256 dea35a48efc091e1478d86ec59602cd1c6c169f9d4b497c14d63c3a5c91b2d9b

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