Signal models#

A concentration analysis proceeds in two stages: a signal reduction collapses a (possibly multichannel) difference image to a scalar signal, and a model maps that signal to a physical quantity such as a concentration or a saturation. Models share the Model interface and can be composed and calibrated.

Signal reduction#

SignalReduction()

Base class reducing a (possibly multi-channel) signal to a scalar array.

MonochromaticReduction(**kwargs)

Reduce a colour image to one channel ("gray", "red", "hsv", ...).

AxisReduction(axis[, dim, mode])

Object for reduction along a provided axis.

reduce_axis(image, axis[, mode])

Utility function, essentially wrapping AxisReduction as a method.

extrude_along_axis(img, height, num)

Extrude 2d image to a 3d image.

Model base#

Model()

Base class for signal-to-quantity models.

HeterogeneousModel(obj, labels[, ignore_labels])

Apply a different Model per region of a labelled image.

CombinedModel(models)

A Model that applies a list of models in sequence.

Linear and scaling models#

LinearModel([key])

Linear model, applying an affine conversion for signals to data.

HeterogeneousLinearModel(labels[, key])

Linear model, applying an affine conversion for signals to data.

ScalingModel([key])

Linear model (plain scaling).

Thresholding models#

StaticThresholdModel([threshold_lower, ...])

Class for static thresholding.

DynamicThresholdModel([method, ...])

Class for dynamic thresholding.

ThresholdModel([labels, key])

Manager of the available thresholding models.

ClipModel([min_value, max_value, key])

Model clipping away signal at some min and max values.

PWTransformation([supports, values])

Transformation which cuts off values below 0 and ensures monotonicity.

Histogram analysis#

StandardOtsu()

Wrapper for standard Otsu thresholding.

OtsuTwoPeakHistogrammAnalysis()

Class defining a two peak analysis for dynamically determining a threshold parameter used on a Otsu analysis of the signal histogram.

TwoPeakHistogrammAnalysis()

Class for histogramm analysis aiming at separating two signal peaks.

GlobalMinTwoPeakHistogrammAnalysis()

Class defining a two peak analysis for dynamically determining a threshold parameter used on a global minimum analysis of the signal histogram.

HistogrammBasedThresholding()

Pick a threshold from a smoothed signal histogram.

Kernel interpolation#

KernelInterpolation(kernel[, supports, values])

General kernel-based interpolation.

AdvancedKernelInterpolation(kernel)

Kernel interpolation with support for fixed (non-calibrated) support points.

Colour-path models#

ColorPathInterpolation(color_path, color_mode)

Interpolate concentrations along a colour path from labelled reference values.

ColorPathFunction(color_path, color_mode)

Model projecting a colour signal onto a ColorPath.

Binary data selection#

BinaryDataSelector([criterion, key])

Data selector acting on criteria, both volume and contour based.

ValueCriterion(threshold)

Criterion checking for absolute maximal values.

RelativeValueCriterion(threshold)

Criterion checking for relative maximal values.

TransformedValueCriterion(transformation, ...)

Criterion checking for absolute maximal values in a transformed version of the unprocessed signal.

GradientModulusCriterion([threshold, key])

Criterion checking for absolute maximal value of the gradient modulus of the signal.

CombinedCriterion(criteria)

General combination of criteria, provided as list.

BaseCriterion()

Abstract criterion class.