Skip to main content

scikit-mpe

PyPI version Build status Documentation Status Coverage Status Supported Python versions License

scikit-mpe is a package for extracting a minimal path in N-dimensional Euclidean space (on regular Cartesian grids) using the fast marching method.

Quickstart

Installing

pip install -U scikit-mpe

Usage

Here is a simple example that demonstrates how to extract the path passing through the retina vessels.

from matplotlib import pyplot as plt

from skimage.data import retina
from skimage.color import rgb2gray
from skimage.transform import rescale
from skimage.filters import sato

from skmpe import mpe

image = rescale(rgb2gray(retina()), 0.5)
speed_image = sato(image)

start_point = (76, 388)
end_point = (611, 442)
way_points = [(330, 98), (554, 203)]

path_info = mpe(speed_image, start_point, end_point, way_points)

px, py = path_info.path[:, 1], path_info.path[:, 0]

plt.imshow(image, cmap='gray')
plt.plot(px, py, '-r')

plt.plot(*start_point[::-1], 'oy')
plt.plot(*end_point[::-1], 'og')
for p in way_points:
    plt.plot(*p[::-1], 'ob')

plt.show()

retina_vessel_path

Documentation

The full documentation can be found at scikit-mpe.readthedocs.io

References

License

MIT

Metadata

Release files for scikit-mpe 0.2.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for scikit-mpe 0.2.4
File Size Uploaded
scikit-mpe-0.2.4.tar.gz 12.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for scikit-mpe 0.2.4
File Interpreter ABI Platform
scikit_mpe-0.2.4-py3-none-any.whl Python 3 none any Details

Total release size: 26.2 kB

Release files / scikit-mpe-0.2.4.tar.gz

Download URL scikit-mpe-0.2.4.tar.gz
Size 12.8 kB
Tags Source
SHA-256 checksum
How to use checksums
a4a10f12fa490cca78b06b32d28691d6b24ce7e9cf5533e01a3a7ac9f6d79ff3
BLAKE2b-256 checksum
How to use checksums
ec6af93f4e64be59bf59fd8dad529c51190f452acf47f98419283acb6bbbbdf4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.4 CPython/3.9.0 Windows/10

Release files / scikit_mpe-0.2.4-py3-none-any.whl

Download URL scikit_mpe-0.2.4-py3-none-any.whl
Size 13.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5d21aeab5acb1439fc8923c4c4cbb0a6d182d84db10f366a7811475c69e8c5ff
BLAKE2b-256 checksum
How to use checksums
663192e21d348eb60d7a3dabc4572a0a8e8f5dbe8fc9c3c45dd5230fa3018c38
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.4 CPython/3.9.0 Windows/10

Release history Release notifications | RSS feed

This release

0.2.4 This release

2 release files

0.2.3

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page