Metadata-Version: 2.1
Name: scikit-mpe
Version: 0.2.3
Summary: Minimal path extraction using the fast marching method
Home-page: https://github.com/espdev/scikit-mpe
License: MIT
Keywords: mpe,fmm,minimal-path,fast-marching,fast-marching-method,scikit
Author: Eugene Prilepin
Author-email: esp.home@gmail.com
Requires-Python: >=3.6,<4.0
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Topic :: Scientific/Engineering
Classifier: Topic :: Scientific/Engineering :: Mathematics
Classifier: Topic :: Software Development :: Libraries
Provides-Extra: docs
Requires-Dist: importlib-metadata (>=1.6.0,<2.0.0)
Requires-Dist: m2r (>=0.2.1,<0.3.0); extra == "docs"
Requires-Dist: matplotlib (>=3.1.3,<4.0.0); extra == "docs"
Requires-Dist: numpy (>=1.18.1,<2.0.0)
Requires-Dist: numpydoc (>=0.9.2,<0.10.0); extra == "docs"
Requires-Dist: pydantic (>=1.4,<2.0)
Requires-Dist: scikit-fmm (>=2021.1.21,<2021.2)
Requires-Dist: scikit-image (>=0.16.2,<0.17.0); extra == "docs"
Requires-Dist: scipy (>=1.4.1,<2.0.0)
Requires-Dist: sphinx (>=2.3.1,<3.0.0); extra == "docs"
Project-URL: Documentation, https://scikit-mpe.readthedocs.io/en/latest
Project-URL: Repository, https://github.com/espdev/scikit-mpe
Description-Content-Type: text/markdown

# scikit-mpe

[![PyPI version](https://img.shields.io/pypi/v/scikit-mpe.svg)](https://pypi.python.org/pypi/scikit-mpe)
[![Build status](https://travis-ci.org/espdev/scikit-mpe.svg?branch=master)](https://travis-ci.org/espdev/scikit-mpe)
[![Documentation Status](https://readthedocs.org/projects/scikit-mpe/badge/?version=latest)](https://scikit-mpe.readthedocs.io/en/latest/?badge=latest)
[![Coverage Status](https://coveralls.io/repos/github/espdev/scikit-mpe/badge.svg?branch=master)](https://coveralls.io/github/espdev/scikit-mpe?branch=master)
![Supported Python versions](https://img.shields.io/pypi/pyversions/scikit-mpe.svg)
[![License](https://img.shields.io/pypi/l/scikit-mpe.svg)](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](https://math.berkeley.edu/~sethian/2006/Explanations/fast_marching_explain.html).


## 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.

```python
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](https://user-images.githubusercontent.com/1299189/73838143-0d74c380-4824-11ea-946a-667c8236ed75.png)

## Documentation

The full documentation can be found at [scikit-mpe.readthedocs.io](https://scikit-mpe.readthedocs.io/en/latest)

## References

- [Fast Marching Methods: A boundary value formulation](https://math.berkeley.edu/~sethian/2006/Explanations/fast_marching_explain.html)
- [Level Set Methods and Fast Marching Methods](https://math.berkeley.edu/~sethian/2006/History/Menu_Expanded_History.html)
- [scikit-fmm](https://github.com/scikit-fmm/scikit-fmm) - Python implementation of the fast marching method
- [ITKMinimalPathExtraction](https://github.com/InsightSoftwareConsortium/ITKMinimalPathExtraction) - ITK based C++ implementation of MPE

## License

[MIT](https://choosealicense.com/licenses/mit/)

