Minimal path extraction using the fast marching method
Project description
scikit-mpe
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()
Documentation
The full documentation can be found at scikit-mpe.readthedocs.io
References
- Fast Marching Methods: A boundary value formulation
- Level Set Methods and Fast Marching Methods
- scikit-fmm - Python implementation of the fast marching method
- ITKMinimalPathExtraction - ITK based C++ implementation of MPE
License
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Filename, size | File type | Python version | Upload date | Hashes |
---|---|---|---|---|
Filename, size scikit_mpe-0.2.3-py3-none-any.whl (13.3 kB) | File type Wheel | Python version py3 | Upload date | Hashes View |
Filename, size scikit-mpe-0.2.3.tar.gz (12.8 kB) | File type Source | Python version None | Upload date | Hashes View |
Close
Hashes for scikit_mpe-0.2.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 12898eba04fc3ed90047ab177390e8bce3ec3d6ebbc366439c57f6e635fc1323 |
|
MD5 | 271ea75d421e567e8cad8f3fcae5d0e5 |
|
BLAKE2-256 | 61d91f5484dd4919f549b12831ffeab5b6c075b1a31a2189f205eb8c89195716 |