Imgal (IMaGe Algorithm Library) is a fast and open-source scientific image processing and algorithm library.
This library is directly inspired by imagej-ops, SciJava Ops,
ImgLib2, and the ImageJ2 ecosystem. The imgal library aims to offer users access to fast and well documented
image algorithms as a functional programming style library. Imgal is organized as a monorepo with the imgal crate as the core Rust library that
contains the algorithm logic while imgal_c, imgal_java and imgal_python serve imgal's C, Java and Python language bindings respectively.
Usage
Using imgal with Rust
To use imgal in your Rust project add it to your crate's dependencies and import the desired algorithm namespaces.
[]
= "0.3.0"
The example below demonstrates how to create a 3D linear gradient image (with variable offset, scale and size) and perform simple image statistics and thresholding:
use *;
use linear_gradient_3d;
use ;
use otsu_value;
Running this example with cargo run returns the following to the console:
)
Building from source
Although its not particularly useful on its own, you can build the imgal core Rust library from the root of the repository with:
[!NOTE]
--releaseis necessary to compile speed optimized libraries and utilize compiler optimizations.
Benchmarks
Imgal uses divan for benchmarks. You can run all the benchmarks at once with:
Or all the benchmarks in a given namespace (e.g. statistics) with:
Or a specific subset of benchmarks (i.e. run only the parallel statistics benchmarks):
Documentation
Each function in imgal is documented and published on docs.rs.
License
Imgal is a dual-licensed project with your choice of:
- MIT License (see LICENSE-MIT)
- The Unlicense (see LICENSE-UNLICENSE)