MAZAlib
Cross-platform 2d/3d image segmentation C++ library
Authors: Roman V. Vasilyev, Timofey Sizonenko, Kirill M. Gerke, Marina V. Karsanina, Andrey A. Ananev Moscow, 2017-2024
Prerequisites
Install a modern C++ compiler.
Mac OS:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" && xcode-select --install
Linux (Ubuntu):
sudo apt-get install g++
Windows: Visual Studio 2015 or later with C++ tools installed
Install MazaLib
The easiest way to install and run MAZAlib is to utilize Python virtual environments (below are the commands to setup MAZAlib in Unix-based operation system, similar approach can be applied under Windows):
- Here env_name is any environment name that will used to run MAZAlib. path_to_env - path to the environment where it will be created (Use '.') if it's current folder.
python -m venv path_to_env/env_name
source path_to_env/env_name/bin/activate
- Note that under Unix-based systems you might need to install gtk library
pip install numpy mazalib. Next, invoke following python code to activate GUI: (example run unsharp filter)
import numpy as np
import mazalib
im = np.fromfile('path/to/image.raw', dtype='uint8')
side_size = int(round(im.size**(1/3)))
im = np.reshape(im, (side_size,side_size,side_size))
result = mazalib.unsharp(im, [3.0])
Implemented approaches
Binarization (segmentation into two phases):
-
Indicator kriging (Oh, W., & Lindquist, B. (1999). Image thresholding by indicator kriging. IEEE Transactions on Pattern Analysis and Machine Intelligence, 21(7), 590–602) link
-
Markov random field aka MRF (Kulkarni, R., Tuller, M., Fink, W., & Wildenschild, D. (2012). Three-dimensional multiphase segmentation of X-ray CT data of porous materials using a Bayesian Markov random field framework. Vadose Zone Journal, 11(1)) link
-
Region growth aka RG (Hashemi, M. A., Khaddour, G., François, B., Massart, T. J., & Salager, S. (2014). A tomographic imagery segmentation methodology for three-phase geomaterials based on simultaneous region growing. Acta Geotechnica, 9, 831-846) link
-
Converging active contours aka CAC (Sheppard, A. P., Sok, R. M., & Averdunk, H. (2004). Techniques for image enhancement and segmentation of tomographic images of porous materials. Physica A: Statistical mechanics and its applications, 339(1-2), 145-151) link
Filters:
- Unsharp mask
- Non-local means (we added NLM implementation by Bruns, S., Stipp, S. L. S., & Sørensen, H. O. (2017). Looking for the signal: A guide to iterative noise and artefact removal in X-ray tomographic reconstructions of porous geomaterials. Advances in Water Resources, 105, 96-107) link
Publications
The paper describing this library is currently submitted to Computers & Geosciences Journal.
Useful cross-references
- MAZAgui - to utilize graphical user interface for MAZAlib
- PyFDMSS - a library to simulate single-phase flow on binary 3D pore geometries (Gerke, K. M., Vasilyev, R. V., Khirevich, S., Collins, D., Karsanina, M. V., Sizonenko, T. O., Korost, D.V., Lamontagne, S. & Mallants, D. (2018). Finite-difference method Stokes solver (FDMSS) for 3D pore geometries: Software development, validation and case studies. Computers & geosciences, 114, 41-58) link : pyfdmss
Metadata
Release files for mazalib 0.52.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| mazalib-0.52.4.tar.gz | 2.7 MB | Without provenance | Details for mazalib-0.52.4.tar.gz |
Release files / mazalib-0.52.4.tar.gz
| Download URL | mazalib-0.52.4.tar.gz |
|---|---|
| Size | 2.7 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1e3e003a49f40ef5d40649ae66ab63d59910caad93154c1c41116c2e862215f5
|
|
BLAKE2b-256 checksum How to use checksums |
36c083f24e2a61861ed0f8726c85bfcd5e35b64dc9fa2f34fae743d73305dbcc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.10.12
|
Security for mazalib 0.52.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.