Distances#

Image-to-image distances that respect mass transport. wasserstein_distance() solves a Beckmann (dynamic optimal-transport) problem; EMD wraps a discrete Earth Mover’s Distance. Physical integration of a signal to a mass requires a Geometry.

wasserstein_distance(mass_src, mass_dst[, ...])

Unified access to Wasserstein distance computation between images with same mass.

wasserstein_distance_to_vtk(path, info)

Write the output of the Wasserstein distance to a VTK file.

EMD([preprocess])

Class to determine the EMD through cv2.

Geometries#

Geometry(space_dim, num_voxels[, ...])

Geometry of a physical domain, supporting geometric integration.

PorousGeometry(porosity, space_dim, num_voxels)

Class containing information of a porous geometry.

WeightedGeometry(weight, space_dim, num_voxels)

Geometry with weighted volume.

ExtrudedGeometry(expansion, space_dim, ...)

One or two-dimensional geometry extruded to three dimensions.

ExtrudedPorousGeometry(porosity, depth, ...)

Class containing information of a porous geometry.

Beckmann problem and solvers#

BeckmannProblem(grid[, weight, options])

Base class for setting up the Beckmann problem.

BeckmannNewtonSolver(grid[, weight, options])

Class to determine the L1 EMD/Wasserstein distance solved with Newton's method.

BeckmannBregmanSolver(grid[, weight, options])

Class to determine the Wasserstein distance solved with the Bregman method.

BeckmannGproxPGHDSolver(grid[, weight, options])

This contains the implementation of the GproxPDHG algorithm described in "SOLVING LARGE-SCALE OPTIMIZATION PROBLEMS WITH A CONVERGENCE RATE INDEPENDENT OF GRID SIZE"

L1Mode(*values)

Mode for computing the l1 dissipation.

MobilityMode(*values)

Mode for computing the mobility.

Advanced#

BeckmannLinearSolver()

Class providing linear solver options for Beckmann's problem.

BeckmannLinearSolverFactory()

Factory constructing a BeckmannLinearSolver from a type and options.

BeckmannLinearSolverType(*values)

Enumeration of the linear-solver backends for the Beckmann problem.

BeckmannCGSolver(amg_options, ...)

BeckmannAMGSolver(amg_options, ...)

BeckmannDirectSolver(options)

Direct solver for Beckmann's problem.

BeckmannKSPSolver(linear_solver_options)

BeckmannKSPFieldSplitSolver(...)

BeckmannConvergenceCriteria([num_iter, ...])

Class to store and check the convergence criteria for the Beckmann problem.

BeckmannConvergenceHistory([distance, ...])

Class to store the convergence history.