Skip to main content

Minimal path extraction using the fast marching method

Project description

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

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

scikit-mpe-0.2.4.tar.gz (12.8 kB view details)

Uploaded Source

Built Distribution

scikit_mpe-0.2.4-py3-none-any.whl (13.4 kB view details)

Uploaded Python 3

File details

Details for the file scikit-mpe-0.2.4.tar.gz.

File metadata

  • Download URL: scikit-mpe-0.2.4.tar.gz
  • Upload date:
  • Size: 12.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.4 CPython/3.9.0 Windows/10

File hashes

Hashes for scikit-mpe-0.2.4.tar.gz
Algorithm Hash digest
SHA256 a4a10f12fa490cca78b06b32d28691d6b24ce7e9cf5533e01a3a7ac9f6d79ff3
MD5 de34cc6828c095920ed5f5100295af68
BLAKE2b-256 ec6af93f4e64be59bf59fd8dad529c51190f452acf47f98419283acb6bbbbdf4

See more details on using hashes here.

File details

Details for the file scikit_mpe-0.2.4-py3-none-any.whl.

File metadata

  • Download URL: scikit_mpe-0.2.4-py3-none-any.whl
  • Upload date:
  • Size: 13.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.4 CPython/3.9.0 Windows/10

File hashes

Hashes for scikit_mpe-0.2.4-py3-none-any.whl
Algorithm Hash digest
SHA256 5d21aeab5acb1439fc8923c4c4cbb0a6d182d84db10f366a7811475c69e8c5ff
MD5 1e96f2a1df4d8a846206bbcfac6f24d4
BLAKE2b-256 663192e21d348eb60d7a3dabc4572a0a8e8f5dbe8fc9c3c45dd5230fa3018c38

See more details on using hashes here.

Supported by

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