API reference#

Every public object listed here is importable directly from the top-level namespace, for example:

import darsia

image = darsia.imread("photo.jpg", width=1.0, height=0.6)
corrected = darsia.ColorCorrection()(image)
d = darsia.wasserstein_distance(mass_a, mass_b)

The reference is organised by topic. Within each page, the most commonly used objects are listed first; deeper machinery is grouped under an Advanced heading.

Images & I/O

Physical image containers, coordinate systems, and readers for optical, DICOM and simulation data.

Images & coordinates
Corrections

Colour, illumination, curvature, affine and drift corrections.

Corrections
Restoration

Total-variation and H1 denoising, resizing, averaging, binary inpainting.

Restoration
Segmentation

Watershed-based geometry segmentation and label management.

Segmentation
Signal models

Signal reduction and the model hierarchy mapping signals to concentrations.

Signal models
Colour analysis

Colour paths, ranges, spectra and label-to-colour maps.

Colour analysis
Analysis & registration

Concentration analysis, image registration, calibration and managers.

Analysis & registration
Distances

Earth Mover’s and Wasserstein distances and the Beckmann solvers.

Distances
Single-image analysis

Contour extraction and smoothing.

Single-image analysis
Assistants

Matplotlib-interactive helpers for picking ROIs and parameters.

Assistants
Utilities

Grids, finite volumes, derivatives, interpolation, kernels, solvers.

Utilities
Workflow system

The configuration-driven presets.workflows pipeline.

Workflow system
Experimental

experiment and multiphase – unstable, evolving APIs.

Experimental