dip namespace

The dip namespace contains all the library functionality.

Namespaces

namespace Feature
Contains classes that implement the measurement features. more...
namespace Framework
Frameworks are the basis of most pixel-based processing in DIPlib. more...
namespace javaio
Contains all functionality for DIPjavaio. more...
namespace Option
Enumerated options are defined in the namespace dip::Option, unless they are specific to some other sub-namespace. more...
namespace testing
Tools for testing and debugging. more...
namespace viewer
Contains all functionality for DIPviewer. more...

Classes

class AlignedAllocInterface
dip::ExternalInterface that allocates aligned data. more...
class AlignedBuffer
A container used to allocate 32-byte aligned buffers. more...
class AssertionError
Exception class indicating that an internal inconsistency was found (the library code is wrong). more...
class bin
Type for samples in a binary image. Can store 0 or 1. Occupies 1 byte. more...
class BinaryRandomGenerator
Generates random binary values. more...
template<typename T>
struct BoundingBox
Encodes a bounding box in a 2D image by the top left and bottom right corners (both coordinates included in the box). more...
class BresenhamLineIterator
An iterator to iterate over pixels along a straight line. more...
struct ChainCode
The contour of an object as a chain code sequence. more...
struct CircleParameters
Represents a circle, returned by dip::Polygon::FitCircle. more...
struct ColocalizationCoefficients
Holds Colocalization Coefficients as described by Manders, see dip::MandersColocalizationCoefficients. more...
class ColorSpaceConverter abstract
Abstract base class for conversion between two color spaces. more...
class ColorSpaceManager
An object of this class is used to convert images between color spaces. more...
struct ConvexHull
A convex hull is a convex polygon. It can be constructed from a simple dip::Polygon, and is guaranteed clockwise. more...
class CoordinatesComputer
Computes pixel coordinates based on an index or offset. more...
class CovarianceAccumulator
CovarianceAccumulator computes covariance and correlation of pairs of samples by accumulating the first two central moments and cross-moments. more...
class CovarianceMatrix
A 2D covariance matrix for computation with 2D vertices. more...
struct DataType
DataType objects are used to indicate what the data type of an image is. more...
template<typename T>
class DFT
An object that encapsulates the Discrete Fourier Transform (DFT). more...
template<typename T>
class DimensionArray
A dynamic array type optimized for few elements. more...
class DirectedGraph
A directed, edge-weighted graph. more...
class DirectionalStatisticsAccumulator
DirectionalStatisticsAccumulator computes directional mean and standard deviation by accumulating a unit vector with the input value as angle. more...
class Distribution
Holds probability density functions and other types of distribution more...
struct EllipseParameters
Represents an ellipse, returned by dip::CovarianceMatrix::Ellipse and dip::Polygon::FitEllipse. more...
class Error
Base exception class. All exceptions thrown in DIPlib are derived of this class. more...
class ExternalInterface abstract
Support for external interfaces. more...
class FastVarianceAccumulator
FastVarianceAccumulator computes mean and standard deviation by accumulating the sum of sample values and the sum of the square of sample values. more...
struct FeretValues
Contains the various Feret diameters as returned by dip::ConvexHull::Feret and dip::ChainCode::Feret. more...
struct FileInformation
A data structure with information about an image file. more...
class FixedOutputBuffer
An output buffer implementation that cannot be resized. more...
class FreeTypeTool
Class used to draw text using a specified font file (TTF, OTF, etc). more...
struct GaussianParameters
Parameters defining a 1D Gaussian. Returned by dip::GaussianMixtureModel. more...
class GaussianRandomGenerator
Generates random floating-point values taken from a normal distribution. more...
template<typename T = dip::dfloat>
class GenericImageIterator
A data-type–agnostic version of dip::ImageIterator. Use this iterator only to write code that does not know at compile-time what the data type of the image is. more...
template<dip::uint N, typename T = dip::dfloat>
class GenericJointImageIterator
A data-type–agnostic version of dip::JointImageIterator. Use this iterator only to write code that does not know at compile-time what the data type of the image is. more...
class Graph
A non-directed, edge-weighted graph. more...
class Histogram
Computes and holds histograms. more...
class Image
Represents an image with all associated information. more...
class ImageDisplay
Encapsulates state of an image in a display window, and provides the functionality for converting the image to a form suitable for display. more...
template<typename T>
class ImageIterator
An iterator to iterate over all pixels of an image, or all lines of an image. more...
class ImageSliceIterator
An iterator for slice-by-slice processing of an image. Use it to process a multi-dimensional image as a series of lower-dimensional images. more...
class Interval
Represents the shape of an interval for inf-generating and sup-generating operators. more...
template<typename T>
struct IsIndexingType
For use with std::enable_if to enable templates only for types that are indexing types, true for signed and unsigned integers. See dip::IsSampleType for usage details. more...
template<typename T>
struct IsNumericType
For use with std::enable_if to enable templates only for types that are numeric types, similar to std::is_arithmetic but also true for complex types. See dip::IsSampleType for usage details. more...
template<typename T>
struct IsSampleType
For use with std::enable_if to enable templates only for types that are valid for image samples. more...
template<typename Types>
class JointImageIterator
An iterator to iterate over all pixels of multiple images. more...
class Kernel
Represents the shape and size of a filtering kernel. more...
class LabelMap
Represents a set of labels (object IDs), and maps them to new ones. more...
struct LibraryInformation
Holds information about the DIPlib binary. more...
template<typename T>
class LineIterator
An iterator to iterate over all pixels of an image line. more...
class LookupTable
Encapsulates the concept of the look-up table (LUT). more...
class Measurement
Contains measurement results, as obtained through dip::MeasurementTool::Measure. more...
class MeasurementTool
Performs measurements on images. more...
class Metric
Represents a metric to be used to create a dip::NeighborList more...
class MinMaxAccumulator
MinMaxAccumulator computes minimum and maximum values of a sequence of values. more...
class MomentAccumulator
MomentAccumulator accumulates the zeroth order moment, the first order normalized moments, and the second order normalized central moments, in N dimensions. more...
class NeighborList
Defines the neighborhood of a pixel as a set of coordinates, with optionally their distance. more...
struct OneDimensionalFilter
Describes a 1D filter more...
class OutputBuffer abstract
An abstract base class for output buffers. more...
class ParameterError
Exception class indicating that a function received an inconsistent or out of range parameter (the calling code is wrong). more...
struct PerObjectEllipsoidFitParameters
Defines the parameters for the PerObjectEllipsoidFit function. more...
struct PhysicalQuantity
Encapsulates a quantity with physical units. more...
class PixelSize
Specifies an image’s pixel size as physical quantities. more...
class PixelTable
Represents an arbitrarily-shaped neighborhood (filter support) in an arbitrary number of dimensions. more...
class PixelTableOffsets
Represents an arbitrarily-shaped neighborhood (filter support) in an arbitrary number of dimensions. more...
class PoissonRandomGenerator
Generates random integer values taken from a poisson distribution. more...
struct Polygon
A polygon with floating-point vertices. more...
struct QuartilesResult
Represents the quartiles, see dip::Quartiles. more...
class RadiusValues
Holds the various output values of the dip::Polygon::RadiusStatistics function. more...
struct RadonCircleParameters
Stores the parameters for one hypersphere (circle, sphere). more...
class Random
A pseudo-random number generator with excellent statistical properties, and it’s also fast. more...
struct Range
Used in indexing to indicate a regular subset of pixels along one image dimension. more...
template<typename T>
class RDFT
An object that encapsulates the real-valued Discrete Fourier Transform (DFT). more...
struct RegressionParameters
Represents the result of a 2D regression analysis: \(y = a + bx\) . more...
class RunTimeError
Exception class indicating that something happened that we couldn’t predict (e.g. file error). more...
template<typename T>
class SampleIterator
An iterator to iterate over samples in a tensor, or pixels on an image line. more...
class SimpleOutputBuffer
A simple output buffer implementation. more...
template<typename IndexType_>
class SimpleUnionFind
A simplified version of dip::UnionFind that doesn’t store any information about the regions, only equivalences. more...
struct SpatialOverlapMetrics
Holds return values for the function dip::SpatialOverlap. more...
class StatisticsAccumulator
StatisticsAccumulator computes population statistics by accumulating the first four central moments. more...
class StructuringElement
Represents the shape and size of a structuring element. more...
struct SubpixelLocationResult
Contains the result of the function dip::SubpixelLocation. more...
class Tensor
Describes the shape of a tensor, but doesn’t actually contain tensor data. more...
struct TestObjectParams
Describes the parameters for a test object, used by dip::TestObject. more...
class ThinPlateSpline
Fits a thin plate spline function to a set of points. Useful for interpolation of scattered points. more...
class UniformRandomGenerator
Generates random floating-point values taken from a uniform distribution. more...
template<typename IndexType_, typename ValueType_, typename UnionFunction_>
class UnionFind
An STL-like data structure for the union-find algorithm. more...
class Units
Encapsulates the concepts of physical units, using SI units. more...
class VarianceAccumulator
VarianceAccumulator computes mean and standard deviation by accumulating the first two central moments. more...
template<typename T>
struct Vertex
Encodes a location in a 2D image. more...

Aliases

template<typename T>
using AbsType = dip::detail::AbsTypeCalculator
The type to use for the output of abs operations. Matches dip::DataType::SuggestAbs.
using BooleanArray = dip::DimensionArray
An array used as a dimension selector.
using BoundaryConditionArray = dip::DimensionArray
An array to hold boundary conditions.
using BoundingBoxFloat = dip::BoundingBox
A bounding box with floating-point coordinates.
using BoundingBoxInteger = dip::BoundingBox
A bounding box with integer coordinates.
using ChainCodeArray = std::vector<ChainCode>
A collection of object contours.
template<typename T>
using ComplexType = dip::detail::ComplexTypeCalculator
The type to use in calculations when a complex type is needed. Matches dip::DataType::SuggestComplex.
template<typename T>
using ConstImageIterator = dip::ImageIterator
A const iterator to iterate over all pixels of an image, or all lines of an image. more...
template<typename T>
using ConstLineIterator = dip::LineIterator
A const iterator to iterate over all pixels of an image line. more...
template<typename T>
using ConstSampleIterator = dip::SampleIterator
A const iterator to iterate over samples in a tensor, or pixels on an image line. more...
using CoordinateArray = std::vector<UnsignedArray>
An array of pixel coordinates.
using DataSegment = std::shared_ptr<void>
A dip::Image holds a shared pointer to the data segment using this type.
using DataTypeArray = dip::DimensionArray
An array to hold data types
using dcomplex = std::complex<dfloat>
Type for samples in a 128-bit complex-valued (double-precision) image
using dfloat = double
Type for samples in a 64-bit floating point (double-precision) image
template<typename T>
using DoubleType = dip::detail::DoubleTypeCalculator
The double precision floating point type (real or complex) to use when computing large sums of any input type. Matches dip::DataType::SuggestDouble.
template<typename T>
using FlexBinType = dip::detail::FlexBinTypeCalculator
The type to use in calculations. Matches dip::DataType::SuggestFlexBin.
template<typename T>
using FlexType = dip::detail::FlexTypeCalculator
The type to use in calculations. Matches dip::DataType::SuggestFlex.
using FloatArray = dip::DimensionArray
An array to hold filter parameters.
using FloatCoordinateArray = std::vector<FloatArray>
An array of subpixel coordinates.
template<typename T>
using FloatType = dip::detail::FloatTypeCalculator
The type to use in calculations when a floating-point type is needed. Matches dip::DataType::SuggestFloat.
using ImageArray = std::vector<Image>
An array of images
using ImageConstRefArray = std::vector<std::reference_wrapper<const Image>>
An array of const image references
using ImageRefArray = std::vector<std::reference_wrapper<Image>>
An array of image references
using IntegerArray = dip::DimensionArray
An array to hold strides, filter sizes, etc.
using InterpolationFunctionPointer = void(*)(Image, Image::Pixel, FloatArray)
Pointer to an interpolation function. Only use pointers returned by dip::PrepareResampleAtUnchecked.
using IntervalArray = std::vector<Interval>
An array of intervals.
using LabelType = dip::uint32
Type currently used for all labeled images, see dip::DT_LABEL.
using ObjectIdToIndexMap = tsl::robin_map<dip::uint, dip::uint>
Maps object IDs to object indices
using OneDimensionalFilterArray = std::vector<OneDimensionalFilter>
An array of 1D filters
using PhysicalQuantityArray = dip::DimensionArray
An array to hold physical quantities, such as a pixel’s size.
using RadonCircleParametersArray = std::vector<RadonCircleParameters>
An array of dip::RadonCircleParameters, storing parameters for all hyperspheres detected by dip::RadonTransformCircles.
using RangeArray = dip::DimensionArray
An array of ranges
template<typename T>
using RealType = dip::detail::RealTypeCalculator
The type to use in calculations when a real-valued type is needed. Matches dip::DataType::SuggestReal.
using scomplex = std::complex<sfloat>
Type for samples in a 64-bit complex-valued (single-precision) image
using sfloat = float
Type for samples in a 32-bit floating point (single-precision) image
using sint = std::ptrdiff_t
An integer type to be used for strides and similar measures.
using sint16 = std::int16_t
Type for samples in a 16-bit signed integer image
using sint32 = std::int32_t
Type for samples in a 32-bit signed integer image
using sint64 = std::int64_t
Type for samples in a 64-bit signed integer image
using sint8 = std::int8_t
Type for samples in an 8-bit signed integer image
using String = std::string
A string, used to specify an option
using StringArray = std::vector<String>
An array of strings, used to specify an option per dimension
using StringSet = std::set<String>
A collection of strings, used to specify multiple independent options
using SubpixelLocationArray = std::vector<SubpixelLocationResult>
Contains the result of the functions dip::SubpixelMaxima and dip::SubpixelMinima.
using uint = std::size_t
An integer type to be used for sizes and the like.
using uint16 = std::uint16_t
Type for samples in a 16-bit unsigned integer image
using uint32 = std::uint32_t
Type for samples in a 32-bit unsigned integer image
using uint64 = std::uint64_t
Type for samples in a 64-bit unsigned integer image
using uint8 = std::uint8_t
Type for samples in an 8-bit unsigned integer image; also to be used as single byte for pointer arithmetic
using UnsignedArray = dip::DimensionArray
An array to hold dimensions, dimension lists, etc.
using VertexFloat = dip::Vertex
A vertex with floating-point coordinates.
using VertexInteger = dip::Vertex
A vertex with integer coordinates
using xy = std::array<dfloat, 2>
A color, as (x,y) chromaticity coordinates, used to specify a white point for color spaces.
using XYZ = std::array<dfloat, 3>
An XYZ triplet, used to specify a white point for color spaces.
using XYZMatrix = std::array<dfloat, 9>
XYZ matrix (3x3 matrix, column-major order) for conversion between RGB and XYZ. Computed from a dip::XYZ triplet.

Enums

enum class BoundaryCondition: uint8
Enumerates various ways of extending image data beyond its boundary. more...

Functions

template<typename T>
auto abs(T value) -> T constexpr
constexpr version of std::abs. Prefer std::abs outside of constexpr functions.
void Abs(dip::Image const& in, dip::Image& out)
Computes the absolute value of each sample.
auto Accuracy(dip::Image const& in, dip::Image const& reference) -> dip::dfloat
Compares a segmentation result in to the ground truth reference, determining the accuracy of the segmentation. more...
void Acos(dip::Image const& in, dip::Image& out)
Computes the arc cosine of each sample.
void AdaptiveBanana(dip::Image const& in, dip::ImageConstRefArray const& params, dip::Image& out, dip::FloatArray const& sigmas = {5.0,1.0}, dip::UnsignedArray const& orders = {0}, dip::dfloat truncation = 2.0, dip::UnsignedArray const& exponents = {0}, dip::String const& interpolationMethod = S::LINEAR, dip::String const& boundaryCondition = S::SYMMETRIC_MIRROR)
Adaptive Gaussian filtering using curvature. more...
void AdaptiveGauss(dip::Image const& in, dip::ImageConstRefArray const& params, dip::Image& out, dip::FloatArray const& sigmas = {5.0,1.0}, dip::UnsignedArray const& orders = {0}, dip::dfloat truncation = 2.0, dip::UnsignedArray const& exponents = {0}, dip::String const& interpolationMethod = S::LINEAR, dip::String const& boundaryCondition = S::SYMMETRIC_MIRROR)
Adaptive Gaussian filtering. more...
void Add(dip::Image const& lhs, dip::Image const& rhs, dip::Image& out, dip::DataType dt)
Adds two images, sample-wise, with singleton expansion, and using saturated arithmetic. more...
void AffineTransform(dip::Image const& in, dip::Image& out, dip::FloatArray const& matrix, dip::String const& interpolationMethod = S::LINEAR)
Applies an arbitrary affine transformation to the 2D or 3D image. more...
auto Alias(dip::Image const& img1, dip::Image const& img2) -> bool
Calls img1.Aliases( img2 ). See dip::Image::Aliases.
void All(dip::Image const& in, dip::Image const& mask, dip::Image& out, dip::BooleanArray const& process = {})
Determines if all pixels have non-zero values over all those dimensions which are specified by process. more...
void AllTensorElements(dip::Image const& in, dip::Image& out)
Determines if all tensor elements are non-zero, producing a binary scalar image.
void AlphaBlend(dip::Image const& in, dip::Image const& overlay, dip::Image const& alpha, dip::Image& out)
Overlays an image over another, using alpha blending. more...
void AlphaMask(dip::Image const& in, dip::Image const& alpha, dip::Image& out, dip::Image::Pixel const& background = {0}, dip::dfloat scaling = 255)
Apply the alpha mask alpha to the image in, using the background color background. more...
void AlternatingSequentialFilter(dip::Image const& in, dip::Image& out, dip::Range const& sizes = {3,7,2}, dip::String const& shape = S::ELLIPTIC, dip::String const& mode = S::STRUCTURAL, dip::String const& polarity = S::OPENCLOSE, dip::StringArray const& boundaryCondition = {})
Alternating sequential filters for smoothing more...
void And(dip::Image const& lhs, dip::Image const& rhs, dip::Image& out)
Bit-wise AND of two integer images, or logical AND of two binary images, sample-wise, with singleton expansion. more...
void Angle(dip::Image const& in, dip::Image& out)
Computes the angle of the vector at each pixel in image in. more...
template<typename T>
auto Angle(dip::Vertex const& v1, dip::Vertex const& v2) -> dip::dfloat
The angle of the vector v2-v1.
void Any(dip::Image const& in, dip::Image const& mask, dip::Image& out, dip::BooleanArray const& process = {})
Determines if any pixel has a non-zero value over all those dimensions which are specified by process. more...
void AnyTensorElement(dip::Image const& in, dip::Image& out)
Determines if any tensor element is non-zero, producing a binary scalar image.
void ApplyAlphaChannel(dip::Image const& in, dip::Image& out, dip::Image::Pixel const& background = {0}, dip::dfloat scaling = 255)
Apply the alpha channel in the sRGBA image in, using the background color background. more...
void ApplyColorMap(dip::Image const& in, dip::Image& out, dip::String const& colorMap = "grey")
Applies a color map to an image prepared for display using dip::ImageDisplay. more...
void ApplyWindow(dip::Image const& in, dip::Image& out, dip::String const& type = "Hamming", dip::dfloat parameter = 0.5)
Multiplies the image with a windowing function. more...
auto ApproximatelyEquals(dip::dfloat lhs, dip::dfloat rhs, dip::dfloat tolerance = 1e-6) -> bool constexpr
Approximate floating-point equality: abs(lhs-rhs)/lhs <= tolerance.
void AreaClosing(dip::Image const& in, dip::Image const& mask, dip::Image& out, dip::uint filterSize, dip::uint connectivity = 0)
Computes the area closing, calling dip::AreaOpening with polarity="closing".
void AreaOpening(dip::Image const& in, dip::Image const& mask, dip::Image& out, dip::uint filterSize, dip::uint connectivity = 0, dip::String const& polarity = S::OPENING)
Computes the area opening or closing. This is a parametric opening. more...
template<typename T>
void ArrayUseParameter(dip::DimensionArray& array, dip::uint nDims, T defaultValue = {})
Check the length of an array, and extend it if necessary and possible. more...
void Asin(dip::Image const& in, dip::Image& out)
Computes the arc sine of each sample.
void Atan(dip::Image const& in, dip::Image& out)
Computes the arc tangent of each sample.
void Atan2(dip::Image const& y, dip::Image const& x, dip::Image& out)
Computes the four-quadrant arc tangent of y/x. more...
void AttenuationCorrection(dip::Image const& in, dip::Image& out, dip::dfloat fAttenuation = 0.01, dip::dfloat bAttenuation = 0.01, dip::dfloat background = 0.0, dip::dfloat threshold = 0.0, dip::dfloat NA = 1.4, dip::dfloat refIndex = 1.518, dip::String const& method = "DET")
3D fluorescence attenuation correction using one of three iterative algorithms more...
void AutoCorrelationFT(dip::Image const& in, dip::Image& out, dip::String const& inRepresentation = S::SPATIAL, dip::String const& outRepresentation = S::SPATIAL)
Computes the auto-correlation function. more...
auto BackgroundThreshold(dip::Histogram const& in, dip::dfloat distance = 2.0, dip::dfloat sigma = 4.0) -> dip::dfloat
Determines a threshold using the unimodal background-symmetry method, and the image’s histogram in. more...
auto BackgroundThreshold(dip::Image const& in, dip::Image const& mask, dip::Image& out, dip::dfloat distance = 2.0, dip::dfloat sigma = 4.0) -> dip::dfloat
Thresholds the image in using the unimodal background-symmetry method, and the histogram of in. more...
void BeerLambertMapping(dip::Image const& in, dip::Image& out, dip::Image::Pixel const& background)
Applies a logarithmic mapping to a transmittance image to obtain an absorbance image more...
auto BesselJ0(dip::dfloat x) -> dip::dfloat
Computes the Bessel function J of the order 0 (with around 7 digits of precision).
void BesselJ0(dip::Image const& in, dip::Image& out)
Computes the Bessel functions of the first kind of each sample, of order alpha = 0. Precise up to about 7 digits.
auto BesselJ1(dip::dfloat x) -> dip::dfloat
Computes the Bessel function J of the order 1 (with around 7 digits of precision).
void BesselJ1(dip::Image const& in, dip::Image& out)
Computes the Bessel functions of the first kind of each sample, of order alpha = 1. Precise up to about 7 digits.
auto BesselJN(dip::dfloat x, dip::uint n) -> dip::dfloat
Computes the Bessel function J of the order n (with around 7 digits of precision).
void BesselJN(dip::Image const& in, dip::Image& out, dip::uint alpha)
Computes the Bessel functions of the first kind of each sample, of order alpha. Precise up to about 7 digits.
auto BesselY0(dip::dfloat x) -> dip::dfloat
Computes the Bessel function Y of the order 0 (with around 7 digits of precision).
void BesselY0(dip::Image const& in, dip::Image& out)
Computes the Bessel functions of the second kind of each sample, of order alpha = 0. Precise up to about 7 digits.
auto BesselY1(dip::dfloat x) -> dip::dfloat
Computes the Bessel function Y of the order 1 (with around 7 digits of precision).
void BesselY1(dip::Image const& in, dip::Image& out)
Computes the Bessel functions of the second kind of each sample, of order alpha = 1. Precise up to about 7 digits.
auto BesselYN(dip::dfloat x, dip::uint n) -> dip::dfloat
Computes the Bessel function Y of the order n (with around 7 digits of precision).
void BesselYN(dip::Image const& in, dip::Image& out, dip::uint alpha)
Computes the Bessel functions of the second kind of each sample, of order alpha. Precise up to about 7 digits.
void BilateralFilter(dip::Image const& in, dip::Image const& estimate, dip::Image& out, dip::FloatArray spatialSigmas = {2.0}, dip::dfloat tonalSigma = 30.0, dip::dfloat truncation = 2.0, dip::String const& method = "xysep", dip::StringArray const& boundaryCondition = {})
Bilateral filter, convenience function that allows selecting an implementation more...
void BinaryAreaClosing(dip::Image const& in, dip::Image& out, dip::uint filterSize, dip::uint connectivity = 0, dip::String const& s_edgeCondition = S::BACKGROUND)
Computes the area closing of a binary image, by calling dip::BinaryAreaOpening on the inverse of the input image.
void BinaryAreaOpening(dip::Image const& in, dip::Image& out, dip::uint filterSize, dip::uint connectivity = 0, dip::String const& edgeCondition = S::BACKGROUND)
Computes the area opening of a binary image more...
void BinaryClosing(dip::Image const& in, dip::Image& out, dip::sint connectivity = -1, dip::uint iterations = 3, dip::String const& edgeCondition = S::SPECIAL)
Binary morphological closing operation. more...
void BinaryDilation(dip::Image const& in, dip::Image& out, dip::sint connectivity = -1, dip::uint iterations = 3, dip::String const& edgeCondition = S::BACKGROUND)
Binary morphological dilation operation. more...
void BinaryErosion(dip::Image const& in, dip::Image& out, dip::sint connectivity = -1, dip::uint iterations = 3, dip::String const& edgeCondition = S::OBJECT)
Binary morphological erosion operation. more...
void BinaryNoise(dip::Image const& in, dip::Image& out, dip::Random& random, dip::dfloat p10 = 0.05, dip::dfloat p01 = 0.05)
Adds noise to the binary input image. more...
void BinaryOpening(dip::Image const& in, dip::Image& out, dip::sint connectivity = -1, dip::uint iterations = 3, dip::String const& edgeCondition = S::SPECIAL)
Binary morphological opening operation. more...
void BinaryPropagation(dip::Image const& inSeed, dip::Image const& inMask, dip::Image& out, dip::sint connectivity = 1, dip::uint iterations = 0, dip::String const& edgeCondition = S::BACKGROUND)
Morphological propagation of binary objects. more...
void BlendBandlimitedMask(dip::Image& out, dip::Image const& mask, dip::Image const& value = dip::Image({255}), dip::IntegerArray pos = {})
Blends value into out at position pos, according to mask. more...
auto BooleanFromString(dip::String const& input, dip::String const& trueString, dip::String const& falseString) -> bool
Translates a string input parameter that is meant as a boolean value.
void BoundaryArrayUseParameter(dip::BoundaryConditionArray& bc, dip::uint nDims)
Check the length of a BoundaryConditionArray, and extend it if necessary and possible. more...
auto BoundaryPixelInterval2D() -> dip::Interval
Returns a 2D interval for detecting boundary pixels. more...
auto BranchPixelInterval2D() -> dip::IntervalArray
Returns a 2D interval array for detecting branch pixels. more...
void Canny(dip::Image const& in, dip::Image& out, dip::FloatArray const& sigmas = {1}, dip::dfloat lower = 0.5, dip::dfloat upper = 0.9, dip::String const& selection = S::ALL)
Detect edges in the grey-value image by finding salient ridges in the gradient magnitude more...
void CartesianToPolar(dip::Image const& in, dip::Image& out)
Converts the vector at each pixel in image in from Cartesian coordinates to polar (or spherical) coordinates. more...
template<typename TPI, <SFINAE> = 0>
auto CastLabelType(TPI label) -> dip::LabelType
Casting any unsigned integer type to dip::LabelType. Throws if value is too large.
void Ceil(dip::Image const& in, dip::Image& out)
Computes the smallest integer larger or equal to each sample (rounds up). Only defined for floating-point types, the output is the same type.
template<typename T, typename <SFINAE>>
auto ceil_cast(T v) -> dip::sint constexpr
Fast ceil operation, without checks, returning a dip::sint.
auto CenterOfMass(dip::Image const& in, dip::Image const& mask = {}) -> dip::FloatArray
Computes the center of mass (first order moments) of the image in, optionally using only those pixels selected by mask. more...
auto ChordLength(dip::Image const& object, dip::Image const& mask, dip::Random& random, dip::uint probes = 100000, dip::uint length = 100, dip::String const& sampling = S::RANDOM) -> dip::Distribution
Estimates the chord length distribution of the different phases in object. more...
auto ChordLength(dip::Image const& object, dip::Image const& mask, dip::uint probes = 100000, dip::uint length = 100, dip::String const& sampling = S::RANDOM) -> dip::Distribution
like above, using a default-initialized dip::Random object.
void CityBlockDistanceToPoint(dip::Image& out, dip::UnsignedArray const& sizes, dip::FloatArray const& point, dip::FloatArray scaling = {})
Creates an image filled with the city block distance to a given point. more...
template<typename T>
auto clamp(T const& v, T const& lo, T const& hi) -> T const& constexpr
Clamps a value between a min and max value (a.k.a. clip, saturate, etc.).
template<typename TargetType, typename SourceType, <SFINAE> = 0>
auto clamp_cast(SourceType v) -> TargetType constexpr
Casts a value of any pixel type to any other pixel type, clamping it to the destination range.
void Clip(dip::Image const& in, dip::Image& out, dip::dfloat low = 0.0, dip::dfloat high = 255.0, dip::String const& mode = S::BOTH)
Clips the sample values in in to a specified range. more...
void ClipHigh(dip::Image const& in, dip::Image& out, dip::dfloat high = 255.0)
Clips the sample values in in, putting all values above high to high.
void ClipLow(dip::Image const& in, dip::Image& out, dip::dfloat low = 0.0)
Clips the sample values in in, putting all values below low to low.
void Closing(dip::Image const& in, dip::Image& out, dip::StructuringElement const& se = {}, dip::StringArray const& boundaryCondition = {})
Applies the closing with a standard or custom structuring element. more...
void ClosingByReconstruction(dip::Image const& in, dip::Image& out, dip::StructuringElement const& se = {}, dip::uint connectivity = 0, dip::StringArray const& boundaryCondition = {})
Closing by reconstruction more...
void CoherenceEnhancingDiffusion(dip::Image const& in, dip::Image& out, dip::dfloat derivativeSigma = 1, dip::dfloat regularizationSigma = 3, dip::uint iterations = 5, dip::StringSet const& flags = {})
Applies iterative coherence enhancing (anisotropic) diffusion more...
void ColoredNoise(dip::Image const& in, dip::Image& out, dip::Random& random, dip::dfloat variance = 1.0, dip::dfloat color = -2.0)
Adds colored (Brownian, pink, blue, violet) noise to in. more...
auto ColorMapLut(dip::String const& colorMap = "grey") -> dip::LookupTable
Creates a dip::LookupTable with a pre-computed sRGB color map. more...
void CompactWatershed(dip::Image const& in, dip::Image const& seeds, dip::Image const& mask, dip::Image& out, dip::uint connectivity = 1, dip::dfloat compactness = 1.0, dip::StringSet const& flags = {})
Computes the compact watershed of in within mask, starting at seeds. more...
auto ComplementWeightedSumOfMinimalDistances(dip::Image const& in, dip::Image const& reference) -> dip::dfloat
Computes the complement weighted sum of minimal distances (CWSMD) between two binary images. more...
void Concatenate(dip::ImageConstRefArray const& in, dip::Image& out, dip::uint dimension = 0)
Concatenates a set of images along one dimension. more...
void Concatenate(dip::Image const& in1, dip::Image const& in2, dip::Image& out, dip::uint dimension = 0)
Concatenates two images.
void ConditionalThickening2D(dip::Image const& c_in, dip::Image const& c_mask, dip::Image& out, dip::uint iterations = 0, dip::String const& endPixelCondition = S::LOSE, dip::String const& edgeCondition = S::BACKGROUND)
Thickens the image in conditioned on the mask (2D only). more...
void ConditionalThinning2D(dip::Image const& in, dip::Image const& mask, dip::Image& out, dip::uint iterations = 0, dip::String const& endPixelCondition = S::LOSE, dip::String const& edgeCondition = S::BACKGROUND)
Thins the image in conditioned on the mask (2D only). more...
void Conjugate(dip::Image const& in, dip::Image& out)
Computes the complex conjugate of each sample.
void ConjugateTranspose(dip::Image const& in, dip::Image& out)
Computes the conjugate transpose of the tensor image in.
template<typename T, bool inverse = false, typename <SFINAE>>
auto consistent_round(T v) -> dip::sint constexpr
Consistent rounding, without checks, returning a dip::sint. more...
auto ContainsInfinity(dip::Image const& in, dip::Image const& mask = {}) -> bool
True if any pixel is infinite.
auto ContainsNonFiniteValue(dip::Image const& in, dip::Image const& mask = {}) -> bool
True if any pixel is non-finite (infinite or NaN).
auto ContainsNotANumber(dip::Image const& in, dip::Image const& mask = {}) -> bool
True if any pixel is NaN.
void ContrastStretch(dip::Image const& in, dip::Image& out, dip::dfloat lowerBound = 0.0, dip::dfloat upperBound = 100.0, dip::dfloat outMin = 0.0, dip::dfloat outMax = 255.0, dip::String const& method = S::LINEAR, dip::dfloat parameter1 = 1.0, dip::dfloat parameter2 = 0.0)
Applies a mapping function according to the input image’s range and the given output range. more...
void Convert(dip::Image const& src, dip::Image& dest, dip::DataType dt)
Copies samples over from src to dest, with data type conversion. more...
auto ConvexHullInterval2D() -> dip::IntervalArray
Returns a 2D interval array to thicken to a convex hull. more...
void Convolution(dip::Image const& in, dip::Image const& filter, dip::Image& out, dip::String const& method = S::BEST, dip::StringArray const& boundaryCondition = {})
Applies a convolution with a filter kernel (PSF). more...
void ConvolveFT(dip::Image const& in, dip::Image const& filter, dip::Image& out, dip::String const& inRepresentation = S::SPATIAL, dip::String const& filterRepresentation = S::SPATIAL, dip::String const& outRepresentation = S::SPATIAL, dip::StringArray const& boundaryCondition = {})
Applies a convolution with a filter kernel (PSF) by multiplication in the Fourier domain. more...
void Copy(dip::Image const& src, dip::Image& dest)
Copies samples over from src to dest, identical to the dip::Image::Copy method.
void Copy(dip::Image::View const& src, dip::Image& dest)
Copies samples over from src to dest, identical to the dip::Image::Copy method.
void Copy(dip::Image const& src, dip::Image::View& dest)
Copies samples over from src to dest, identical to the dip::Image::View::Copy method.
void Copy(dip::Image::View const& src, dip::Image::View& dest)
Copies samples over from src to dest, identical to the dip::Image::View::Copy method.
void CopyFrom(dip::Image const& src, dip::Image& dest, dip::Image const& srcMask)
Copies the pixels selected by srcMask in src over to dest. dest will be a 1D image. more...
void CopyFrom(dip::Image const& src, dip::Image& dest, dip::IntegerArray const& srcOffsets)
Copies the pixels selected by srcOffsets over from src to dest. dest will be a 1D image. more...
void CopyTo(dip::Image const& src, dip::Image& dest, dip::Image const& destMask)
Copies all pixels from src over to the pixels selected by destMask in dest. dest must be forged.
void CopyTo(dip::Image const& src, dip::Image& dest, dip::IntegerArray const& destOffsets)
Copies all pixels from src over to the pixels selected by destOffsets in dest. dest must be forged.
void Cos(dip::Image const& in, dip::Image& out)
Computes the cosine of each sample.
void Cosh(dip::Image const& in, dip::Image& out)
Computes the hyperbolic cosine of each sample.
auto CostesColocalizationCoefficients(dip::Image const& channel1, dip::Image const& channel2, dip::Image const& mask = {}) -> dip::ColocalizationCoefficients
Computes Costes’ colocalization coefficients. more...
auto CostesSignificanceTest(dip::Image const& channel1, dip::Image const& channel2, dip::Image const& mask, dip::Random& random, dip::UnsignedArray blockSizes = {3}, dip::uint repetitions = 200) -> dip::dfloat
Computes Costes’ test of significance of true colocalization more...
auto CostesSignificanceTest(dip::Image const& channel1, dip::Image const& channel2, dip::Image const& mask = {}, dip::UnsignedArray blockSizes = {3}, dip::uint repetitions = 200) -> dip::dfloat
Like above, using a default-initialized dip::Random object.
auto Count(dip::Image const& in, dip::Image const& mask = {}) -> dip::uint
Counts the number of non-zero pixels in a scalar image. more...
void CountNeighbors(dip::Image const& in, dip::Image& out, dip::uint connectivity = 0, dip::String const& mode = S::FOREGROUND, dip::String const& edgeCondition = S::BACKGROUND)
Counts the number of set neighbors for each pixel in the binary image in. more...
auto Covariance(dip::Histogram const& in) -> dip::FloatArray
Computes the covariance matrix of the data represented by the histogram. more...
auto Covariance(dip::Image const& in1, dip::Image const& in2, dip::Image const& mask = {}) -> dip::CovarianceAccumulator
Computes the covariance and correlation between the two images, within an optional mask. more...
void CreateCoordinates(dip::Image& out, dip::UnsignedArray const& sizes, dip::StringSet const& mode = {}, dip::String const& system = S::CARTESIAN)
Creates an image filled with the coordinates of each pixel. more...
void CreateDelta(dip::Image& out, dip::UnsignedArray const& sizes, dip::String const& origin = "")
Creates a delta function image. more...
auto CreateDelta(dip::UnsignedArray const& sizes, dip::String const& origin = "") -> dip::Image
Overload for the function above, which takes image sizes instead of an image.
void CreateGabor(dip::Image& out, dip::FloatArray const& sigmas, dip::FloatArray const& frequencies, dip::dfloat truncation = 3.0)
Creates a Gabor kernel. more...
void CreateGauss(dip::Image& out, dip::FloatArray const& sigmas, dip::UnsignedArray derivativeOrder = {0}, dip::dfloat truncation = 3.0, dip::UnsignedArray exponents = {0}, dip::String const& extent = "full")
Creates a Gaussian kernel. more...
auto CreateImageConstRefArray(dip::ImageArray const& imar) -> dip::ImageConstRefArray
Creates a dip::ImageConstRefArray from a dip::ImageArray.
auto CreateImageRefArray(dip::ImageArray& imar) -> dip::ImageRefArray
Creates a dip::ImageRefArray from a dip::ImageArray.
void CreatePhiCoordinate(dip::Image& out, dip::UnsignedArray const& sizes, dip::StringSet const& mode = {})
Creates an image filled with the angle to the x-axis within the x-y plane. more...
void CreatePoissonPointProcess(dip::Image& out, dip::UnsignedArray const& sizes, dip::Random& random, dip::dfloat density = 0.01)
Creates a binary image with a Poisson point process of density. more...
void CreateRadiusCoordinate(dip::Image& out, dip::UnsignedArray const& sizes, dip::StringSet const& mode = {})
Creates an image filled with the distance to the origin. more...
void CreateRadiusSquareCoordinate(dip::Image& out, dip::UnsignedArray const& sizes, dip::StringSet const& mode = {})
Creates an image filled with the square distance to the origin. more...
void CreateRamp(dip::Image& out, dip::UnsignedArray const& sizes, dip::uint dimension, dip::StringSet const& mode = {})
Creates a ramp function image. more...
void CreateRandomGrid(dip::Image& out, dip::UnsignedArray const& sizes, dip::Random& random, dip::dfloat density = 0.01, dip::String const& type = S::RECTANGULAR, dip::String const& mode = S::TRANSLATION)
Creates a binary image with a random grid. more...
void CreateThetaCoordinate(dip::Image& out, dip::UnsignedArray const& sizes, dip::StringSet const& mode = {})
Creates an image filled with the angle to the z-axis. more...
void CreateXCoordinate(dip::Image& out, dip::UnsignedArray const& sizes, dip::StringSet const& mode = {})
Creates a ramp function image. more...
void CreateYCoordinate(dip::Image& out, dip::UnsignedArray const& sizes, dip::StringSet const& mode = {})
Creates a ramp function image. more...
void CreateZCoordinate(dip::Image& out, dip::UnsignedArray const& sizes, dip::StringSet const& mode = {})
Creates a ramp function image. more...
void CrossCorrelationFT(dip::Image const& in1, dip::Image const& in2, dip::Image& out, dip::String const& in1Representation = S::SPATIAL, dip::String const& in2Representation = S::SPATIAL, dip::String const& outRepresentation = S::SPATIAL, dip::String const& normalize = S::NORMALIZE)
Calculates the cross-correlation between two images of equal size. more...
void CrossProduct(dip::Image const& lhs, dip::Image const& rhs, dip::Image& out)
Computes the cross product (inner product) of two vector images. more...
template<typename T>
auto CrossProduct(dip::Vertex const& v1, dip::Vertex const& v2) -> dip::dfloat
Compute the z component of the cross product of vectors v1 and v2.
auto CumulativeHistogram(dip::Histogram const& in) -> dip::Histogram
Computes a cumulative histogram from in. See dip::Histogram::Cumulative.
void CumulativeSum(dip::Image const& in, dip::Image const& mask, dip::Image& out, dip::BooleanArray const& process = {})
Calculates the cumulative sum of the pixel values over all those dimensions which are specified by process. more...
void Curl(dip::Image const& in, dip::Image& out, dip::FloatArray sigmas = {1.0}, dip::String const& method = S::BEST, dip::StringArray const& boundaryCondition = {}, dip::BooleanArray process = {}, dip::dfloat truncation = 3)
Computes the curl (rotation) of the 2D or 3D vector field in. more...
void DanielssonLineDetector(dip::Image const& in, dip::Image& out, dip::FloatArray const& sigmas = {2.0}, dip::String const& polarity = S::WHITE, dip::StringArray const& boundaryCondition = {})
Danielsson’s Hessian-based line detector more...
void DefineROI(dip::Image const& src, dip::Image& dest, dip::UnsignedArray origin = {}, dip::UnsignedArray sizes = {}, dip::UnsignedArray spacing = {})
Makes a new image object pointing to same pixel data as src, but with different origin, strides and size. more...
void Derivative(dip::Image const& in, dip::Image& out, dip::UnsignedArray derivativeOrder, dip::FloatArray sigmas = {1.0}, dip::String const& method = S::BEST, dip::StringArray const& boundaryCondition = {}, dip::dfloat truncation = 3)
Computes derivatives more...
auto Determinant(dip::uint n, dip::ConstSampleIterator input) -> dip::dfloat
Computes the determinant of a square, real-valued matrix. more...
auto Determinant(dip::uint n, dip::ConstSampleIterator input) -> dip::dcomplex
Computes the determinant of a square, complex-valued matrix. more...
void Determinant(dip::Image const& in, dip::Image& out)
Computes the determinant of the square matrix at each pixel in image in.
template<typename T>
auto DeterminantDiagonal(dip::uint n, dip::ConstSampleIterator input) -> T
Computes the determinant of a diagonal matrix. more...
void Dgg(dip::Image const& in, dip::Image& out, dip::FloatArray sigmas = {1.0}, dip::String const& method = S::BEST, dip::StringArray const& boundaryCondition = {}, dip::BooleanArray process = {}, dip::dfloat truncation = 3)
Computes the second derivative in the gradient direction. more...
auto DiceCoefficient(dip::Image const& in, dip::Image const& reference) -> dip::dfloat
Compares a segmentation result in to the ground truth reference, determining the Dice coefficient. more...
void Dilation(dip::Image const& in, dip::Image& out, dip::StructuringElement const& se = {}, dip::StringArray const& boundaryCondition = {})
Applies the dilation with a standard or custom structuring element. more...
void DirectedPathOpening(dip::Image const& in, dip::Image const& mask, dip::Image& out, dip::IntegerArray filterParam, dip::String const& polarity = S::OPENING, dip::StringSet const& mode = {})
Applies a path opening or closing in a specific direction. more...
template<typename T>
auto Distance(dip::DimensionArray const& v1, dip::DimensionArray const& v2) -> double
Computes the Square Euclidean distance between two points.
template<typename T>
auto Distance(dip::Vertex const& v1, dip::Vertex const& v2) -> dip::dfloat
The norm of the vector v2-v1.
auto DistanceDistribution(dip::Image const& object, dip::Image const& region, dip::uint length = 100) -> dip::Distribution
Computes the distribution of distances to the background of region for the different phases in object. more...
template<typename T>
auto DistanceSquare(dip::Vertex const& v1, dip::Vertex const& v2) -> dip::dfloat
The square norm of the vector v2-v1.
void DistanceToPoint(dip::Image& out, dip::UnsignedArray const& sizes, dip::FloatArray const& point, dip::String const& distance = S::EUCLIDEAN, dip::FloatArray scaling = {})
Creates an image filled with the distance to a given point. more...
template<typename T, <SFINAE> = 0>
auto div_ceil(T lhs, T rhs) -> T constexpr
Integer division, unsigned, return ceil.
template<typename T, <SFINAE> = 0>
auto div_floor(T lhs, T rhs) -> T constexpr
Integer division, unsigned, return floor.
template<typename T, typename <SFINAE> = T>
auto div_round(T lhs, T rhs) -> T constexpr
Integer division, return rounded.
void Divergence(dip::Image const& in, dip::Image& out, dip::FloatArray sigmas = {1.0}, dip::String const& method = S::BEST, dip::StringArray const& boundaryCondition = {}, dip::BooleanArray process = {}, dip::dfloat truncation = 3)
Computes the divergence of the vector field in. more...
void Divide(dip::Image const& lhs, dip::Image const& rhs, dip::Image& out, dip::DataType dt)
Divides two images, sample-wise, with singleton expansion. more...
void DotProduct(dip::Image const& lhs, dip::Image const& rhs, dip::Image& out)
Computes the dot product (inner product) of two vector images.
void DrawBandlimitedBall(dip::Image& out, dip::dfloat diameter, dip::FloatArray origin, dip::Image::Pixel const& value = {1}, dip::String const& mode = S::FILLED, dip::dfloat sigma = 1.0, dip::dfloat truncation = 3.0)
Draws an approximately bandlimited ball (disk) or an n-sphere (circle) in an image, using Gaussian profiles. more...
void DrawBandlimitedBox(dip::Image& out, dip::FloatArray sizes, dip::FloatArray origin, dip::Image::Pixel const& value = {1}, dip::String const& mode = S::FILLED, dip::dfloat sigma = 1.0, dip::dfloat truncation = 3.0)
Draws an approximately bandlimited box (rectangle) in an image, using Gaussian profiles. more...
void DrawBandlimitedLine(dip::Image& out, dip::FloatArray start, dip::FloatArray end, dip::Image::Pixel const& value = {1}, dip::dfloat sigma = 1.0, dip::dfloat truncation = 3.0)
Draws an approximately bandlimited line between two points in the image, using Gaussian profiles. more...
void DrawBandlimitedPoint(dip::Image& out, dip::FloatArray origin, dip::Image::Pixel const& value = {1}, dip::FloatArray sigmas = {1.0}, dip::dfloat truncation = 3.0)
Draws an approximately bandlimited point in the image, in the form of a Gaussian blob. more...
void DrawBox(dip::Image& out, dip::FloatArray const& sizes, dip::FloatArray const& origin, dip::Image::Pixel const& value = {1})
Draws a solid box (rectangle) in an image. more...
void DrawDiamond(dip::Image& out, dip::FloatArray const& sizes, dip::FloatArray const& origin, dip::Image::Pixel const& value = {1})
Draws a solid diamond in an image. more...
void DrawEllipsoid(dip::Image& out, dip::FloatArray const& sizes, dip::FloatArray const& origin, dip::Image::Pixel const& value = {1})
Draws a solid ellipsoid in an image. more...
void DrawLine(dip::Image& out, dip::UnsignedArray const& start, dip::UnsignedArray const& end, dip::Image::Pixel const& value = {1}, dip::String const& blend = S::ASSIGN)
Draws a Bresenham line in an image. more...
void DrawLines(dip::Image& out, dip::CoordinateArray const& points, dip::Image::Pixel const& value = {1}, dip::String const& blend = S::ASSIGN)
Draws a series of Bresenham lines in an image. more...
void DrawPolygon2D(dip::Image& out, dip::Polygon const& polygon, dip::Image::Pixel const& value = {1}, dip::String const& mode = S::FILLED)
Draws a polygon in a 2D image. more...
void DrawText(dip::Image& out, dip::String const& text, dip::FloatArray origin, dip::Image::Pixel const& value = {1}, dip::dfloat orientation = 0, dip::String const& align = S::LEFT)
Draws text with the built-in, fixed-sized glyphs. more...
auto DrawText(dip::String const& text, dip::dfloat orientation = 0) -> dip::Image
Alternate version of the function above that returns a new image tightly cropped around the rendered text. more...
void Dx(dip::Image const& in, dip::Image& out, dip::FloatArray sigmas = {1.0})
Computes the first derivative along x, see dip::Derivative.
void Dxx(dip::Image const& in, dip::Image& out, dip::FloatArray sigmas = {1.0})
Computes the second derivative along x, see dip::Derivative.
void Dxy(dip::Image const& in, dip::Image& out, dip::FloatArray sigmas = {1.0})
Computes the first derivative along x and y, see dip::Derivative.
void Dxz(dip::Image const& in, dip::Image& out, dip::FloatArray sigmas = {1.0})
Computes the first derivative along x and z, see dip::Derivative.
void Dy(dip::Image const& in, dip::Image& out, dip::FloatArray sigmas = {1.0})
Computes the first derivative along y, see dip::Derivative.
void Dyy(dip::Image const& in, dip::Image& out, dip::FloatArray sigmas = {1.0})
Computes the second derivative along y, see dip::Derivative.
void Dyz(dip::Image const& in, dip::Image& out, dip::FloatArray sigmas = {1.0})
Computes the first derivative along y and z, see dip::Derivative.
void Dz(dip::Image const& in, dip::Image& out, dip::FloatArray sigmas = {1.0})
Computes the first derivative along z, see dip::Derivative.
void Dzz(dip::Image const& in, dip::Image& out, dip::FloatArray sigmas = {1.0})
Computes the second derivative along z, see dip::Derivative.
void EdgeObjectsRemove(dip::Image const& c_in, dip::Image& out, dip::uint connectivity = 1)
Remove edge objects from a binary or labeled image. more...
void EigenDecomposition(dip::uint n, dip::ConstSampleIterator input, dip::SampleIterator lambdas, dip::SampleIterator vectors = nullptr)
Finds the eigenvalues and eigenvectors of a square, real-valued matrix. more...
void EigenDecomposition(dip::uint n, dip::ConstSampleIterator input, dip::SampleIterator lambdas, dip::SampleIterator vectors = nullptr)
Finds the eigenvalues and eigenvectors of a square, complex-valued matrix. more...
void EigenDecomposition(dip::Image const& in, dip::Image& out, dip::Image& eigenvectors, dip::String const& method = S::PRECISE)
Computes the eigenvalues and eigenvectors of the square matrix at each pixel in image in. more...
void Eigenvalues(dip::Image const& in, dip::Image& out, dip::String const& method = S::PRECISE)
Computes the eigenvalues of the square matrix at each pixel in image in. more...
auto EndPixelInterval2D(dip::uint connectivity = 2) -> dip::IntervalArray
Returns an interval array for detecting end pixels. Includes isolated pixels. more...
auto Entropy(dip::Histogram const& in) -> dip::dfloat
Calculates the entropy, in bits, of an image from its histogram in. more...
auto Entropy(dip::Image const& in, dip::Image const& mask = {}, dip::uint nBins = 256) -> dip::dfloat
Calculates the entropy, in bits, using a histogram with nBins bins. more...
void Equal(dip::Image const& lhs, dip::Image const& rhs, dip::Image& out)
Equality comparison, sample-wise, with singleton expansion. more...
auto EqualizationLookupTable(dip::Histogram const& in) -> dip::LookupTable
Computes a lookup table that, when applied to an image with the histogram in, yields an image with a flat histogram (or rather a histogram that is as flat as possible). more...
void Erf(dip::Image const& in, dip::Image& out)
Computes the error function of each sample.
void Erfc(dip::Image const& in, dip::Image& out)
Computes the complementary error function of each sample.
void ErfClip(dip::Image const& in, dip::Image& out, dip::dfloat low = 128.0, dip::dfloat high = 64.0, dip::String const& mode = S::RANGE)
Clips the sample values in in to a specified range, using the error function. more...
void Erosion(dip::Image const& in, dip::Image& out, dip::StructuringElement const& se = {}, dip::StringArray const& boundaryCondition = {})
Applies the erosion with a standard or custom structuring element. more...
auto EstimateNoiseVariance(dip::Image const& in, dip::Image const& mask = {}) -> dip::dfloat
Estimates the variance of white Gaussian noise in an image. more...
void EuclideanDistanceToPoint(dip::Image& out, dip::UnsignedArray const& sizes, dip::FloatArray const& point, dip::FloatArray scaling = {})
Creates an image filled with the Euclidean distance to a given point. more...
void EuclideanDistanceTransform(dip::Image const& in, dip::Image& out, dip::String const& border = S::BACKGROUND, dip::String const& method = S::SEPARABLE)
Euclidean distance transform more...
void EuclideanSkeleton(dip::Image const& in, dip::Image& out, dip::String const& endPixelCondition = S::NATURAL, dip::String const& edgeCondition = S::BACKGROUND)
Accurate binary skeleton (2D and 3D only). more...
void Exp(dip::Image const& in, dip::Image& out)
Computes the base e exponent (natural exponential) of each sample.
void Exp10(dip::Image const& in, dip::Image& out)
Computes the base 10 exponent of each sample.
void Exp2(dip::Image const& in, dip::Image& out)
Computes the base 2 exponent of each sample.
void ExpandTensor(dip::Image const& src, dip::Image& dest)
Copies samples over from src to dest, expanding the tensor so it’s a standard, column-major matrix. more...
void ExponentialFitCorrection(dip::Image const& in, dip::Image const& mask, dip::Image& out, dip::dfloat percentile = -1.0, dip::String const& fromWhere = "first plane", dip::dfloat hysteresis = 1.0, dip::String const& weighting = "none")
3D fluorescence attenuation correction using an exponential fit more...
void ExtendImage(dip::Image const& in, dip::Image& out, dip::UnsignedArray borderSizes, dip::BoundaryConditionArray boundaryConditions = {}, dip::Option::ExtendImageFlags options = {})
Extends the image in by borderSizes along each dimension. more...
void ExtendImage(dip::Image const& in, dip::Image& out, dip::UnsignedArray borderSizes, dip::StringArray const& boundaryConditions, dip::StringSet const& options = {})
Extends the image in by borderSizes along each dimension. more...
void ExtendImageToSize(dip::Image const& in, dip::Image& out, dip::UnsignedArray const& sizes, dip::Option::CropLocation cropLocation = Option::CropLocation::CENTER, dip::BoundaryConditionArray boundaryConditions = {}, dip::Option::ExtendImageFlags options = {})
Extends the image in to sizes. more...
void ExtendImageToSize(dip::Image const& in, dip::Image& out, dip::UnsignedArray const& sizes, dip::String const& cropLocation, dip::StringArray const& boundaryConditions = {}, dip::StringSet const& options = {})
Extends the image in to sizes. more...
void ExtendRegion(dip::Image& image, dip::RangeArray ranges, dip::BoundaryConditionArray boundaryConditions = {})
Fills the pixels outside a region in the image using a boundary condition. more...
void ExtendRegion(dip::Image& image, dip::RangeArray const& ranges, dip::StringArray const& boundaryConditions)
Fills the pixels outside a region in the image using a boundary condition. more...
void ExtendRegion(dip::Image& image, dip::UnsignedArray origin, dip::UnsignedArray sizes, dip::StringArray const& boundaryConditions)
Fills the pixels outside a region in the image using a boundary condition. more...
void FastIterativeShrinkageThresholding(dip::Image const& in, dip::Image const& psf, dip::Image& out, dip::dfloat regularization = 0.1, dip::dfloat tolerance = 1e-6, dip::uint maxIterations = 30, dip::uint nScales = 3, dip::StringSet const& options = {S::PAD})
Fast Iterative Shrinkage-Thresholding (FISTA) deconvolution. more...
auto FileAddExtension(dip::String const& filename, dip::String const& extension) -> dip::String deprecated
Adds the given extension to the file name, replacing any existing extension.
auto FileAppendExtension(dip::String const& filename, dip::String const& extension) -> dip::String
Appends the given extension to the file name.
auto FileCompareExtension(dip::String const& filename, dip::String const& extension) -> bool
Returns true if the file name has the given extension.
auto FileGetExtension(dip::String const& filename) -> dip::String
Gets the extension for the given file name, or an empty string if there’s no extension.
auto FileGetExtensionPosition(dip::String const& filename) -> String::size_type
Returns the location of the dot that separates the extension, or dip::String::npos if there is no dot.
auto FileHasExtension(dip::String const& filename) -> bool
Returns true if the file name has an extension.
void FillColoredNoise(dip::Image& out, dip::Random& random, dip::dfloat variance = 1.0, dip::dfloat color = -2.0)
Fills out with colored (Brownian, pink, blue, violet) noise. more...
void FillCoordinates(dip::Image& out, dip::StringSet const& mode = {}, dip::String const& system = S::CARTESIAN)
Fills an image with the coordinates of each pixel. more...
void FillDelta(dip::Image& out, dip::String const& origin = "")
Fills an image with a delta function. more...
void FillDistanceToPoint(dip::Image& out, dip::FloatArray const& point, dip::String const& distance = S::EUCLIDEAN, dip::FloatArray scaling = {})
Fills an image with the distance to a given point. more...
void FillHoles(dip::Image const& in, dip::Image& out, dip::uint connectivity = 1)
Fill holes in binary image. more...
void FillPhiCoordinate(dip::Image& out, dip::StringSet const& mode = {})
Fills an image with the angle to the x-axis within the x-y plane. more...
void FillPoissonPointProcess(dip::Image& out, dip::Random& random, dip::dfloat density = 0.01)
Fills the binary image out with a Poisson point process of density. more...
void FillRadiusCoordinate(dip::Image& out, dip::StringSet const& mode = {})
Fills an image with the distance to the origin. more...
void FillRadiusSquareCoordinate(dip::Image& out, dip::StringSet const& mode = {})
Fills an image with the square distance to the origin. more...
void FillRamp(dip::Image& out, dip::uint dimension, dip::StringSet const& mode = {})
Fills an image with a ramp function. more...
void FillRandomGrid(dip::Image& out, dip::Random& random, dip::dfloat density = 0.01, dip::String const& type = S::RECTANGULAR, dip::String const& mode = S::TRANSLATION)
Fills the binary image out with a grid that is randomly placed over the image. more...
void FillThetaCoordinate(dip::Image& out, dip::StringSet const& mode = {})
Fills an image with the angle to the z-axis. more...
void FillXCoordinate(dip::Image& out, dip::StringSet const& mode = {})
Fills an image with a ramp function that increases along the x-axis. more...
void FillYCoordinate(dip::Image& out, dip::StringSet const& mode = {})
Fills an image with a ramp function that increases along the y-axis. more...
void FillZCoordinate(dip::Image& out, dip::StringSet const& mode = {})
Fills an image with a ramp function that increases along the z-axis. more...
auto Find(dip::Image const& in, dip::Image const& mask = {}) -> dip::CoordinateArray
Finds the coordinates for all non-zero pixels in the scalar image in, optionally constrained to the pixels selected by mask. more...
auto FindHoughCircles(dip::Image const& in, dip::Image const& gv, dip::UnsignedArray const& range = {}, dip::dfloat distance = 10.0, dip::dfloat fraction = 0.1) -> dip::FloatCoordinateArray
Find circles in 2D binary images. more...
auto FindHoughMaxima(dip::Image const& in, dip::dfloat distance = 10.0, dip::dfloat fraction = 0.1) -> dip::CoordinateArray
Find local maxima in Hough parameter space. more...
auto FindShift(dip::Image const& in1, dip::Image const& in2, dip::String const& method = S::MTS, dip::dfloat parameter = 0, dip::UnsignedArray maxShift = {}) -> dip::FloatArray
Estimates the (sub-pixel) global shift between in1 and in2. more...
void FiniteDifference(dip::Image const& in, dip::Image& out, dip::UnsignedArray derivativeOrder = {0}, dip::String const& smoothFlag = S::SMOOTH, dip::StringArray const& boundaryCondition = {}, dip::BooleanArray process = {})
Finite difference derivatives more...
void FixedThreshold(dip::Image const& in, dip::Image& out, dip::dfloat threshold, dip::dfloat foreground = 1.0, dip::dfloat background = 0.0, dip::String const& output = S::BINARY)
Thresholds an image at the threshold value. more...
void Floor(dip::Image const& in, dip::Image& out)
Computes the largest integer smaller or equal to each sample (rounds down). Only defined for floating-point types, the output is the same type.
template<typename T, typename <SFINAE>>
auto floor_cast(T v) -> dip::sint constexpr
Fast floor operation, without checks, returning a dip::sint.
void FlushToZero(dip::Image const& in, dip::Image& out)
Flushes denormal sample values to zero. Denormal floating-point values can slow down computation. Only defined for floating-point types, the output is the same type.
auto FourierMellinMatch2D(dip::Image const& in1, dip::Image const& in2, dip::Image& out, dip::String const& interpolationMethod = S::LINEAR, dip::String const& correlationMethod = S::PHASE) -> dip::FloatArray
Finds the scaling, translation and rotation between two 2D images using the Fourier Mellin transform more...
void FourierTransform(dip::Image const& in, dip::Image& out, dip::StringSet const& options = {}, dip::BooleanArray process = {})
Computes the forward and inverse Fourier Transform more...
auto FractalDimension(dip::Image const& in, dip::dfloat eta = 0.5) -> dip::dfloat
Estimates the fractal dimension of the binary image in the sliding box method. more...
void Fraction(dip::Image const& in, dip::Image& out)
Computes the fractional value of each sample (out = in - dip::Truncate(in)). Only defined for floating-point types, the output is the same type.
void FrangiVesselness(dip::Image const& in, dip::Image& out, dip::FloatArray const& sigmas = {2.0}, dip::FloatArray parameters = {}, dip::String const& polarity = S::WHITE, dip::StringArray const& boundaryCondition = {})
Frangi vessel detector, single scale (Hessian based) more...
void FTBox(dip::Image& out, dip::FloatArray length = {1}, dip::dfloat amplitude = 1)
Generates the Fourier transform of a box. more...
auto FTBox(dip::UnsignedArray const& sizes, dip::FloatArray length = {1}, dip::dfloat amplitude = 1) -> dip::Image
Overload for the function above, which takes image sizes instead of an image.
void FTCross(dip::Image& out, dip::FloatArray length = {1}, dip::dfloat amplitude = 1)
Generates the Fourier transform of a cross. more...
auto FTCross(dip::UnsignedArray const& sizes, dip::FloatArray length = {1}, dip::dfloat amplitude = 1) -> dip::Image
Overload for the function above, which takes image sizes instead of an image.
void FTEllipsoid(dip::Image& out, dip::FloatArray radius = {1}, dip::dfloat amplitude = 1)
Generates the Fourier transform of an ellipsoid. more...
auto FTEllipsoid(dip::UnsignedArray const& sizes, dip::FloatArray radius = {1}, dip::dfloat amplitude = 1) -> dip::Image
Overload for the function above, which takes image sizes instead of an image.
void FTGaussian(dip::Image& out, dip::FloatArray sigma, dip::dfloat amplitude = 1, dip::dfloat truncation = 3)
Generates the Fourier transform of a Gaussian. more...
auto FTGaussian(dip::UnsignedArray const& sizes, dip::FloatArray sigma, dip::dfloat amplitude = 1, dip::dfloat truncation = 3) -> dip::Image
Overload for the function above, which takes image sizes instead of an image.
void FullBilateralFilter(dip::Image const& in, dip::Image const& estimate, dip::Image& out, dip::FloatArray spatialSigmas = {2.0}, dip::dfloat tonalSigma = 30.0, dip::dfloat truncation = 2.0, dip::StringArray const& boundaryCondition = {})
Bilateral filter, brute-force full kernel implementation more...
void Gabor2D(dip::Image const& in, dip::Image& out, dip::FloatArray sigmas = {5.0,5.0}, dip::dfloat frequency = 0.1, dip::dfloat direction = dip::pi, dip::StringArray const& boundaryCondition = {}, dip::dfloat truncation = 3)
2D Gabor filter with direction parameter more...
void GaborFIR(dip::Image const& in, dip::Image& out, dip::FloatArray sigmas, dip::FloatArray const& frequencies, dip::StringArray const& boundaryCondition = {}, dip::BooleanArray process = {}, dip::dfloat truncation = 3)
Finite impulse response implementation of the Gabor filter more...
void GaborIIR(dip::Image const& in, dip::Image& out, dip::FloatArray sigmas, dip::FloatArray const& frequencies, dip::StringArray const& boundaryCondition = {}, dip::BooleanArray process = {}, dip::IntegerArray const& filterOrder = {}, dip::dfloat truncation = 3)
Recursive infinite impulse response implementation of the Gabor filter more...
void Gauss(dip::Image const& in, dip::Image& out, dip::FloatArray sigmas = {1.0}, dip::UnsignedArray derivativeOrder = {0}, dip::String const& method = S::BEST, dip::StringArray const& boundaryCondition = {}, dip::dfloat truncation = 3)
Convolution with a Gaussian kernel and its derivatives more...
void GaussFIR(dip::Image const& in, dip::Image& out, dip::FloatArray sigmas = {1.0}, dip::UnsignedArray derivativeOrder = {0}, dip::StringArray const& boundaryCondition = {}, dip::dfloat truncation = 3)
Finite impulse response implementation of the Gaussian filter and its derivatives more...
void GaussFT(dip::Image const& in, dip::Image& out, dip::FloatArray sigmas = {1.0}, dip::UnsignedArray derivativeOrder = {0}, dip::dfloat truncation = 3, dip::String const& inRepresentation = S::SPATIAL, dip::String const& outRepresentation = S::SPATIAL, dip::StringArray const& boundaryCondition = {})
Fourier implementation of the Gaussian filter and its derivatives more...
void GaussianAnisotropicDiffusion(dip::Image const& in, dip::Image& out, dip::uint iterations = 5, dip::dfloat K = 10, dip::dfloat lambda = 0.25, dip::String const& g = "Gauss")
Applies iterative generic anisotropic diffusion using Gaussian derivatives more...
void GaussianEdgeClip(dip::Image const& in, dip::Image& out, dip::Image::Pixel const& value = {1}, dip::dfloat sigma = 1.0, dip::dfloat truncation = 3.0)
Maps input values through an error function, can be used to generate arbitrary band-limited objects. more...
void GaussianLineClip(dip::Image const& in, dip::Image& out, dip::Image::Pixel const& value = {1}, dip::dfloat sigma = 1.0, dip::dfloat truncation = 3.0)
Maps input values through a Gaussian function, can be used to generate arbitrary band-limited lines. more...
auto GaussianMixtureModel(dip::ConstSampleIterator data, dip::SampleIterator responsibilities, dip::uint size, dip::uint numberOfGaussians, dip::uint maxIter = 20, dip::Option::Periodicity periodicity = Option::Periodicity::NOT_PERIODIC) -> std::vector<GaussianParameters>
Determines the parameters for a Gaussian Mixture Model. more...
void GaussianMixtureModel(dip::Image const& in, dip::Image& out, dip::uint dimension = 2, dip::uint numberOfGaussians = 2, dip::uint maxIter = 20, dip::StringSet const& flags = {})
Determines the parameters for a Gaussian Mixture Model for every line in the image. more...
auto GaussianMixtureModel(dip::Histogram const& in, dip::uint numberOfGaussians, dip::uint maxIter = 20) -> std::vector<GaussianParameters>
Determines the parameters for a Gaussian Mixture Model fitted to the histogram in. more...
auto GaussianMixtureModelThreshold(dip::Histogram const& in, dip::uint nThresholds = 1) -> dip::FloatArray
Determines a set of nThresholds thresholds by modeling the histogram with a Gaussian Mixture Model, and choosing the optimal Bayes thresholds. more...
auto GaussianMixtureModelThreshold(dip::Image const& in, dip::Image const& mask, dip::Image& out, dip::uint nThresholds = 1) -> dip::FloatArray
Thresholds the image in using nThresholds thresholds, determined by fitting a Gaussian Mixture Model to the histogram of in. more...
void GaussianNoise(dip::Image const& in, dip::Image& out, dip::Random& random, dip::dfloat variance = 1.0)
Adds normally distributed white noise to the input image. more...
void GaussIIR(dip::Image const& in, dip::Image& out, dip::FloatArray sigmas = {1.0}, dip::UnsignedArray derivativeOrder = {0}, dip::StringArray const& boundaryCondition = {}, dip::UnsignedArray filterOrder = {}, dip::String const& designMethod = S::DISCRETE_TIME_FIT, dip::dfloat truncation = 3)
Infinite impulse response implementation of the Gaussian filter and its derivatives more...
auto gcd(dip::uint a, dip::uint b) -> dip::uint constexpr
Compute the greatest common denominator of two positive integers.
void GeneralConvolution(dip::Image const& in, dip::Image const& filter, dip::Image& out, dip::StringArray const& boundaryCondition = {})
Applies a convolution with a filter kernel (PSF) by direct implementation of the convolution sum. more...
void GeodesicDistanceTransform(dip::Image const& marker, dip::Image const& condition, dip::Image& out)
Geodesic distance transform more...
void GeometricMean(dip::Image const& in, dip::Image const& mask, dip::Image& out, dip::BooleanArray const& process = {})
Calculates the geometric mean of the pixel values over all those dimensions which are specified by process. more...
void GeometricMeanTensorElement(dip::Image const& in, dip::Image& out)
Computes the geometric mean tensor element value at each pixel, producing a scalar image.
void GetBranchPixels(dip::Image const& in, dip::Image& out, dip::uint connectivity = 0, dip::String const& edgeCondition = S::BACKGROUND)
Returns the branch pixels in the skeleton image in. That is, the set pixels with more than two neighbors. See dip::CountNeighbors.
void GetEndPixels(dip::Image const& in, dip::Image& out, dip::uint connectivity = 0, dip::String const& edgeCondition = S::BACKGROUND)
Returns the end pixels in the skeleton image in. That is, the set pixels with one neighbor. See dip::CountNeighbors.
auto GetImageChainCodes(dip::Image const& labels, std::vector<LabelType> const& objectIDs = {}, dip::uint connectivity = 2) -> dip::ChainCodeArray
Returns the set of chain codes sequences that encode the contours of the given objects in a labeled image. more...
auto GetLabelBoundingBox(dip::Image const& label, dip::LabelType objectID) -> dip::RangeArray
Returns the bounding box for all pixels with label objectID in the labeled or binary image label. more...
void GetLinkPixels(dip::Image const& in, dip::Image& out, dip::uint connectivity = 0, dip::String const& edgeCondition = S::BACKGROUND)
Returns the link pixels in the skeleton image in. That is, the set pixels with two neighbors. See dip::CountNeighbors.
auto GetNumberOfThreads() -> dip::uint
Gets the maximum number of threads that can be used in computations. more...
auto GetOptimalDFTSize(dip::uint size0, bool larger = true, dip::uint maxFactor = 5) -> dip::uint
Returns a size equal or larger to size0 that is efficient for the DFT implementation. The value returned is a product of small primes. more...
auto GetSingleChainCode(dip::Image const& labels, dip::UnsignedArray const& startCoord, dip::uint connectivity = 2) -> dip::ChainCode
Returns the chain codes sequence that encodes the contour of one object in a binary or labeled image. more...
void GetSinglePixels(dip::Image const& in, dip::Image& out, dip::uint connectivity = 0, dip::String const& edgeCondition = S::BACKGROUND)
Returns the isolated pixels in the binary image in. That is, the set pixels with zero neighbors. See dip::CountNeighbors.
void Gradient(dip::Image const& in, dip::Image& out, dip::FloatArray sigmas = {1.0}, dip::String const& method = S::BEST, dip::StringArray const& boundaryCondition = {}, dip::BooleanArray process = {}, dip::dfloat truncation = 3)
Computes the gradient of the image, resulting in an N-vector image, if the input was N-dimensional. more...
void GradientDirection(dip::Image const& in, dip::Image& out, dip::FloatArray sigmas = {1.0}, dip::String const& method = S::BEST, dip::StringArray const& boundaryCondition = {}, dip::BooleanArray process = {}, dip::dfloat truncation = 3)
Computes the direction of the gradient of the image, equivalent to dip::Angle( dip::Gradient( in )). more...
void GradientMagnitude(dip::Image const& in, dip::Image& out, dip::FloatArray sigmas = {1.0}, dip::String const& method = S::BEST, dip::StringArray const& boundaryCondition = {}, dip::BooleanArray process = {}, dip::dfloat truncation = 3)
Computes the gradient magnitude of the image, equivalent to dip::Norm( dip::Gradient( in )). more...
auto Granulometry(dip::Image const& in, dip::Image const& mask, std::vector<dfloat> const& scales = {}, dip::String const& type = "isotropic", dip::String const& polarity = S::OPENING, dip::StringSet const& options = {}) -> dip::Distribution
Computes the granulometric function for an image more...
void GraphCut(dip::DirectedGraph& graph, dip::DirectedGraph::VertexIndex sourceIndex, dip::DirectedGraph::VertexIndex sinkIndex)
Computes the minimum cut of the graph, separating the source node from the sink node. more...
void GraphCut(dip::Image const& in, dip::Image const& markers, dip::Image& out, dip::dfloat sigma = 30.0, dip::dfloat lambda = 1.0, dip::dfloat gamma = 0.0)
Graph-cut segmentation more...
void Greater(dip::Image const& lhs, dip::Image const& rhs, dip::Image& out)
Inequality comparison, sample-wise, with singleton expansion. more...
void GreyWeightedDistanceTransform(dip::Image const& grey, dip::Image const& bin, dip::Image const& mask, dip::Image& out, dip::Metric metric = {S::CHAMFER,2}, dip::String const& mode = S::FASTMARCHING)
Grey-weighted distance transform more...
void GrowRegions(dip::Image const& label, dip::Image const& mask, dip::Image& out, dip::sint connectivity = -1, dip::uint iterations = 0)
Grow (dilate) labeled regions uniformly. more...
void GrowRegionsWeighted(dip::Image const& label, dip::Image const& grey, dip::Image const& mask, dip::Image& out, dip::dfloat distance = infinity)
Grow labeled regions with a speed function given by a grey-value image. more...
void HaarWaveletTransform(dip::Image const& in, dip::Image& out, dip::uint nLevels = 4, dip::String const& direction = S::FORWARD, dip::BooleanArray process = {})
Computes the Haar wavelet transform or its inverse. more...
void HarrisCornerDetector(dip::Image const& in, dip::Image& out, dip::dfloat kappa = 0.04, dip::FloatArray const& sigmas = {2.0}, dip::StringArray const& boundaryCondition = {})
Harris corner detector more...
auto HausdorffDistance(dip::Image const& in, dip::Image const& reference) -> dip::dfloat
Computes the Hausdorff distance between two binary images. more...
void Hessian(dip::Image const& in, dip::Image& out, dip::FloatArray sigmas = {1.0}, dip::String const& method = S::BEST, dip::StringArray const& boundaryCondition = {}, dip::BooleanArray process = {}, dip::dfloat truncation = 3)
Computes the Hessian of the image, resulting in a symmetric NxN tensor image, if the input was N-dimensional. more...
void HistogramEqualization(dip::Image const& in, dip::Image& out, dip::uint nBins = 256)
Modifies the image such that its histogram is as flat as possible. more...
void HistogramMatching(dip::Image const& in, dip::Image& out, dip::Histogram const& example)
Modifies the image such that its histogram is as similar as possible to example. more...
void HitAndMiss(dip::Image const& in, dip::Image& out, dip::StructuringElement const& hit, dip::StructuringElement const& miss, dip::String const& mode = S::UNCONSTRAINED, dip::StringArray const& boundaryCondition = {})
The Hit-and-Miss transform, uses two structuring elements, hit must be within the structures, miss must be without. more...
void HitAndMiss(dip::Image const& in, dip::Image& out, dip::Image const& se, dip::String const& mode = S::UNCONSTRAINED, dip::StringArray const& boundaryCondition = {})
The Hit-and-Miss transform, uses a single structuring element in the form of a small image that has “hit”, “miss” and “don’t care” values. more...
void HMaxima(dip::Image const& in, dip::Image& out, dip::dfloat h, dip::uint connectivity = 0)
Computes the H-Maxima filtered image more...
void HMinima(dip::Image const& in, dip::Image& out, dip::dfloat h, dip::uint connectivity = 0)
Computes the H-Minima filtered image more...
auto HomotopicEndPixelInterval2D(dip::uint connectivity = 2) -> dip::IntervalArray
Returns an interval array for detecting end pixels. Excludes isolated pixels more...
auto HomotopicInverseEndPixelInterval2D(dip::uint connectivity = 2) -> dip::IntervalArray
Returns an interval array for detecting end background pixels. Excludes isolated pixels. more...
auto HomotopicThickeningInterval2D(dip::uint connectivity = 2) -> dip::IntervalArray
Returns a 2D interval array for homotopic thickening. more...
auto HomotopicThinningInterval2D(dip::uint connectivity = 2) -> dip::IntervalArray
Returns a 2D interval array for homotopic thinning. more...
void HoughTransformCircleCenters(dip::Image const& in, dip::Image const& gv, dip::Image& out, dip::UnsignedArray const& range = {})
Hough transform for circles in 2D binary images. more...
auto HypersphereSurface(dip::uint n, dip::dfloat r) -> dip::dfloat constexpr
Computes the surface area of an n-dimensional hypersphere with radius r.
auto HypersphereVolume(dip::uint n, dip::dfloat r) -> dip::dfloat constexpr
Computes the volume of an n-dimensional hypersphere with radius r.
void Hypot(dip::Image const& a, dip::Image const& b, dip::Image& out)
Computes the square root of the sum of the squares of corresponding samples in a and b. more...
void HysteresisThreshold(dip::Image const& in, dip::Image& out, dip::dfloat lowThreshold, dip::dfloat highThreshold)
Hysteresis threshold. more...
void Identity(dip::Image const& in, dip::Image& out)
Creates an image whose pixels are identity matrices. more...
auto IDivergence(dip::Image const& in, dip::Image const& reference, dip::Image const& mask = {}) -> dip::dfloat
Calculates the I-divergence between corresponding sample values of in and reference. more...
auto ImageIsICS(dip::String const& filename) -> bool
Returns true if the file filename is an ICS file.
auto ImageIsJPEG(dip::String const& filename) -> bool
Returns true if the file filename is a JPEG file.
auto ImageIsNPY(dip::String const& filename) -> bool
Returns true if the file filename is a NPY file.
auto ImageIsPNG(dip::String const& filename) -> bool
Returns true if the file filename is a PNG file.
auto ImageIsTIFF(dip::String const& filename) -> bool
Returns true if the file filename is a TIFF file.
auto ImageRead(dip::Image& out, dip::String const& filename, dip::String format = "") -> dip::FileInformation
Reads the image in a file filename, and puts it in out. more...
auto ImageReadICS(dip::Image& out, dip::String const& filename, dip::RangeArray const& roi = {}, dip::Range const& channels = {}, dip::String const& mode = "") -> dip::FileInformation
Read the image in the ICS file filename and puts it in out. more...
auto ImageReadICS(dip::Image& out, dip::String const& filename, dip::UnsignedArray const& origin, dip::UnsignedArray const& sizes = {}, dip::UnsignedArray const& spacing = {}, dip::Range const& channels = {}, dip::String const& mode = "") -> dip::FileInformation
This function is an overload of the previous function that defines the ROI using different parameters. more...
auto ImageReadICSInfo(dip::String const& filename) -> dip::FileInformation
Reads image information and metadata from the ICS file filename, without reading the actual pixel data. See dip::ImageReadICS for more details on the file format and the handling of filename.
auto ImageReadJPEG(dip::Image& out, dip::String const& filename) -> dip::FileInformation
Reads an image from the JPEG file filename and puts it in out. more...
auto ImageReadJPEG(dip::Image& out, void const* buffer, dip::uint length) -> dip::FileInformation
Reads an image from the JPEG-encoded buffer and puts it in out. more...
auto ImageReadJPEGInfo(dip::String const& filename) -> dip::FileInformation
Reads image information and metadata from the JPEG file filename, without reading the actual pixel data. See dip::ImageReadJPEG for more details on the handling of filename.
auto ImageReadJPEGInfo(void const* buffer, dip::uint length) -> dip::FileInformation
Reads image information and metadata from the JPEG-encoded buffer, without reading the actual pixel data. more...
auto ImageReadNPY(dip::Image& out, dip::String const& filename) -> dip::FileInformation
Reads a numeric array from the NumPy NPY file filename and puts it in out. more...
auto ImageReadNPYInfo(dip::String const& filename) -> dip::FileInformation
Reads array information (size and data type) from the NumPy NPY file filename, without reading the actual pixel data. See dip::ImageReadNPY for more details on the handling of filename.
auto ImageReadPNG(dip::Image& out, dip::String const& filename) -> dip::FileInformation
Reads an image from the PNG file filename and puts it in out. more...
auto ImageReadPNG(dip::Image& out, void const* buffer, dip::uint length) -> dip::FileInformation
Reads an image from the PNG-encoded buffer and puts it in out. more...
auto ImageReadPNGInfo(dip::String const& filename) -> dip::FileInformation
Reads image information and metadata from the PNG file filename, without reading the actual pixel data. See dip::ImageReadPNG for more details on the handling of filename.
auto ImageReadPNGInfo(void const* buffer, dip::uint length) -> dip::FileInformation
Reads image information and metadata from the PNG-encoded buffer, without reading the actual pixel data. more...
auto ImageReadTIFF(dip::Image& out, dip::String const& filename, dip::Range imageNumbers = Range{0}, dip::RangeArray const& roi = {}, dip::Range const& channels = {}, dip::String const& useColorMap = S::APPLY) -> dip::FileInformation
Reads an image from the TIFF file filename and puts it in out. more...
auto ImageReadTIFF(dip::Image& out, dip::String const& filename, dip::Range const& imageNumbers, dip::UnsignedArray const& origin, dip::UnsignedArray const& sizes = {}, dip::UnsignedArray const& spacing = {}, dip::Range const& channels = {}, dip::String const& useColorMap = S::APPLY) -> dip::FileInformation
This function is an overload of the previous function that defines the ROI using different parameters. more...
auto ImageReadTIFFInfo(dip::String const& filename, dip::uint imageNumber = 0) -> dip::FileInformation
Reads image information and metadata from the TIFF file filename, without reading the actual pixel data. See dip::ImageReadTIFF for more details on the handling of filename and imageNumber.
void ImageReadTIFFSeries(dip::Image& out, dip::StringArray const& filenames, dip::String const& useColorMap = S::APPLY)
Reads a set of 2D TIFF images as a single 3D image. more...
auto ImageSliceEndIterator(dip::Image const& image, dip::uint procDim) -> dip::ImageSliceIterator
Constructs an end iterator corresponding to a dip::ImageSliceIterator
auto ImageTensorIterator(dip::Image const& image) -> dip::ImageSliceIterator
An iterator for element-by-element processing of a tensor image. Use it to process a tensor image as a series of scalar images. more...
void ImageWrite(dip::Image const& image, dip::String const& filename, dip::String format = "", dip::String const& compression = "")
Writes image to file. more...
void ImageWriteICS(dip::Image const& image, dip::String const& filename, dip::StringArray const& history = {}, dip::uint significantBits = 0, dip::StringSet const& options = {})
Writes image as an ICS file. more...
void ImageWriteJPEG(dip::Image const& image, dip::String const& filename, dip::uint jpegLevel = 80)
Writes image as a JPEG file. more...
void ImageWriteJPEG(dip::Image const& image, dip::OutputBuffer& buffer, dip::uint jpegLevel = 80)
Encodes image as a JPEG file and writes it to a user-created buffer. See dip::ImageWriteJPEG for details.
auto ImageWriteJPEG(dip::Image const& image, dip::uint jpegLevel = 80) -> std::vector<dip::uint8>
Encodes image as a JPEG file and writes it to a buffer that is returned. See dip::ImageWriteJPEG for details.
void ImageWriteNPY(dip::Image const& image, dip::String const& filename)
Writes image as a numeric array to a NumPy NPY file. more...
void ImageWritePNG(dip::Image const& image, dip::String const& filename, dip::sint compressionLevel = 6, dip::StringSet const& filterChoice = {S::ALL}, dip::uint significantBits = 0)
Writes image as a PNG file. more...
void ImageWritePNG(dip::Image const& image, dip::OutputBuffer& buffer, dip::sint compressionLevel = 6, dip::StringSet const& filterChoice = {S::ALL}, dip::uint significantBits = 0)
Encodes image as a PNG file and writes it to a user-created buffer. See dip::ImageWritePNG for details.
auto ImageWritePNG(dip::Image const& image, dip::sint compressionLevel = 6, dip::StringSet const& filterChoice = {S::ALL}, dip::uint significantBits = 0) -> std::vector<dip::uint8>
Encodes image as a PNG file and writes it to a buffer that is returned. See dip::ImageWritePNG for details.
void ImageWriteTIFF(dip::Image const& image, dip::String const& filename, dip::String const& compression = "", dip::uint jpegLevel = 80)
Writes image as a TIFF file. more...
auto Imaginary(dip::Image const& in) -> dip::Image
Returns the imaginary component of a complex image. Returns dip::Image::Imaginary if the input is complex
void ImposeMinima(dip::Image const& in, dip::Image const& marker, dip::Image& out, dip::uint connectivity = 0)
Impose minima. more...
void IncoherentOTF(dip::Image& out, dip::dfloat defocus = 0, dip::dfloat oversampling = 1, dip::dfloat amplitude = 1, dip::String const& method = S::STOKSETH)
Generates an incoherent OTF (optical transfer function) more...
auto IncoherentOTF(dip::UnsignedArray const& sizes, dip::dfloat defocus = 0, dip::dfloat oversampling = 1, dip::dfloat amplitude = 1, dip::String const& method = S::STOKSETH) -> dip::Image
Overload for the function above, which takes image sizes instead of an image.
auto IncoherentOTF(dip::dfloat defocus = 0, dip::dfloat oversampling = 1, dip::dfloat amplitude = 1, dip::String const& method = S::STOKSETH) -> dip::Image
Overloaded version of the function above, defaulting to a 256x256 image.
void IncoherentPSF(dip::Image& out, dip::dfloat oversampling = 1, dip::dfloat amplitude = 1)
Generates an incoherent PSF (point spread function) more...
void InfGenerating(dip::Image const& in, dip::Image& out, dip::Interval const& interval, dip::String const& boundaryCondition = S::ADD_ZEROS)
Inf-generating operator, the dual of the hit-miss operator. more...
void Infimum(dip::ImageConstRefArray const& in, dip::Image& out)
Computes the sample-wise infimum (minimum) over all the input images. For binary images, this is the same as the intersection.
void Infimum(dip::Image const& a, dip::Image const& b, dip::Image& out)
Computes the sample-wise infimum (minimum) of the two input images. For binary images, this is the same as the intersection.
auto InProduct(dip::Image const& in, dip::Image const& reference, dip::Image const& mask = {}) -> dip::dfloat
Calculates the sum of the product of corresponding sample values of in and reference. more...
void InRange(dip::Image const& in, dip::Image const& lhs, dip::Image const& rhs, dip::Image& out)
In-range ternary comparison, sample-wise, with singleton expansion. more...
auto IntensityCorrelationQuotient(dip::Image const& channel1, dip::Image const& channel2, dip::Image const& mask = {}) -> dip::dfloat
Computes Li’s Intensity Correlation Quotient. more...
void IntersectionInfGenerating(dip::Image const& in, dip::Image& out, dip::IntervalArray const& intervals, dip::String const& boundaryCondition = S::ADD_ZEROS)
Intersection of inf-generating operators. more...
void IntersectionInfGenerating2D(dip::Image const& in, dip::Image& out, dip::Interval const& interval, dip::uint rotationAngle = 45, dip::String const& rotationDirection = S::INTERLEAVED_CLOCKWISE, dip::String const& boundaryCondition = S::ADD_ZEROS)
Intersection of inf-generating operators. more...
void Inverse(dip::uint n, dip::ConstSampleIterator input, dip::SampleIterator output)
Computes the inverse of a square, real-valued matrix. more...
void Inverse(dip::uint n, dip::ConstSampleIterator input, dip::SampleIterator output)
Computes the inverse of a square, complex-valued matrix. more...
void Inverse(dip::Image const& in, dip::Image& out)
Computes the inverse of the square matrix at each pixel in image in. more...
void InverseBeerLambertMapping(dip::Image const& in, dip::Image& out, dip::Image::Pixel const& background = {255})
Applies an exponential mapping to an absorbance image to obtain a transmittance image more...
void InverseFourierTransform(dip::Image const& in, dip::Image& out, dip::StringSet options = {}, dip::BooleanArray process = {})
Inverse Fourier Transform. Convenience function that calls dip::FourierTransform after adding “inverse” to options.
void Invert(dip::Image const& in, dip::Image& out)
Inverts each sample of the input image, yielding an image of the same type. more...
void Invert(dip::IntervalArray& array)
Inverts the intervals in the array, swapping foreground and background pixels. Works correctly if intervals in the array share data. However, this function could also affect other intervals not in the array, if data is shared.
void IsFinite(dip::Image const& in, dip::Image& out)
True for each pixel that is not NaN nor infinity.
void IsInfinite(dip::Image const& in, dip::Image& out)
True for each pixel that is positive or negative infinity.
void IsNotANumber(dip::Image const& in, dip::Image& out)
True for each pixel that is NaN.
auto IsodataThreshold(dip::Histogram const& in, dip::uint nThresholds = 1) -> dip::FloatArray
Determines a set of nThresholds thresholds using the Isodata algorithm (k-means clustering), and the image’s histogram in. more...
auto IsodataThreshold(dip::Image const& in, dip::Image const& mask, dip::Image& out, dip::uint nThresholds = 1) -> dip::FloatArray
Thresholds the image in using nThresholds thresholds, determined using the Isodata algorithm (k-means clustering), and the histogram of in. more...
auto IsOnEdge(dip::UnsignedArray const& coords, dip::UnsignedArray const& sizes, dip::uint procDim = std::numeric_limits::max()) -> bool
Determines whether the pixel at coords is on the edge of an image of size sizes. more...
void IsotropicClosing(dip::Image const& in, dip::Image& out, dip::dfloat distance)
Isotropic closing of binary image. more...
void IsotropicDilation(dip::Image const& in, dip::Image& out, dip::dfloat distance)
Isotropic dilation of binary image. more...
void IsotropicErosion(dip::Image const& in, dip::Image& out, dip::dfloat distance)
Isotropic erosion of binary image. more...
void IsotropicOpening(dip::Image const& in, dip::Image& out, dip::dfloat distance)
Isotropic opening of binary image. more...
void IterativeConstrainedTikhonovMiller(dip::Image const& in, dip::Image const& psf, dip::Image& out, dip::dfloat regularization = 0.1, dip::dfloat tolerance = 1e-6, dip::uint maxIterations = 30, dip::dfloat stepSize = 0.0, dip::StringSet const& options = {S::PAD})
Iterative Constrained Tikhonov-Miller (ICTM) deconvolution. more...
auto JaccardIndex(dip::Image const& in, dip::Image const& reference) -> dip::dfloat
Compares a segmentation result in to the ground truth reference, determining the Jaccard index. more...
void JoinChannels(dip::ImageConstRefArray const& in, dip::Image& out)
Concatenates a set of scalar images along the tensor dimension. more...
auto KMeansClustering(dip::Histogram const& in, dip::Histogram& out, dip::Random& random, dip::uint nClusters) -> dip::FloatCoordinateArray
Partitions a (multi-dimensional) histogram into nClusters partitions using k-means clustering. more...
auto KMeansClustering(dip::Histogram const& in, dip::Histogram& out, dip::uint nClusters = 2) -> dip::FloatCoordinateArray
Like above, using a default-initialized dip::Random object.
auto KMeansClustering(dip::Image const& in, dip::Image& out, dip::Random& random, dip::uint nClusters = 2) -> dip::CoordinateArray
Applies k-means clustering to an image, yielding nClusters labeled regions. more...
auto KMeansClustering(dip::Image const& in, dip::Image& out, dip::uint nClusters = 2) -> dip::CoordinateArray
Like above, using a default-initialized dip::Random object.
void Kuwahara(dip::Image const& in, dip::Image& out, dip::Kernel kernel = {}, dip::dfloat threshold = 0.0, dip::StringArray const& boundaryCondition = {})
The Kuwahara-Nagao operator, a non-linear edge-preserving smoothing filter. more...
auto Label(dip::Graph const& graph) -> dip::LabelMap
Connected component analysis of a graph. more...
auto Label(dip::DirectedGraph const& graph) -> dip::LabelMap
Connected component analysis of a graph. more...
auto Label(dip::Image const& binary, dip::Image& out, dip::uint connectivity = 0, dip::uint minSize = 0, dip::uint maxSize = 0, dip::StringArray boundaryCondition = {}, dip::String const& mode = S::ALL) -> dip::uint
Labels the connected components in a binary image more...
void Laplace(dip::Image const& in, dip::Image& out, dip::FloatArray sigmas = {1.0}, dip::String const& method = S::BEST, dip::StringArray const& boundaryCondition = {}, dip::BooleanArray process = {}, dip::dfloat truncation = 3)
Computes the Laplacian of the image, equivalent to dip::Trace( dip::Hessian( in )), but more efficient. more...
void LaplaceMinusDgg(dip::Image const& in, dip::Image& out, dip::FloatArray sigmas = {1.0}, dip::String const& method = S::BEST, dip::StringArray const& boundaryCondition = {}, dip::BooleanArray process = {}, dip::dfloat truncation = 3)
Subtracts the second derivative in the gradient direction from the Laplacian. more...
void LaplacePlusDgg(dip::Image const& in, dip::Image& out, dip::FloatArray sigmas = {1.0}, dip::String const& method = S::BEST, dip::StringArray const& boundaryCondition = {}, dip::BooleanArray process = {}, dip::dfloat truncation = 3)
Adds the second derivative in the gradient direction to the Laplacian. more...
void LargestEigenvalue(dip::Image const& in, dip::Image& out, dip::String const& method = S::PRECISE)
Finds the largest eigenvalue of the square matrix at each pixel in image in. more...
void LargestEigenvector(dip::uint n, dip::ConstSampleIterator input, dip::SampleIterator vector)
Finds the largest eigenvector of a symmetric, real-valued matrix. more...
void LargestEigenvector(dip::Image const& in, dip::Image& out)
Finds the largest eigenvector of the symmetric matrix at each pixel in image in. more...
void Lee(dip::Image const& in, dip::Image& out, dip::StructuringElement const& se = {}, dip::String const& edgeType = S::TEXTURE, dip::String const& sign = S::UNSIGNED, dip::StringArray const& boundaryCondition = {})
A morphological edge detector more...
auto LengthUnicode(dip::String const& string) -> dip::uint
Counts the length of a (UTF-8 encoded) Unicode string.
void Lesser(dip::Image const& lhs, dip::Image const& rhs, dip::Image& out)
Inequality comparison, sample-wise, with singleton expansion. more...
void Leveling(dip::Image const& in, dip::Image const& marker, dip::Image& out, dip::uint connectivity = 0)
The leveling of in imposed by marker. more...
void LimitedMorphologicalReconstruction(dip::Image const& marker, dip::Image const& in, dip::Image& out, dip::dfloat maxDistance = 20, dip::uint connectivity = 0, dip::String const& direction = S::DILATION)
Reconstruction by dilation or erosion, but with a limited reach. more...
void LinearCombination(dip::Image const& a, dip::Image const& b, dip::Image& out, dip::dfloat aWeight = 0.5, dip::dfloat bWeight = 0.5)
Computes the linear combination of the two images, sample-wise. more...
void LinearCombination(dip::Image const& a, dip::Image const& b, dip::Image& out, dip::dcomplex aWeight, dip::dcomplex bWeight)
Computes the linear combination of the two complex images, sample-wise, yielding a complex output, more...
auto ListObjectLabels(dip::Image const& label, dip::Image const& mask = {}, dip::String const& background = S::EXCLUDE, dip::String const& region = "") -> std::vector<LabelType>
Gets a list of object labels in the labeled image. A labeled image must be of an unsigned type. more...
void Ln(dip::Image const& in, dip::Image& out)
Computes the natural logarithm (base e logarithm) of each sample.
void LnGamma(dip::Image const& in, dip::Image& out)
Computes the natural logarithm of the gamma function of each sample.
auto LnNormError(dip::Image const& in, dip::Image const& reference, dip::Image const& mask = {}, dip::dfloat order = 2.0) -> dip::dfloat
Calculates the order norm difference between corresponding sample values of in and reference. more...
void Log10(dip::Image const& in, dip::Image& out)
Computes the base 10 logarithm of each sample.
void Log2(dip::Image const& in, dip::Image& out)
Computes the base 2 logarithm of each sample.
void LogGaborFilterBank(dip::Image const& in, dip::Image& out, dip::FloatArray const& wavelengths = {3.0,6.0,12.0,24.0}, dip::dfloat bandwidth = 0.75, dip::uint nOrientations = 6, dip::String const& inRepresentation = S::SPATIAL, dip::String const& outRepresentation = S::SPATIAL)
Applies a log-Gabor filter bank more...
void LogPolarTransform2D(dip::Image const& in, dip::Image& out, dip::String const& interpolationMethod = S::LINEAR)
Computes the log-polar transform of the 2D image. more...
void MajorityVote(dip::Image const& in, dip::Image& out, dip::uint connectivity = 0, dip::String const& edgeCondition = S::BACKGROUND)
Filters the binary image by setting each pixel to the phase with more pixels in the neighborhood. more...
void MakeRegionsConvex2D(dip::Image const& label, dip::Image& out, dip::String const& mode = S::FILLED)
Make each object a single, convex shape. more...
auto MandersColocalizationCoefficients(dip::Image const& channel1, dip::Image const& channel2, dip::Image const& mask = {}, dip::dfloat threshold1 = 0, dip::dfloat threshold2 = 0) -> dip::ColocalizationCoefficients
Computes Manders’ Colocalization Coefficients. more...
auto MandersOverlapCoefficient(dip::Image const& channel1, dip::Image const& channel2, dip::Image const& mask = {}) -> dip::dfloat
Computes the Manders Overlap Coefficient. more...
auto MarginalMedian(dip::Histogram const& in) -> dip::FloatArray
Computes the marginal median value of the data represented by the histogram. The median is the 50th percentile, see dip::MarginalPercentile for details.
auto MarginalPercentile(dip::Histogram const& in, dip::dfloat percentile = 50) -> dip::FloatArray
Computes the marginal percentile value of the data represented by the histogram. The marginal percentile is a percentile computed independently on each dimension, and thus is not one of the input values. more...
void MarkLabelEdges(dip::Image const& labels, dip::Image& out, dip::uint factor = 2)
Upscales a labeled image and outlines each region with the background label. more...
void MatchedFiltersLineDetector2D(dip::Image const& in, dip::Image& out, dip::dfloat sigma = 2.0, dip::dfloat length = 10.0, dip::String const& polarity = S::WHITE, dip::StringArray const& boundaryCondition = {})
Matched filters for line detection in 2D more...
auto MatchingLookupTable(dip::Histogram const& in, dip::Histogram const& example) -> dip::LookupTable
Computes a lookup table that, when applied to an image with the histogram in, yields an image with a histogram as similar as possible to example. more...
auto MaxFactor(bool complex = true) -> dip::uint
The maxFactor parameter for dip::GetOptimalDFTSize. complex determines whether the transform to be computed is complex-to-complex or not.
void Maxima(dip::Image const& in, dip::Image& out, dip::uint connectivity = 0, dip::String const& output = S::BINARY)
Marks local maxima. more...
auto Maximum(dip::Measurement::IteratorFeature const& featureValues) -> dip::Measurement::ValueType
Returns the largest feature value in the first column of featureValues. more...
void Maximum(dip::Image const& in, dip::Image const& mask, dip::Image& out, dip::BooleanArray const& process = {})
Calculates the maximum of the pixel values over all those dimensions which are specified by process. more...
template<typename T>
auto maximum_gauss_truncation() -> dip::dfloat constexpr
Maximum meaningful truncation value for a Gaussian. Larger truncation values will lead to differences of more than one machine epsilon between the middle and the ends of the Gaussian. T must be a floating-point type.
void MaximumAbs(dip::Image const& in, dip::Image const& mask, dip::Image& out, dip::BooleanArray const& process = {})
Calculates the maximum of the absolute pixel values over all those dimensions which are specified by process. more...
auto MaximumAbsoluteError(dip::Image const& in, dip::Image const& reference, dip::Image const& mask = {}) -> dip::dfloat
Calculates the maximum absolute error difference between corresponding sample values of in and reference. more...
void MaximumAbsTensorElement(dip::Image const& in, dip::Image& out)
Takes the maximum absolute tensor element at each pixel, producing a scalar image. For float and complex images only.
auto MaximumAndMinimum(dip::Measurement::IteratorFeature const& featureValues) -> dip::MinMaxAccumulator
Returns the maximum and minimum feature values in the first column of featureValues. more...
auto MaximumAndMinimum(dip::Image const& in, dip::Image const& mask = {}) -> dip::MinMaxAccumulator
Finds the largest and smallest value in the image, within an optional mask. more...
auto MaximumPixel(dip::Image const& in, dip::Image const& mask = {}, dip::String const& positionFlag = S::FIRST) -> dip::UnsignedArray
Returns the coordinates of the maximum pixel in the image. more...
auto MaximumRelativeError(dip::Image const& in, dip::Image const& reference, dip::Image const& mask = {}) -> dip::dfloat
Calculates the maximum relative error difference between corresponding sample values of in and reference. more...
void MaximumTensorElement(dip::Image const& in, dip::Image& out)
Takes the maximum tensor element at each pixel, producing a scalar image.
auto Mean(dip::Histogram const& in) -> dip::FloatArray
Computes the mean value of the data represented by the histogram. more...
auto Mean(dip::Measurement::IteratorFeature const& featureValues) -> dip::dfloat
Returns the mean feature value in the first column of featureValues. more...
void Mean(dip::Image const& in, dip::Image const& mask, dip::Image& out, dip::String const& mode = "", dip::BooleanArray const& process = {})
Calculates the (arithmetic) mean of the pixel values over all those dimensions which are specified by process. more...
void MeanAbs(dip::Image const& in, dip::Image const& mask, dip::Image& out, dip::BooleanArray const& process = {})
Calculates the mean of the absolute pixel values over all those dimensions which are specified by process. more...
auto MeanAbsoluteError(dip::Image const& in, dip::Image const& reference, dip::Image const& mask = {}) -> dip::dfloat
Calculates the mean absolute error difference between corresponding sample values of in and reference. more...
auto MeanError(dip::Image const& in, dip::Image const& reference, dip::Image const& mask = {}) -> dip::dfloat
Calculates the mean error difference between corresponding sample values of in and reference. more...
void MeanModulus(dip::Image const& in, dip::Image const& mask, dip::Image& out, dip::BooleanArray const& process = {})
Calculates the mean of the modulus of the pixel values. Alias to dip::MeanAbs.
auto MeanRelativeError(dip::Image const& in, dip::Image const& reference, dip::Image const& mask = {}) -> dip::dfloat
Calculates the mean relative error difference between corresponding sample values of in and reference. more...
auto MeanShift(dip::Image const& meanShiftVectorResult, dip::FloatArray const& start, dip::dfloat epsilon = 1e-3) -> dip::FloatArray
Finds the coordinates of a local maximum close to start more...
auto MeanShift(dip::Image const& meanShiftVectorResult, dip::FloatCoordinateArray const& startArray, dip::dfloat epsilon = 1e-3) -> dip::FloatCoordinateArray
Finds the coordinates of local a maximum close to each point in startArray. more...
void MeanShiftVector(dip::Image const& in, dip::Image& out, dip::FloatArray sigmas = {1.0}, dip::String const& method = S::BEST, dip::StringArray const& boundaryCondition = {}, dip::dfloat truncation = 3)
Computes the mean shift vector for each pixel in the image more...
void MeanSquare(dip::Image const& in, dip::Image const& mask, dip::Image& out, dip::BooleanArray const& process = {})
Calculates the mean of the square pixel values over all those dimensions which are specified by process. more...
auto MeanSquareError(dip::Image const& in, dip::Image const& reference, dip::Image const& mask = {}) -> dip::dfloat
Calculates the mean square error difference between corresponding sample values of in and reference. more...
void MeanSquareModulus(dip::Image const& in, dip::Image const& mask, dip::Image& out, dip::BooleanArray const& process = {})
Calculates the mean of the square modulus of the pixel values over all those dimensions which are specified by process. more...
void MeanTensorElement(dip::Image const& in, dip::Image& out)
Computes the mean tensor element value at each pixel, producing a scalar image.
void MeasurementWriteCSV(dip::Measurement const& measurement, dip::String const& filename, dip::StringSet const& options = {})
Writes a dip::Measurement structure to a CSV file. more...
auto Median(dip::Measurement::IteratorFeature const& featureValues) -> dip::dfloat
Returns the median feature value in the first column of featureValues. more...
void Median(dip::Image const& in, dip::Image const& mask, dip::Image& out, dip::BooleanArray const& process = {})
Calculates the median of the pixel values over all those dimensions which are specified by process. more...
void MedianAbsoluteDeviation(dip::Image const& in, dip::Image const& mask, dip::Image& out, dip::BooleanArray const& process = {})
Computes the median absolute deviation (MAD) more...
void MedianFilter(dip::Image const& in, dip::Image& out, dip::Kernel const& kernel = {}, dip::StringArray const& boundaryCondition = {})
The median filter, a non-linear smoothing filter. more...
void Minima(dip::Image const& in, dip::Image& out, dip::uint connectivity = 0, dip::String const& output = S::BINARY)
Marks local minima. more...
auto Minimum(dip::Measurement::IteratorFeature const& featureValues) -> dip::Measurement::ValueType
Returns the smallest feature value in the first column of featureValues. more...
void Minimum(dip::Image const& in, dip::Image const& mask, dip::Image& out, dip::BooleanArray const& process = {})
Calculates the minimum of the pixel values over all those dimensions which are specified by process. more...
void MinimumAbs(dip::Image const& in, dip::Image const& mask, dip::Image& out, dip::BooleanArray const& process = {})
Calculates the minimum of the absolute pixel values over all those dimensions which are specified by process. more...
void MinimumAbsTensorElement(dip::Image const& in, dip::Image& out)
Takes the minimum absolute tensor element at each pixel, producing a scalar image. For float and complex images only.
auto MinimumErrorThreshold(dip::Histogram const& in) -> dip::dfloat
Determines a threshold using the minimal error method method, and the image’s histogram in. more...
auto MinimumErrorThreshold(dip::Image const& in, dip::Image const& mask, dip::Image& out) -> dip::dfloat
Thresholds the image in using the minimal error method by Kittler and Illingworth, and the histogram of in. more...
auto MinimumPixel(dip::Image const& in, dip::Image const& mask = {}, dip::String const& positionFlag = S::FIRST) -> dip::UnsignedArray
Returns the coordinates of the minimum pixel in the image. more...
auto MinimumSpanningForest(dip::Graph const& graph, std::vector<Graph::VertexIndex> const& roots = {}) -> dip::Graph
Computes the minimum spanning forest (MSF) of a graph using Prim’s algorithm. more...
void MinimumTensorElement(dip::Image const& in, dip::Image& out)
Takes the minimum tensor element at each pixel, producing a scalar image.
auto MinimumVariancePartitioning(dip::Histogram const& in, dip::Histogram& out, dip::uint nClusters) -> dip::FloatCoordinateArray
Partitions a (multi-dimensional) histogram into nClusters partitions iteratively using Otsu thresholding along individual dimensions. more...
auto MinimumVariancePartitioning(dip::Image const& in, dip::Image& out, dip::uint nClusters = 2) -> dip::CoordinateArray
Spatially partitions an image into nClusters partitions iteratively, minimizing the variance of the partitions. more...
void MixStains(dip::Image const& in, dip::Image& out, std::vector<Image::Pixel> const& stains)
Composes a color image given stain densities and stain absorbance values (brightfield) or stain emission values (fluorescence) more...
auto Mode(dip::Histogram const& in) -> dip::FloatArray
Returns the mode, the bin with the largest count. more...
auto ModifiedHausdorffDistance(dip::Image const& in, dip::Image const& reference) -> dip::dfloat
Computes the modified Hausdorff distance between two binary images. more...
auto modulo(dip::uint value, dip::uint period) -> dip::uint constexpr
Integer modulo, result is always positive, as opposed to % operator.
auto modulo(dip::sint value, dip::sint period) -> dip::sint constexpr
Integer modulo, result is always positive, as opposed to % operator.
void Modulo(dip::Image const& lhs, dip::Image const& rhs, dip::Image& out, dip::DataType dt)
Computes the modulo of two images, sample-wise, with singleton expansion. more...
void Modulus(dip::Image const& in, dip::Image& out)
Computes the modulus (absolute value) of each sample. dip::Modulus is an alias for dip::Abs.
auto Moments(dip::Image const& in, dip::Image const& mask = {}) -> dip::MomentAccumulator
Computes the first order normalized moments and second order normalized central moments of the image in, optionally using only those pixels selected by mask. more...
void MonogenicSignal(dip::Image const& in, dip::Image& out, dip::FloatArray const& wavelengths = {3.0,24.0}, dip::dfloat bandwidth = 0.41, dip::String const& inRepresentation = S::SPATIAL, dip::String const& outRepresentation = S::SPATIAL)
Computes the monogenic signal, a multi-dimensional generalization of the analytic signal. more...
void MonogenicSignalAnalysis(dip::Image const& in, dip::ImageRefArray& out, dip::StringArray const& outputs, dip::dfloat noiseThreshold = 0.2, dip::dfloat frequencySpreadThreshold = 0.5, dip::dfloat sigmoidParameter = 10, dip::dfloat deviationGain = 1.5, dip::String const& polarity = S::BOTH)
Computes useful image parameters from the monogenic signal. more...
void MorphologicalGist(dip::Image const& in, dip::Image& out, dip::StructuringElement const& se = {}, dip::String const& edgeType = S::TEXTURE, dip::StringArray const& boundaryCondition = {})
Morphological gist operator and its variants more...
void MorphologicalGradientMagnitude(dip::Image const& in, dip::Image& out, dip::StructuringElement const& se = {}, dip::StringArray const& boundaryCondition = {})
The morphological version of the gradient magnitude more...
void MorphologicalLaplace(dip::Image const& in, dip::Image& out, dip::StructuringElement const& se = {}, dip::StringArray const& boundaryCondition = {})
The morphological version of the Laplace operator more...
void MorphologicalRange(dip::Image const& in, dip::Image& out, dip::StructuringElement const& se = {}, dip::String const& edgeType = S::TEXTURE, dip::StringArray const& boundaryCondition = {})
A morphological edge detector more...
void MorphologicalReconstruction(dip::Image const& marker, dip::Image const& in, dip::Image& out, dip::uint connectivity = 0, dip::String const& direction = S::DILATION)
Reconstruction by dilation or erosion, also known as inf-reconstruction and sup-reconstruction more...
void MorphologicalSharpening(dip::Image const& in, dip::Image& out, dip::StructuringElement const& se = {}, dip::StringArray const& boundaryCondition = {})
A morphological sharpening filter more...
void MorphologicalSmoothing(dip::Image const& in, dip::Image& out, dip::StructuringElement const& se = {}, dip::String const& polarity = S::AVERAGE, dip::StringArray const& boundaryCondition = {})
A morphological smoothing filter more...
void MorphologicalThreshold(dip::Image const& in, dip::Image& out, dip::StructuringElement const& se = {}, dip::String const& edgeType = S::TEXTURE, dip::StringArray const& boundaryCondition = {})
A morphological smoothing filter more...
void MoveToLocalMinimum(dip::Image const& bin, dip::Image const& weights, dip::Image& out)
Given a sparse binary image bin, moves each set pixel to the pixel in the 3x3 neighborhood with lowest weight. more...
void MultipleThresholds(dip::Image const& in, dip::Image& out, dip::FloatArray const& thresholds)
Thresholds an image at multiple values, yielding a labeled image. more...
void Multiply(dip::Image const& lhs, dip::Image const& rhs, dip::Image& out, dip::DataType dt)
Multiplies two images, pixel-wise, with singleton expansion, and using saturated arithmetic. more...
void MultiplyConjugate(dip::Image const& lhs, dip::Image const& rhs, dip::Image& out, dip::DataType dt)
Multiplies two images with complex conjugation, sample-wise, with singleton expansion. more...
void MultiplySampleWise(dip::Image const& lhs, dip::Image const& rhs, dip::Image& out, dip::DataType dt)
Multiplies two images, sample-wise, with singleton expansion, and using saturated arithmetic. more...
void MultiScaleMorphologicalGradient(dip::Image const& in, dip::Image& out, dip::uint upperSize = 9, dip::uint lowerSize = 3, dip::String const& filterShape = S::ELLIPTIC, dip::StringArray const& boundaryCondition = {})
A morphological edge detector more...
auto MutualInformation(dip::Histogram const& in) -> dip::dfloat
Calculates the mutual information, in bits, between two images from their joint histogram in. more...
auto MutualInformation(dip::Image const& in, dip::Image const& reference, dip::Image const& mask = {}, dip::uint nBins = 256) -> dip::dfloat
Calculates the mutual information, in bits, using a histogram with nBins-by-nBins bins. more...
void NearestInt(dip::Image const& in, dip::Image& out)
Computes the integer closest to the value of each sample. Only defined for floating-point types, the output is of type dip::DT_SINT32.
void NobleCornerDetector(dip::Image const& in, dip::Image& out, dip::FloatArray const& sigmas = {2.0}, dip::StringArray const& boundaryCondition = {})
Noble’s corner detector (also known as the Plessey detector) more...
void NonMaximumSuppression(dip::Image const& gradmag, dip::Image const& gradient, dip::Image const& mask, dip::Image& out, dip::String const& mode = S::INTERPOLATE)
Non-maximum suppression, as used in the Canny edge detector. more...
auto NonOwnedRefToDataSegment(void* ptr) -> dip::DataSegment
This function converts a pointer to a dip::DataSegment that does not own the data pointed to.
auto NonOwnedRefToDataSegment(void const* ptr) -> dip::DataSegment
This function converts a pointer to a dip::DataSegment that does not own the data pointed to.
template<typename T>
auto Norm(dip::uint n, dip::ConstSampleIterator input) -> dip::FloatType
Computes the norm of a vector. more...
void Norm(dip::Image const& in, dip::Image& out)
Computes the norm of the vector at each pixel in image in.
template<typename T>
auto Norm(dip::Vertex const& v) -> dip::dfloat
The norm of the vector v.
void NormalizedConvolution(dip::Image const& in, dip::Image const& mask, dip::Image& out, dip::FloatArray const& sigmas = {1.0}, dip::String const& method = S::BEST, dip::StringArray const& boundaryCondition = {S::ADD_ZEROS}, dip::dfloat truncation = 3)
Computes the normalized convolution with a Gaussian kernel: a Gaussian convolution for missing or uncertain data. more...
void NormalizedDifferentialConvolution(dip::Image const& in, dip::Image const& mask, dip::Image& out, dip::uint dimension = 0, dip::FloatArray const& sigmas = {1.0}, dip::String const& method = S::BEST, dip::StringArray const& boundaryCondition = {S::ADD_ZEROS}, dip::dfloat truncation = 3)
Computes the normalized differential convolution with a Gaussian kernel: a derivative operator for missing or uncertain data. more...
template<typename T>
auto NormSquare(dip::Vertex const& v) -> dip::dfloat
The square of the norm of the vector v.
void Not(dip::Image const& in, dip::Image& out)
Bit-wise NOT of an integer image, or logical NOT of a binary image, sample-wise. more...
void NotEqual(dip::Image const& lhs, dip::Image const& rhs, dip::Image& out)
Inequality comparison, sample-wise, with singleton expansion. more...
void NotGreater(dip::Image const& lhs, dip::Image const& rhs, dip::Image& out)
Inequality comparison, sample-wise, with singleton expansion. more...
void NotLesser(dip::Image const& lhs, dip::Image const& rhs, dip::Image& out)
Inequality comparison, sample-wise, with singleton expansion. more...
auto ObjectMaximum(dip::Measurement::IteratorFeature const& featureValues) -> dip::uint
Returns the object ID with the largest feature value in the first column of featureValues. more...
auto ObjectMinimum(dip::Measurement::IteratorFeature const& featureValues) -> dip::uint
Returns the object ID with the smallest feature value in the first column of featureValues. more...
void ObjectToMeasurement(dip::Image const& label, dip::Image& out, dip::Measurement::IteratorFeature const& featureValues)
Paints each object with the selected measurement feature values. more...
void Opening(dip::Image const& in, dip::Image& out, dip::StructuringElement const& se = {}, dip::StringArray const& boundaryCondition = {})
Applies the opening with a standard or custom structuring element. more...
void OpeningByReconstruction(dip::Image const& in, dip::Image& out, dip::StructuringElement const& se = {}, dip::uint connectivity = 0, dip::StringArray const& boundaryCondition = {})
Opening by reconstruction more...
auto OptimalFourierTransformSize(dip::uint size, dip::String const& which = S::LARGER, dip::String const& purpose = S::REAL) -> dip::uint
Returns the next larger (or smaller) multiple of small integers. An image of this size is more efficient for FFT computations. more...
void Or(dip::Image const& lhs, dip::Image const& rhs, dip::Image& out)
Bit-wise OR of two integer images, or logical OR of two binary images, sample-wise, with singleton expansion. more...
void Orientation(dip::Image const& in, dip::Image& out)
Computes the orientation of the vector at each pixel in image in. more...
void OrientationSpace(dip::Image const& in, dip::Image& out, dip::uint order = 8, dip::dfloat radCenter = 0.1, dip::dfloat radSigma = 0.8, dip::uint orientations = 0)
Creates an orientation space for a 2D image more...
auto OtsuThreshold(dip::Histogram const& in) -> dip::dfloat
Determines a threshold using the maximal inter-class variance method by Otsu, and the image’s histogram in. more...
auto OtsuThreshold(dip::Image const& in, dip::Image const& mask, dip::Image& out) -> dip::dfloat
Thresholds the image in using the maximal inter-class variance method by Otsu, and the histogram of in. more...
void OutOfRange(dip::Image const& in, dip::Image const& lhs, dip::Image const& rhs, dip::Image& out)
Out-of-range ternary comparison, sample-wise, with singleton expansion. more...
void Overlay(dip::Image const& in, dip::Image const& overlay, dip::Image& out, dip::Image::Pixel const& color = {255,0,0})
Adds a colored overlay to the image in, yielding an RGB image. more...
auto PairCorrelation(dip::Image const& object, dip::Image const& mask, dip::Random& random, dip::uint probes = 1000000, dip::uint length = 100, dip::String const& sampling = S::RANDOM, dip::StringSet const& options = {}) -> dip::Distribution
Estimates the pair correlation function of the different phases in object. more...
auto PairCorrelation(dip::Image const& object, dip::Image const& mask, dip::uint probes = 1000000, dip::uint length = 100, dip::String const& sampling = S::RANDOM, dip::StringSet const& options = {}) -> dip::Distribution
like above, using a default-initialized dip::Random object.
template<typename T>
auto ParallelogramSignedArea(dip::Vertex const& v1, dip::Vertex const& v2, dip::Vertex const& v3) -> dip::dfloat
Compute the z component of the cross product of vectors v2-v1 and v3-v1.
void PathOpening(dip::Image const& in, dip::Image const& mask, dip::Image& out, dip::uint length = 7, dip::String const& polarity = S::OPENING, dip::StringSet const& mode = {})
Applies a path opening or closing in all possible directions more...
auto PearsonCorrelation(dip::Histogram const& in) -> dip::dfloat
Computes the Pearson correlation coefficient between two images from their joint histogram in. more...
auto PearsonCorrelation(dip::Image const& in1, dip::Image const& in2, dip::Image const& mask = {}) -> dip::dfloat
Computes the Pearson correlation coefficient. See dip::Covariance.
auto Percentile(dip::Measurement::IteratorFeature const& featureValues, dip::dfloat percentile) -> dip::Measurement::ValueType
Returns the percentile feature value in the first column of featureValues. more...
void Percentile(dip::Image const& in, dip::Image const& mask, dip::Image& out, dip::dfloat percentile = 50, dip::BooleanArray const& process = {})
Calculates the percentile of the pixel values over all those dimensions which are specified by process. more...
void PercentileFilter(dip::Image const& in, dip::Image& out, dip::dfloat percentile, dip::Kernel const& kernel = {}, dip::StringArray const& boundaryCondition = {})
Applies a percentile filter to in. more...
void PerObjectEllipsoidFit(dip::Image const& in, dip::Image& out, dip::PerObjectEllipsoidFitParameters const& parameters)
Finds a per-object threshold such that found objects are maximally ellipsoidal. more...
auto PerObjectHistogram(dip::Image const& grey, dip::Image const& label, dip::Image const& mask = {}, dip::Histogram::Configuration configuration = {}, dip::String const& mode = S::FRACTION, dip::String const& background = S::EXCLUDE) -> dip::Distribution
Computes a histogram of grey values in grey for each object in label. more...
void PeronaMalikDiffusion(dip::Image const& in, dip::Image& out, dip::uint iterations = 5, dip::dfloat K = 10, dip::dfloat lambda = 0.25, dip::String const& g = "Gauss")
Applies Perona-Malik anisotropic diffusion more...
void Phase(dip::Image const& in, dip::Image& out)
Computes the phase (angle on complex plane, through std::arg) of each sample.
auto Phi(dip::dfloat x) -> dip::dfloat
Computes phi, the integral of the PDF of a Normal distribution with unit variance and zero mean from minus infinity to x.
auto Phi(dip::dfloat x, dip::dfloat m, dip::dfloat s) -> dip::dfloat
Computes phi, the integral of the PDF of a Normal distribution with standard deviation s and mean m from minus infinity to x.
template<typename TPI, <SFINAE> = 0>
auto PixelIsInfinity(TPI ) -> bool
A templated function to check for positive infinity, which works also for integer types (always returning false)
template<typename TPI, <SFINAE> = 0>
auto PixelIsMinusInfinity(TPI ) -> bool
A templated function to check for negative infinity, which works also for integer types (always returning false)
auto PointDistanceDistribution(dip::Image const& in, dip::CoordinateArray const& points, dip::UnsignedArray range = {}) -> dip::Distribution
Compute distance distribution for a set of points. more...
void PoissonNoise(dip::Image const& in, dip::Image& out, dip::Random& random, dip::dfloat conversion = 1.0)
Adds Poisson-distributed white noise to the input image. more...
void PolarToCartesian(dip::Image const& in, dip::Image& out)
Converts the vector at each pixel in image in from polar (or spherical) coordinates to Cartesian coordinates. more...
void PositionMaximum(dip::Image const& in, dip::Image const& mask, dip::Image& out, dip::uint dim = 0, dip::String const& mode = S::FIRST)
Calculates the position of the maximum of the pixel values in a single dimension specified by dim. more...
void PositionMedian(dip::Image const& in, dip::Image const& mask, dip::Image& out, dip::uint dim = 0, dip::String const& mode = S::FIRST)
Calculates the position of the median of the pixel values in a single dimension specified by dim. more...
void PositionMinimum(dip::Image const& in, dip::Image const& mask, dip::Image& out, dip::uint dim = 0, dip::String const& mode = S::FIRST)
Calculates the position of the minimum of the pixel values in a single dimension specified by dim. more...
void PositionPercentile(dip::Image const& in, dip::Image const& mask, dip::Image& out, dip::dfloat percentile = 50, dip::uint dim = 0, dip::String const& mode = S::FIRST)
Calculates the position of the percentile of the pixel values in a single dimension specified by dim. more...
auto pow10(dip::sint power) -> dip::dfloat constexpr
Computes integer powers of 10, assuming the power is relatively small.
void Power(dip::Image const& lhs, dip::Image const& rhs, dip::Image& out, dip::DataType dt)
Elevates lhs to the power of rhs, sample-wise, with singleton expansion. more...
auto Precision(dip::Image const& in, dip::Image const& reference) -> dip::dfloat
Compares a segmentation result in to the ground truth reference, determining the precision of the segmentation. more...
auto PrepareResampleAtUnchecked(dip::Image const& in, dip::String const& interpolationMethod) -> dip::InterpolationFunctionPointer
Prepare for repeated calls to dip::ResampleAtUnchecked. See dip::ResampleAt.
auto ProbabilisticPairCorrelation(dip::Image const& phases, dip::Image const& mask, dip::Random& random, dip::uint probes = 1000000, dip::uint length = 100, dip::String const& sampling = S::RANDOM, dip::StringSet const& options = {}) -> dip::Distribution
Estimates the probabilistic pair correlation function of the different phases in phases. more...
auto ProbabilisticPairCorrelation(dip::Image const& object, dip::Image const& mask, dip::uint probes = 1000000, dip::uint length = 100, dip::String const& sampling = S::RANDOM, dip::StringSet const& options = {}) -> dip::Distribution
like above, using a default-initialized dip::Random object.
template<typename T>
auto Product(dip::uint n, dip::ConstSampleIterator input) -> T
Computes the product of the values of a vector. more...
void Product(dip::Image const& in, dip::Image const& mask, dip::Image& out, dip::BooleanArray const& process = {})
Calculates the product of the pixel values over all those dimensions which are specified by process. more...
void ProductTensorElements(dip::Image const& in, dip::Image& out)
Multiplies all tensor elements, producing a scalar image.
void PseudoInverse(dip::uint m, dip::uint n, dip::ConstSampleIterator input, dip::SampleIterator output, dip::dfloat tolerance = 1e-7)
Computes the Moore-Penrose pseudo-inverse of a real-valued matrix, using the Jacobi SVD decomposition. more...
void PseudoInverse(dip::uint m, dip::uint n, dip::ConstSampleIterator input, dip::SampleIterator output, dip::dfloat tolerance = 1e-7)
Computes the Moore-Penrose pseudo-inverse of a complex-valued matrix, using the Jacobi SVD decomposition. more...
void PseudoInverse(dip::Image const& in, dip::Image& out, dip::dfloat tolerance = 1e-7)
Computes the pseudo-inverse of the matrix at each pixel in image in. more...
auto PSNR(dip::Image const& in, dip::Image const& reference, dip::Image const& mask = {}, dip::dfloat peakSignal = 0.0) -> dip::dfloat
Calculates the peak signal-to-noise ratio, in dB. more...
void QuantizedBilateralFilter(dip::Image const& in, dip::Image const& estimate, dip::Image& out, dip::FloatArray spatialSigmas = {2.0}, dip::dfloat tonalSigma = 30.0, dip::FloatArray tonalBins = {}, dip::dfloat truncation = 2.0, dip::StringArray const& boundaryCondition = {})
Quantized (piecewise linear) bilateral filter more...
auto Quartiles(dip::Measurement::IteratorFeature const& featu) -> dip::QuartilesResult
Computes the minimum, lower quartile (25th percentile), median (50th percentile), upper quartile (75th percentile), and maximum. more...
auto Quartiles(dip::Image const& in, dip::Image const& mask = {}) -> dip::QuartilesResult
Computes the minimum, lower quartile (25th percentile), median (50th percentile), upper quartile (75th percentile), and maximum. more...
void RadialMaximum(dip::Image const& in, dip::Image const& mask, dip::Image& out, dip::dfloat binSize = 1, dip::String const& maxRadius = S::OUTERRADIUS, dip::FloatArray const& center = {})
Computes the radial projection of the maximum of the pixel values of in. more...
void RadialMean(dip::Image const& in, dip::Image const& mask, dip::Image& out, dip::dfloat binSize = 1, dip::String const& maxRadius = S::OUTERRADIUS, dip::FloatArray const& center = {})
Computes the radial projection of the mean of the pixel values of in. more...
void RadialMinimum(dip::Image const& in, dip::Image const& mask, dip::Image& out, dip::dfloat binSize = 1, dip::String const& maxRadius = S::OUTERRADIUS, dip::FloatArray const& center = {})
Computes the radial projection of the minimum of the pixel values of in. more...
void RadialSum(dip::Image const& in, dip::Image const& mask, dip::Image& out, dip::dfloat binSize = 1, dip::String const& maxRadius = S::OUTERRADIUS, dip::FloatArray const& center = {})
Computes the radial projection of the sum of the pixel values of in. more...
auto RadonTransformCircles(dip::Image const& in, dip::Image& out, dip::Range radii = {10,30}, dip::dfloat sigma = 1.0, dip::dfloat threshold = 1.0, dip::String const& mode = S::FULL, dip::StringSet const& options = {S::NORMALIZE,S::CORRECT}) -> dip::RadonCircleParametersArray
Detects hyperspheres (circles, spheres) using the generalized Radon transform. more...
void RangeThreshold(dip::Image const& in, dip::Image& out, dip::dfloat lowerBound, dip::dfloat upperBound, dip::String const& output = S::BINARY, dip::dfloat foreground = 1.0, dip::dfloat background = 0.0)
Thresholds an image at two values, equivalent to lowerBound <= in && in <= upperBound. more...
auto Rank(dip::uint m, dip::uint n, dip::ConstSampleIterator input) -> dip::uint
Computes the rank of a real-valued matrix. more...
auto Rank(dip::uint m, dip::uint n, dip::ConstSampleIterator input) -> dip::uint
Computes the rank of a complex-valued matrix. more...
void Rank(dip::Image const& in, dip::Image& out)
Computes the rank of the square matrix at each pixel in image in. The output is DT_UINT8, under the assumption that we won’t have tensor images with a rank higher than 255.
void RankFilter(dip::Image const& in, dip::Image& out, dip::StructuringElement const& se = {}, dip::uint rank = 2, dip::String const& order = S::INCREASING, dip::StringArray const& boundaryCondition = {})
Applies the rank-order filter. more...
auto RankFromPercentile(dip::dfloat percentile, dip::uint n) -> dip::uint constexpr
Computes the rank (index into array) for a given percentile and an array of length n. more...
void RankMaxOpening(dip::Image const& in, dip::Image& out, dip::StructuringElement se = {}, dip::uint rank = 2, dip::StringArray const& boundaryCondition = {})
Applies the rank-max opening, an opening that is somewhat robust to noise. more...
void RankMinClosing(dip::Image const& in, dip::Image& out, dip::StructuringElement se = {}, dip::uint rank = 2, dip::StringArray const& boundaryCondition = {})
Applies the rank-min closing, a closing that is somewhat robust to noise. more...
auto ReadPixelWithBoundaryCondition(dip::Image const& img, dip::IntegerArray coords, dip::BoundaryConditionArray const& bc) -> dip::Image::Pixel
Returns a pixel with a copy of the sample values at coords. more...
auto Real(dip::Image const& in) -> dip::Image
Returns the real component of a complex image. Returns dip::Image::Real if the input is complex.
void Reciprocal(dip::Image const& in, dip::Image& out)
Computes the reciprocal of each sample: out = in == 0 ? 0 : 1/in.
auto RegionAdjacencyGraph(dip::Image const& labels, dip::String const& mode = "touching") -> dip::Graph
Construct a graph for the given labeled image. more...
auto RegionAdjacencyGraph(dip::Image const& labels, dip::Measurement::IteratorFeature const& featureValues, dip::String const& mode = "touching") -> dip::Graph
Construct a graph for the given labeled image. more...
auto Regression(dip::Histogram const& in) -> dip::RegressionParameters
Fits a line through the histogram. Returns the slope and intercept of the regression line. more...
void Relabel(dip::Image const& label, dip::Image& out)
Re-assigns labels to objects in a labeled image, such that all labels are consecutive. more...
void Relabel(dip::Image const& label, dip::Image& out, dip::Graph const& graph)
Re-assigns labels to objects in a labeled image, such that regions joined by an edge in graph obtain the same label. more...
void Relabel(dip::Image const& label, dip::Image& out, dip::DirectedGraph const& graph)
Re-assigns labels to objects in a labeled image, such that regions joined by an edge in graph obtain the same label. more...
void ResampleAt(dip::Image const& in, dip::Image& out, dip::FloatCoordinateArray const& coordinates, dip::String const& interpolationMethod = S::LINEAR, dip::Image::Pixel const& fill = {0})
Finds the values of the image at sub-pixel locations coordinates by interpolation. more...
auto ResampleAt(dip::Image const& in, dip::FloatArray const& coordinates, dip::String const& interpolationMethod = S::LINEAR, dip::Image::Pixel const& fill = {0}) -> dip::Image::Pixel
Identical to the previous function with the same name, but for a single point.
void ResampleAt(dip::Image const& in, dip::Image const& map, dip::Image& out, dip::String const& interpolationMethod = S::LINEAR, dip::Image::Pixel const& fill = {0})
Resamples an image with sub-pixel locations specified by a coordinate map. more...
auto ResampleAtUnchecked(dip::Image const& in, dip::FloatArray const& coordinates, dip::InterpolationFunctionPointer function) -> dip::Image::Pixel
Similar to dip::ResampleAt, but optimized for repeated calls using the same parameters. function comes from PrepareResampleAtUnchecked. fill is always 0.
void Resampling(dip::Image const& in, dip::Image& out, dip::FloatArray zoom, dip::FloatArray shift = {0.0}, dip::String const& interpolationMethod = "", dip::StringArray const& boundaryCondition = {})
Resamples an image with the given zoom factor and sub-pixel shift. more...
void RichardsonLucy(dip::Image const& in, dip::Image const& psf, dip::Image& out, dip::dfloat regularization = 0.0, dip::uint nIterations = 30, dip::StringSet const& options = {S::PAD})
Richardson-Lucy (RL) deconvolution, also sometimes called the expectation maximization (EM) method. more...
void RieszTransform(dip::Image const& in, dip::Image& out, dip::String const& inRepresentation = S::SPATIAL, dip::String const& outRepresentation = S::SPATIAL, dip::BooleanArray process = {})
Computes the Riesz transform of a scalar image. more...
void RobustAnisotropicDiffusion(dip::Image const& in, dip::Image& out, dip::uint iterations = 5, dip::dfloat sigma = 10, dip::dfloat lambda = 0.25)
Applies iterative robust anisotropic diffusion more...
auto RootMeanSquareError(dip::Image const& in, dip::Image const& reference, dip::Image const& mask = {}) -> dip::dfloat
Calculates the root mean square (RMS) error difference between corresponding sample values of in and reference. more...
void RORPOLineDetector(dip::Image const& in, dip::Image& out, dip::uint length = 15, dip::String const& polarity = S::WHITE)
Line detector based on robust path openings more...
void Rotation(dip::Image const& in, dip::Image& out, dip::dfloat angle, dip::uint dimension1, dip::uint dimension2, dip::String const& interpolationMethod = "", dip::String const& boundaryCondition = S::ADD_ZEROS)
Rotates an image in one orthogonal plane, over the center of the image. more...
void Rotation2D(dip::Image const& in, dip::Image& out, dip::dfloat angle, dip::String const& interpolationMethod = "", dip::String const& boundaryCondition = S::ADD_ZEROS)
Rotates a 2D image more...
void Rotation3D(dip::Image const& in, dip::Image& out, dip::dfloat angle, dip::uint axis = 2, dip::String const& interpolationMethod = "", dip::String const& boundaryCondition = S::ADD_ZEROS)
Rotates a 3D image in one orthogonal plane more...
void Rotation3D(dip::Image const& in, dip::Image& out, dip::dfloat alpha, dip::dfloat beta, dip::dfloat gamma, dip::String const& interpolationMethod = "", dip::String const& boundaryCondition = S::ADD_ZEROS)
Applies an arbitrary 3D rotation to a 3D image more...
void RotationMatrix2D(dip::Image& out, dip::dfloat angle)
Creates a 0D (one pixel) 2x2 matrix image containing a 2D rotation matrix. more...
void RotationMatrix3D(dip::Image& out, dip::dfloat alpha, dip::dfloat beta, dip::dfloat gamma)
Creates a 0D (one pixel) 3x3 matrix image containing a 3D rotation matrix. more...
void RotationMatrix3D(dip::Image& out, dip::FloatArray const& vector, dip::dfloat angle)
Creates a 0D (one pixel) 3x3 matrix image containing a 3D rotation matrix. more...
void Round(dip::Image const& in, dip::Image& out)
Computes the nearest integer to each sample (rounds). Only defined for floating-point types, the output is the same type.
template<typename T, typename <SFINAE>>
auto round_cast(T v) -> dip::sint
Fast round operation, without checks, returning a dip::sint.
void SafeDivide(dip::Image const& lhs, dip::Image const& rhs, dip::Image& out, dip::DataType dt)
Divides two images, sample-wise, with singleton expansion. Tests for division by zero, filling in 0 instead. more...
void SaltPepperNoise(dip::Image const& in, dip::Image& out, dip::Random& random, dip::dfloat p0 = 0.05, dip::dfloat p1 = 0.05, dip::dfloat white = 1.0)
Adds salt-and-pepper noise to the input image. more...
auto SampleStatistics(dip::Measurement::IteratorFeature const& featureValues) -> dip::StatisticsAccumulator
Returns the first four central moments of the feature values in the first column of featureValues. more...
auto SampleStatistics(dip::Image const& in, dip::Image const& mask = {}) -> dip::StatisticsAccumulator
Computes the first four central moments of the pixel intensities, within an optional mask. more...
template<typename T, <SFINAE> = 0>
auto saturated_add(T lhs, T rhs) -> T constexpr
Adds two values using saturated arithmetic.
template<typename T, <SFINAE> = 0>
auto saturated_div(T lhs, T rhs) -> T constexpr
Divides two values using saturated arithmetic.
template<typename T, <SFINAE> = 0>
auto saturated_inv(T v) -> T constexpr
Inverts a value using saturated arithmetic. This is the same as negation, but not for unsigned values.
template<typename T, <SFINAE> = 0>
auto saturated_mul(T lhs, T rhs) -> T constexpr
Multiplies two values using saturated arithmetic.
template<typename T>
auto saturated_safediv(T lhs, T rhs) -> T constexpr
Divides two values using saturated arithmetic. Tests for division by zero, return 0 rather than infinity or NaN (or an exception).
template<typename T, <SFINAE> = 0>
auto saturated_sub(T lhs, T rhs) -> T constexpr
Subtracts two values using saturated arithmetic.
void SeededWatershed(dip::Image const& in, dip::Image const& seeds, dip::Image const& mask, dip::Image& out, dip::uint connectivity = 1, dip::dfloat maxDepth = 1, dip::uint maxSize = 0, dip::StringSet const& flags = {})
Computes the watershed of in within mask, starting at seeds, with on-line merging of regions. more...
void Select(dip::Image const& in1, dip::Image const& in2, dip::Image const& in3, dip::Image const& in4, dip::Image& out, dip::String const& selector)
Compares in1 to in2 according to selector, and writes in3 or in4 to out depending on the result. more...
void Select(dip::Image const& in1, dip::Image const& in2, dip::Image const& mask, dip::Image& out)
Writes either in1 or in2 to out depending on the value of mask. more...
void SelectionFilter(dip::Image const& in, dip::Image const& control, dip::Image& out, dip::Kernel const& kernel = {}, dip::dfloat threshold = 0.0, dip::String const& mode = S::MINIMUM, dip::StringArray const& boundaryCondition = {})
Selects, for each pixel, a value from within the filter window, where a control image is minimal or maximal. more...
auto Semivariogram(dip::Image const& in, dip::Image const& mask, dip::Random& random, dip::uint probes = 1000000, dip::uint length = 100, dip::String const& sampling = S::RANDOM) -> dip::Distribution
Estimates the expected value of half the square difference between field values at a distance d. more...
auto Semivariogram(dip::Image const& object, dip::Image const& mask, dip::uint probes = 1000000, dip::uint length = 100, dip::String const& sampling = S::RANDOM) -> dip::Distribution
like above, using a default-initialized dip::Random object.
auto Sensitivity(dip::Image const& in, dip::Image const& reference) -> dip::dfloat
Compares a segmentation result in to the ground truth reference, determining the sensitivity of the segmentation. more...
void SeparableBilateralFilter(dip::Image const& in, dip::Image const& estimate, dip::Image& out, dip::BooleanArray const& process = {}, dip::FloatArray spatialSigmas = {2.0}, dip::dfloat tonalSigma = 30.0, dip::dfloat truncation = 2.0, dip::StringArray const& boundaryCondition = {})
Separable bilateral filter, a very fast approximation more...
void SeparableConvolution(dip::Image const& in, dip::Image& out, dip::OneDimensionalFilterArray const& filterArray, dip::StringArray const& boundaryCondition = {}, dip::BooleanArray process = {})
Applies a convolution with a filter kernel (PSF) that is separable. more...
auto SeparateFilter(dip::Image const& filter) -> dip::OneDimensionalFilterArray
Separates a linear filter (convolution kernel) into a set of 1D filters that can be applied using dip::SeparableConvolution. more...
void SetBorder(dip::Image& out, dip::Image::Pixel const& value = {0}, dip::UnsignedArray const& sizes = {1})
Sets the pixels at the border of out to value. more...
void SetNumberOfThreads(dip::uint nThreads)
Sets the maximum number of threads to be using in computations. more...
void Sharpen(dip::Image const& in, dip::Image& out, dip::dfloat weight = 1.0, dip::FloatArray sigmas = {1.0}, dip::String const& method = S::BEST, dip::StringArray const& boundaryCondition = {}, dip::dfloat truncation = 3)
Sharpens in by subtracting the Laplacian of the image. more...
void Shift(dip::Image const& in, dip::Image& out, dip::FloatArray const& shift, dip::String const& interpolationMethod = S::FOURIER, dip::StringArray const& boundaryCondition = {})
Shift an image. Calls dip::Resampling with zoom set to 1, and uses the “ft” method by default.
void ShiftFT(dip::Image const& in, dip::Image& out, dip::FloatArray shift = {0.0})
Modulates the input Fourier spectrum to introduce a shift in the spatial domain more...
void ShiTomasiCornerDetector(dip::Image const& in, dip::Image& out, dip::FloatArray const& sigmas = {2.0}, dip::StringArray const& boundaryCondition = {})
Shi-Tomasi corner detector more...
void Shrinkage(dip::Image const& in, dip::Image& out, dip::dfloat threshold = 128.0)
Shrinkage function, also known as soft threshold. more...
void Sign(dip::Image const& in, dip::Image& out)
Computes the sign of each sample. Only defined for signed real data types (signed integers and floating-point types). Output is of type dip::DT_SINT8, containing values -1, 0 and 1.
void SignedInfimum(dip::Image const& a, dip::Image const& b, dip::Image& out)
Computes the sample-wise signed infimum (minimum) of the two input images: returns -b where b < a, a otherwise.
void SimulatedAttenuation(dip::Image const& in, dip::Image& out, dip::dfloat fAttenuation = 0.01, dip::dfloat bAttenuation = 0.01, dip::dfloat NA = 1.4, dip::dfloat refIndex = 1.518, dip::uint oversample = 1, dip::dfloat rayStep = 1)
3D fluorescence attenuation simulation more...
void Sin(dip::Image const& in, dip::Image& out)
Computes the sine of each sample.
auto Sinc(dip::dfloat x) -> dip::dfloat
Computes the sinc function.
void Sinc(dip::Image const& in, dip::Image& out)
Computes the sinc function of each sample. \(\mathrm{sinc}(x) = \sin(x)/x\) .
auto SinglePixelInterval(dip::uint nDims = 2) -> dip::Interval
Returns an interval for detecting single pixels. Use with dip::SupGenerating to detect isolated pixels. Note that dip::GetSinglePixels is more efficient.
void SingularValueDecomposition(dip::uint m, dip::uint n, dip::ConstSampleIterator input, dip::SampleIterator output, dip::SampleIterator U = nullptr, dip::SampleIterator V = nullptr)
Computes the “thin” singular value decomposition of a real-valued matrix more...
void SingularValueDecomposition(dip::uint m, dip::uint n, dip::ConstSampleIterator input, dip::SampleIterator output, dip::SampleIterator U = nullptr, dip::SampleIterator V = nullptr)
Computes the “thin” singular value decomposition of a complex-valued matrix more...
void SingularValueDecomposition(dip::Image const& A, dip::Image& U, dip::Image& S, dip::Image& V)
Computes the “thin” singular value decomposition of the matrix at each pixel in image in. more...
void SingularValues(dip::Image const& in, dip::Image& out)
Computes the “thin” singular value decomposition of the matrix at each pixel in image in. more...
void Sinh(dip::Image const& in, dip::Image& out)
Computes the hyperbolic sine of each sample.
void Skew(dip::Image const& in, dip::Image& out, dip::FloatArray const& shearArray, dip::uint axis, dip::String const& interpolationMethod = "", dip::StringArray const& boundaryCondition = {})
Skews (shears) an image more...
void Skew(dip::Image const& in, dip::Image& out, dip::dfloat shear, dip::uint skew, dip::uint axis, dip::String const& interpolationMethod = "", dip::String const& boundaryCondition = {})
Skews (shears) an image more...
void SmallestEigenvalue(dip::Image const& in, dip::Image& out, dip::String const& method = S::PRECISE)
Finds the smallest eigenvalue of the square matrix at each pixel in image in. more...
void SmallestEigenvector(dip::uint n, dip::ConstSampleIterator input, dip::SampleIterator vector)
Finds the smallest eigenvector of a symmetric, real-valued matrix. more...
void SmallestEigenvector(dip::Image const& in, dip::Image& out)
Finds the smallest eigenvector of the symmetric matrix at each pixel in image in. more...
void SmallObjectsRemove(dip::Image const& in, dip::Image& out, dip::uint threshold, dip::uint connectivity = 0)
Removes small objects from a labeled or binary image. more...
auto Smooth(dip::Histogram const& in, dip::FloatArray const& sigma) -> dip::Histogram
Returns a smoothed version of the histogram in. See dip::Histogram::Smooth.
auto Smooth(dip::Histogram const& in, dip::dfloat sigma = 1) -> dip::Histogram
Returns a smoothed version of the histogram in. See dip::Histogram::Smooth.
void SobelGradient(dip::Image const& in, dip::Image& out, dip::uint dimension = 0, dip::StringArray const& boundaryCondition = {})
The Sobel derivative filter more...
void Solve(dip::uint m, dip::uint n, dip::ConstSampleIterator A, dip::ConstSampleIterator b, dip::SampleIterator output)
Solves a system of real-valued equations, using the Jacobi SVD decomposition. more...
template<typename T>
void sortIndices(dip::DimensionArray& indices, dip::DimensionArray const& data)
Sorts the indices array with indices into the data array, from smallest to largest. The sort is stable.
void SortTensorElements(dip::Image& out)
Sorts the tensor elements within each pixel from largest to smallest. Works in-place. out must be real-valued.
void SortTensorElementsByMagnitude(dip::Image& out)
Sorts the tensor elements within each pixel by magnitude from largest to smallest. Works in-place. out must be of a floating point or complex type.
auto SpatialOverlap(dip::Image const& in, dip::Image const& reference) -> dip::SpatialOverlapMetrics
Compares a segmentation result in to the ground truth reference. more...
auto SpearmanRankCorrelation(dip::Image const& in1, dip::Image const& in2, dip::Image const& mask = {}) -> dip::dfloat
Computes the Spearman rank correlation coefficient. more...
auto Specificity(dip::Image const& in, dip::Image const& reference) -> dip::dfloat
Compares a segmentation result in to the ground truth reference, determining the specificity of the segmentation. more...
auto SplitChannels(dip::Image const& in) -> dip::ImageArray
Splits the tensor elements of a tensor image into individual images. more...
void SplitRegions(dip::Image const& label, dip::Image& out, dip::uint connectivity = 0)
Ensures a gap between regions with unequal labels. more...
void Sqrt(dip::Image const& in, dip::Image& out)
Computes the square root of each sample.
void Square(dip::Image const& in, dip::Image& out)
Computes the square of each sample.
template<typename T>
auto SquareDistance(dip::DimensionArray const& v1, dip::DimensionArray const& v2) -> double
Computes the Square Euclidean distance between two points.
void SquareModulus(dip::Image const& in, dip::Image& out)
Computes the square of the modulus of each sample.
template<typename T>
auto SquareNorm(dip::uint n, dip::ConstSampleIterator input) -> dip::FloatType
Computes the square norm of a vector. more...
void SquareNorm(dip::Image const& in, dip::Image& out)
Computes the square of the norm of the vector at each pixel in image in.
auto SSIM(dip::Image const& in, dip::Image const& reference, dip::Image const& mask = {}, dip::dfloat sigma = 1.5, dip::dfloat K1 = 0.01, dip::dfloat K2 = 0.03) -> dip::dfloat
Calculates the structural similarity index (a visual similarity measure) more...
void StandardDeviation(dip::Image const& in, dip::Image const& mask, dip::Image& out, dip::String mode = S::FAST, dip::BooleanArray const& process = {})
Calculates the standard deviation of the pixel values over all those dimensions which are specified by process. more...
void StationaryWaveletTransform(dip::Image const& in, dip::Image& out, dip::uint nLevels = 4, dip::StringArray const& boundaryCondition = {}, dip::BooleanArray const& process = {})
Computes a stationary wavelet transform (also called à-trous wavelet decomposition). more...
void StochasticWatershed(dip::Image const& in, dip::Image& out, dip::Random& random, dip::uint nSeeds = 100, dip::uint nIterations = 50, dip::dfloat noise = 0, dip::String const& seeds = S::HEXAGONAL)
Computes the stochastic watershed of in. more...
void StochasticWatershed(dip::Image const& in, dip::Image& out, dip::uint nSeeds = 100, dip::uint nIterations = 50, dip::dfloat noise = 0, dip::String const& seeds = S::HEXAGONAL)
Like above, using a default-initialized dip::Random object.
auto StringArrayToBoundaryConditionArray(dip::StringArray const& bc) -> dip::BoundaryConditionArray
Convert an array of strings to an array of boundary conditions.
auto StringCompareCaseInsensitive(dip::String const& string1, dip::String const& string2) -> bool
A case-insensitive string comparison, use only with ASCII characters!
auto StringToBoundaryCondition(dip::String const& bc) -> dip::BoundaryCondition
Convert a string to a boundary condition.
auto StructureAnalysis(dip::Image const& in, dip::Image const& mask, std::vector<dfloat> const& scales = {}, dip::String const& feature = "energy", dip::FloatArray const& gradientSigmas = {1.0}, dip::String const& method = S::BEST, dip::StringArray const& boundaryCondition = {}, dip::dfloat truncation = 3) -> dip::Distribution
Analyzes the local structure of the image at multiple scales. more...
void StructureTensor(dip::Image const& in, dip::Image const& mask, dip::Image& out, dip::FloatArray const& gradientSigmas = {1.0}, dip::FloatArray const& tensorSigmas = {5.0}, dip::String const& method = S::BEST, dip::StringArray const& boundaryCondition = {}, dip::dfloat truncation = 3)
Computes the structure tensor. more...
void StructureTensorAnalysis(dip::Image const& in, dip::ImageRefArray& out, dip::StringArray const& outputs)
Interface to dip::StructureTensorAnalysis2D and dip::StructureTensorAnalysis3D. more...
void StructureTensorAnalysis2D(dip::Image const& in, dip::Image* l1 = nullptr, dip::Image* l2 = nullptr, dip::Image* orientation = nullptr, dip::Image* energy = nullptr, dip::Image* anisotropy1 = nullptr, dip::Image* anisotropy2 = nullptr, dip::Image* curvature = nullptr)
Computes useful image parameters from the 2D structure tensor. more...
void StructureTensorAnalysis3D(dip::Image const& in, dip::Image* l1 = nullptr, dip::Image* phi1 = nullptr, dip::Image* theta1 = nullptr, dip::Image* l2 = nullptr, dip::Image* phi2 = nullptr, dip::Image* theta2 = nullptr, dip::Image* l3 = nullptr, dip::Image* phi3 = nullptr, dip::Image* theta3 = nullptr, dip::Image* energy = nullptr, dip::Image* cylindrical = nullptr, dip::Image* planar = nullptr)
Computes useful image parameters from the 3D structure tensor. more...
auto SubpixelLocation(dip::Image const& in, dip::UnsignedArray const& position, dip::String const& polarity = S::MAXIMUM, dip::String const& method = S::PARABOLIC_SEPARABLE) -> dip::SubpixelLocationResult
Gets coordinates of a local extremum with sub-pixel precision more...
auto SubpixelMaxima(dip::Image const& in, dip::Image const& mask = {}, dip::String const& method = S::PARABOLIC_SEPARABLE) -> dip::SubpixelLocationArray
Gets coordinates of local maxima with sub-pixel precision more...
auto SubpixelMinima(dip::Image const& in, dip::Image const& mask = {}, dip::String const& method = S::PARABOLIC_SEPARABLE) -> dip::SubpixelLocationArray
Gets coordinates of local minima with sub-pixel precision more...
void Subsampling(dip::Image const& in, dip::Image& out, dip::UnsignedArray const& sample)
Subsamples the input image. more...
void Subtract(dip::Image const& lhs, dip::Image const& rhs, dip::Image& out, dip::DataType dt)
Subtracts two images, sample-wise, with singleton expansion, and using saturated arithmetic. more...
template<typename T>
auto Sum(dip::uint n, dip::ConstSampleIterator input) -> T
Computes the sum of the values of a vector. more...
void Sum(dip::Image const& in, dip::Image const& mask, dip::Image& out, dip::BooleanArray const& process = {})
Calculates the sum of the pixel values over all those dimensions which are specified by process. more...
void SumAbs(dip::Image const& in, dip::Image const& mask, dip::Image& out, dip::BooleanArray const& process = {})
Calculates the sum of the absolute pixel values over all those dimensions which are specified by process. more...
template<typename T>
auto SumAbsSquare(dip::uint n, dip::ConstSampleIterator input) -> dip::FloatType
Computes the sum of the square of the values of a vector. more...
void SumModulus(dip::Image const& in, dip::Image const& mask, dip::Image& out, dip::BooleanArray const& process = {})
Calculates the sum of the modulus of the pixel values. Alias to dip::SumAbs.
auto SumOfMinimalDistances(dip::Image const& in, dip::Image const& reference) -> dip::dfloat
Computes the sum of minimal distances (SMD) between two binary images. more...
void SumSquare(dip::Image const& in, dip::Image const& mask, dip::Image& out, dip::BooleanArray const& process = {})
Calculates the sum of the square pixel values over all those dimensions which are specified by process. more...
void SumSquareModulus(dip::Image const& in, dip::Image const& mask, dip::Image& out, dip::BooleanArray const& process = {})
Calculates the sum of the square modulus of the pixel values over all those dimensions which are specified by process. more...
void SumTensorElements(dip::Image const& in, dip::Image& out)
Adds all tensor elements, producing a scalar image.
void Superpixels(dip::Image const& in, dip::Image& out, dip::Random& random, dip::dfloat density = 0.005, dip::dfloat compactness = 1.0, dip::String const& method = S::CW, dip::StringSet const& flags = {})
Generates superpixels (oversegmentation) more...
void Superpixels(dip::Image const& in, dip::Image& out, dip::dfloat density = 0.005, dip::dfloat compactness = 1.0, dip::String const& method = S::CW, dip::StringSet const& flags = {})
Like above, using a default-initialized dip::Random object.
void SupGenerating(dip::Image const& in, dip::Image& out, dip::Interval const& interval, dip::String const& boundaryCondition = S::ADD_ZEROS)
Sup-generating operator, also known as hit-miss operator. more...
void Supremum(dip::ImageConstRefArray const& in, dip::Image& out)
Computes the sample-wise supremum (maximum) over all the input images. For binary images, this is the same as the union.
void Supremum(dip::Image const& a, dip::Image const& b, dip::Image& out)
Computes the sample-wise supremum (maximum) of the two input images. For binary images, this is the same as the union.
void swap(Sample& a, Sample& b)
Swaps two samples, copying the data from other to *this, and that from *this to other. Both must have the same number of values.
void SymmetricEigenDecomposition(dip::uint n, dip::ConstSampleIterator input, dip::SampleIterator lambdas, dip::SampleIterator vectors = nullptr)
Finds the eigenvalues and eigenvectors of a symmetric, real-valued matrix. more...
void SymmetricEigenDecomposition2(dip::ConstSampleIterator input, dip::SampleIterator lambdas, dip::SampleIterator vectors = nullptr, dip::Option::DecompositionMethod method = Option::DecompositionMethod::PRECISE)
Finds the eigenvalues and eigenvectors of a 2x2 symmetric, real-valued matrix.
void SymmetricEigenDecomposition3(dip::ConstSampleIterator input, dip::SampleIterator lambdas, dip::SampleIterator vectors = nullptr, dip::Option::DecompositionMethod method = Option::DecompositionMethod::PRECISE)
Finds the eigenvalues and eigenvectors of a 3x3 symmetric, real-valued matrix.
void SymmetricEigenDecompositionPacked(dip::uint n, dip::ConstSampleIterator input, dip::SampleIterator lambdas, dip::SampleIterator vectors = nullptr)
Finds the eigenvalues and eigenvectors of a symmetric, real-valued matrix, where only the unique values are given. more...
void Tan(dip::Image const& in, dip::Image& out)
Computes the tangent of each sample.
void Tanh(dip::Image const& in, dip::Image& out)
Computes the hyperbolic tangent of each sample.
void TestObject(dip::Image& out, dip::TestObjectParams const& params, dip::Random& random)
Generates a test object according to params. more...
auto TestObject(dip::UnsignedArray const& sizes, dip::TestObjectParams const& params, dip::Random& random) -> dip::Image
Overload for the function above, which takes image sizes instead of an image.
void TestObject(dip::Image& out, dip::TestObjectParams const& params = {})
Calls the main dip::TestObject function with a default-initialized dip::Random object.
auto TestObject(dip::UnsignedArray const& sizes = {256,256}, dip::TestObjectParams const& params = {}) -> dip::Image
Overload for the function above, which takes image sizes instead of an image.
void Thickening(dip::Image const& in, dip::Image const& mask, dip::Image& out, dip::IntervalArray const& intervals, dip::uint iterations = 0, dip::String const& boundaryCondition = S::ADD_ZEROS)
Applies the thickening operator, optionally constrained by a mask, to an image. more...
void Thickening2D(dip::Image const& in, dip::Image const& mask, dip::Image& out, dip::Interval const& interval, dip::uint iterations = 0, dip::uint rotationAngle = 45, dip::String const& rotationDirection = S::INTERLEAVED_CLOCKWISE, dip::String const& boundaryCondition = S::ADD_ZEROS)
Applies the thickening operator, optionally constrained by a mask, to an image. more...
void Thinning(dip::Image const& in, dip::Image const& mask, dip::Image& out, dip::IntervalArray const& intervals, dip::uint iterations = 0, dip::String const& boundaryCondition = S::ADD_ZEROS)
Applies the thinning operator, optionally constrained by a mask, to an image. more...
void Thinning2D(dip::Image const& in, dip::Image const& mask, dip::Image& out, dip::Interval const& interval, dip::uint iterations = 0, dip::uint rotationAngle = 45, dip::String const& rotationDirection = S::INTERLEAVED_CLOCKWISE, dip::String const& boundaryCondition = S::ADD_ZEROS)
Applies the thinning operator, optionally constrained by a mask, to an image. more...
auto Threshold(dip::Image const& in, dip::Image const& mask, dip::Image& out, dip::String const& method = S::OTSU, dip::dfloat parameter = infinity) -> dip::dfloat
Automated threshold using method. more...
void TikhonovMiller(dip::Image const& in, dip::Image const& psf, dip::Image& out, dip::dfloat regularization = 0.1, dip::StringSet const& options = {S::PAD})
Tikhonov-Miller deconvolution. more...
void Tile(dip::ImageConstRefArray const& in, dip::Image& out, dip::UnsignedArray tiling = {})
Tiles a set of images to form a single image. more...
void TileTensorElements(dip::Image const& in, dip::Image& out)
Tiles the tensor elements of in to produce a scalar image more...
void Toggle(dip::Image const& in, dip::Image const& in1, dip::Image const& in2, dip::Image& out)
Writes to out whichever of in1 or in2 is closest to in. more...
void ToLowerCase(dip::String& string)
Convert a string to lower case, use only with ASCII characters!
void Tophat(dip::Image const& in, dip::Image& out, dip::StructuringElement const& se = {}, dip::String const& edgeType = S::TEXTURE, dip::String const& polarity = S::WHITE, dip::StringArray const& boundaryCondition = {})
The Top-hat operator and its variants more...
void ToUpperCase(dip::String& string)
Convert a string to upper case, use only with ASCII characters!
template<typename T>
auto Trace(dip::uint n, dip::ConstSampleIterator input) -> T
Computes the trace of a square matrix. more...
void Trace(dip::Image const& in, dip::Image& out)
Computes the trace of the square matrix at each pixel in image in.
template<typename T>
auto TraceDiagonal(dip::uint n, dip::ConstSampleIterator input) -> T
Computes the trace of a diagonal matrix. more...
auto Transpose(dip::Image const& in) -> dip::Image
Transposes the tensor image, the data are not copied.
template<typename T>
auto TriangleArea(dip::Vertex const& v1, dip::Vertex const& v2, dip::Vertex const& v3) -> dip::dfloat
Compute the area of the triangle formed by vertices v1, v2 and v3.
template<typename T>
auto TriangleHeight(dip::Vertex const& v1, dip::Vertex const& v2, dip::Vertex const& v3) -> dip::dfloat
Compute the height of the triangle formed by vertices v1, v2 and v3, with v3 the tip.
auto TriangleThreshold(dip::Histogram const& in, dip::dfloat sigma = 4.0) -> dip::dfloat
Determines a threshold using the using the chord method (a.k.a. skewed bi-modality, maximum distance to triangle), and the image’s histogram in. more...
auto TriangleThreshold(dip::Image const& in, dip::Image const& mask, dip::Image& out, dip::dfloat sigma = 4.0) -> dip::dfloat
Thresholds the image in using the chord method (a.k.a. skewed bi-modality, maximum distance to triangle), and the histogram of in. more...
void Truncate(dip::Image const& in, dip::Image& out)
Computes the truncated value of each sample (rounds towards zero). Only defined for floating-point types, the output is the same type.
void Uniform(dip::Image const& in, dip::Image& out, dip::Kernel const& kernel = {}, dip::StringArray const& boundaryCondition = {})
Applies a convolution with a kernel with uniform weights, leading to an average (mean) filter. more...
void UniformNoise(dip::Image const& in, dip::Image& out, dip::Random& random, dip::dfloat lowerBound = 0.0, dip::dfloat upperBound = 1.0)
Adds uniformly distributed white noise to the input image. more...
void UnionSupGenerating(dip::Image const& in, dip::Image& out, dip::IntervalArray const& intervals, dip::String const& boundaryCondition = S::ADD_ZEROS)
Union of sup-generating operators. more...
void UnionSupGenerating2D(dip::Image const& in, dip::Image& out, dip::Interval const& interval, dip::uint rotationAngle = 45, dip::String const& rotationDirection = S::INTERLEAVED_CLOCKWISE, dip::String const& boundaryCondition = S::ADD_ZEROS)
Union of sup-generating operators. more...
void UnmixStains(dip::Image const& in, dip::Image& out, std::vector<Image::Pixel> const& stains)
Unmixes stains in a brightfield absorbance image or a fluorescence emission image. more...
void UnsharpMask(dip::Image const& in, dip::Image& out, dip::dfloat weight = 1.0, dip::FloatArray sigmas = {1.0}, dip::String const& method = S::BEST, dip::StringArray const& boundaryCondition = {}, dip::dfloat truncation = 3)
Sharpens in by subtracting the smoothed image. more...
void UpperSkeleton2D(dip::Image const& in, dip::Image const& mask, dip::Image& out, dip::String const& endPixelCondition = S::NATURAL)
Grey-value skeleton (2D only). more...
void Variance(dip::Image const& in, dip::Image const& mask, dip::Image& out, dip::String mode = S::FAST, dip::BooleanArray const& process = {})
Calculates the variance of the pixel values over all those dimensions which are specified by process. more...
void VarianceFilter(dip::Image const& in, dip::Image& out, dip::Kernel const& kernel = {}, dip::StringArray const& boundaryCondition = {})
Computes, for each pixel, the sample variance within a filter window around the pixel. more...
void VectorDistanceTransform(dip::Image const& in, dip::Image& out, dip::String const& border = S::BACKGROUND, dip::String const& method = S::FAST)
Euclidean vector distance transform more...
void VolumeClosing(dip::Image const& in, dip::Image const& mask, dip::Image& out, dip::dfloat filterSize, dip::uint connectivity = 0)
Computes the area closing, calling dip::VolumeOpening with polarity="closing".
void VolumeOpening(dip::Image const& in, dip::Image const& mask, dip::Image& out, dip::dfloat filterSize, dip::uint connectivity = 0, dip::String const& polarity = S::OPENING)
Computes the volume opening or closing. This is a parametric opening. more...
auto VolumeThreshold(dip::Image const& in, dip::Image const& mask, dip::Image& out, dip::dfloat volumeFraction = 0.5) -> dip::dfloat
Thresholds an image such that a fraction volumeFraction of pixels is foreground. more...
void WangBradyCornerDetector(dip::Image const& in, dip::Image& out, dip::dfloat threshold = 0.1, dip::FloatArray const& sigmas = {2.0}, dip::StringArray const& boundaryCondition = {})
Wang-Brady corner detector more...
void WarpControlPoints(dip::Image const& in, dip::Image& out, dip::FloatCoordinateArray const& inCoordinates, dip::FloatCoordinateArray const& outCoordinates, dip::dfloat lambda = 0, dip::String const& interpolationMethod = S::LINEAR)
Warps an image based on a set of control points using thin plate spline interpolation more...
void Watershed(dip::Image const& in, dip::Image const& mask, dip::Image& out, dip::uint connectivity = 1, dip::dfloat maxDepth = 1, dip::uint maxSize = 0, dip::StringSet flags = {})
Computes the watershed of in within mask, with on-line merging of regions. more...
void WatershedMaxima(dip::Image const& in, dip::Image const& mask, dip::Image& out, dip::uint connectivity = 1, dip::dfloat maxDepth = 1, dip::uint maxSize = 0, dip::String const& output = S::BINARY)
Marks significant local maxima. more...
void WatershedMinima(dip::Image const& in, dip::Image const& mask, dip::Image& out, dip::uint connectivity = 1, dip::dfloat maxDepth = 1, dip::uint maxSize = 0, dip::String const& output = S::BINARY)
Marks significant local minima. more...
void WienerDeconvolution(dip::Image const& in, dip::Image const& psf, dip::Image const& signalPower, dip::Image const& noisePower, dip::Image& out, dip::StringSet const& options = {S::PAD})
Wiener deconvolution using estimates of signal and noise power spectra. more...
void WienerDeconvolution(dip::Image const& in, dip::Image const& psf, dip::Image& out, dip::dfloat regularization = 1e-4, dip::StringSet const& options = {S::PAD})
Wiener deconvolution using an estimate of noise-to-signal ratio. more...
void Wrap(dip::Image const& in, dip::Image& out, dip::IntegerArray wrap)
Shifts the input image by an integer number of pixels, wrapping the pixels around. more...
void Xor(dip::Image const& lhs, dip::Image const& rhs, dip::Image& out)
Bit-wise XOR of two integer images, or logical XOR of two binary images, sample-wise, with singleton expansion. more...
void Zero(dip::Image const& in, dip::Image& out, dip::dfloat threshold = 128.0)
Zeros the sample values in in that are below threshold. more...

Operators

auto operator!(dip::Image::Pixel const& in) -> dip::Image::Pixel
Boolean unary operator, element-wise.
auto operator!(dip::Image const& in) -> dip::Image
Logical unary operator. The input is converted to a binary image, then calls dip::Invert.
template<typename T>
auto operator!=(dip::DimensionArray const& lhs, dip::DimensionArray const& rhs) -> bool
Compares two arrays, returns true if they have different size and/or contain different values.
template<typename T>
auto operator!=(dip::DimensionArray const& lhs, T const& rhs) -> dip::DimensionArray
Compares an array to a scalar, returns a boolean array.
auto operator!=(dip::Image::Pixel const& lhs, dip::Image::Pixel const& rhs) -> bool
Comparison operator, equivalent to !(lhs==rhs).
template<typename T>
auto operator!=(dip::Image const& lhs, T const& rhs) -> dip::Image
Comparison operator, calls dip::NotEqual.
auto operator!=(dip::Measurement::IteratorFeature const& featureValues, dip::Measurement::ValueType value) -> dip::LabelMap
Selects objects where the first element of featureValues is unequal to value.
auto operator%(dip::Image::Pixel const& lhs, dip::Image::Pixel const& rhs) -> dip::Image::Pixel
Arithmetic operator, element-wise.
template<typename T1, typename T2, typename <SFINAE> = T1>
auto operator%(T1 const& lhs, T2 const& rhs) -> dip::Image
Arithmetic operator, calls dip::Modulo.
template<typename T>
auto operator%=(dip::Image& lhs, T const& rhs) -> dip::Image&
Compound assignment operator, calls dip::Modulo. more...
auto operator&(dip::Image::Pixel const& lhs, dip::Image::Pixel const& rhs) -> dip::Image::Pixel
Bit-wise operator, element-wise.
template<typename T>
auto operator&(dip::Image const& lhs, T const& rhs) -> dip::Image
Bit-wise and logical operator, calls dip::And.
auto operator&(dip::LabelMap lhs, dip::LabelMap const& rhs) -> dip::LabelMap
Combines two maps using logical AND. See operator&=.
template<typename T>
auto operator&=(dip::Image& lhs, T const& rhs) -> dip::Image&
Bit-wise compound assignment operator, calls dip::And. more...
auto operator*(dip::Image::Pixel const& lhs, dip::Image::Pixel const& rhs) -> dip::Image::Pixel
Arithmetic operator, tensor multiplication.
template<typename T1, typename T2, typename <SFINAE> = T1>
auto operator*(T1 const& lhs, T2 const& rhs) -> dip::Image
Arithmetic operator, calls dip::Multiply.
auto operator*(dip::Units lhs, dip::Units const& rhs) -> dip::Units constexpr
Multiplies two units objects.
auto operator*(dip::PhysicalQuantity lhs, dip::PhysicalQuantity const& rhs) -> dip::PhysicalQuantity constexpr
Multiplies two physical quantities.
auto operator*(dip::PhysicalQuantity lhs, dip::dfloat rhs) -> dip::PhysicalQuantity constexpr
Scaling of a physical quantity.
auto operator*(dip::dfloat lhs, dip::PhysicalQuantity rhs) -> dip::PhysicalQuantity constexpr
Scaling of a physical quantity.
auto operator*(dip::dfloat magnitude, dip::Units const& units) -> dip::PhysicalQuantity constexpr
Create an arbitrary physical quantity by multiplying a magnitude with units.
auto operator*(dip::Units const& units, dip::dfloat magnitude) -> dip::PhysicalQuantity constexpr
Create an arbitrary physical quantity by multiplying a magnitude with units.
template<typename T>
auto operator*(dip::Vertex v, dip::dfloat s) -> dip::Vertex
Multiply a vertex and a constant, scaling isotropically.
template<typename T>
auto operator*(dip::Vertex lhs, dip::Vertex const& rhs) -> dip::Vertex
Multiply a vertex by another vertex, scaling anisotropically.
auto operator*(dip::VertexFloat lhs, dip::VertexInteger const& rhs) -> dip::VertexFloat
Multiply a vertex by another vertex, scaling anisotropically, where the LHS is floating-point and the RHS is integer.
auto operator*(dip::VertexInteger const& lhs, dip::VertexFloat const& rhs) -> dip::VertexFloat
Multiply a vertex by another vertex, scaling anisotropically, where the LHS is integer and the RHS is floating-point.
template<typename T>
auto operator*=(dip::Image& lhs, T const& rhs) -> dip::Image&
Compound assignment operator, calls dip::Multiply. more...
auto operator+(dip::Image::Pixel const& lhs, dip::Image::Pixel const& rhs) -> dip::Image::Pixel
Arithmetic operator, element-wise.
template<typename T1, typename T2, typename <SFINAE> = T1>
auto operator+(T1 const& lhs, T2 const& rhs) -> dip::Image
Arithmetic operator, calls dip::Add.
auto operator+(dip::Image const& in) -> dip::Image
Unary operator, converts binary image to dip::DT_UINT and leaves other images unchanged, does not copy data.
auto operator+(dip::PhysicalQuantity lhs, dip::PhysicalQuantity const& rhs) -> dip::PhysicalQuantity constexpr
Addition of two physical quantities.
template<typename T, typename I, typename <SFINAE>>
auto operator+(dip::SampleIterator it, I n) -> dip::SampleIterator
Add integer to a sample iterator
auto operator+(dip::StatisticsAccumulator lhs, dip::StatisticsAccumulator const& rhs) -> dip::StatisticsAccumulator
Combine two accumulators
auto operator+(dip::VarianceAccumulator lhs, dip::VarianceAccumulator const& rhs) -> dip::VarianceAccumulator
Combine two accumulators
auto operator+(dip::FastVarianceAccumulator lhs, dip::FastVarianceAccumulator const& rhs) -> dip::FastVarianceAccumulator
Combine two accumulators
auto operator+(dip::DirectionalStatisticsAccumulator lhs, dip::DirectionalStatisticsAccumulator const& rhs) -> dip::DirectionalStatisticsAccumulator
Combine two accumulators
auto operator+(dip::MinMaxAccumulator lhs, dip::MinMaxAccumulator const& rhs) -> dip::MinMaxAccumulator
Combine two accumulators
auto operator+(dip::MomentAccumulator lhs, dip::MomentAccumulator const& rhs) -> dip::MomentAccumulator
Combine two accumulators
auto operator+(dip::ImageSliceIterator it, dip::sint n) -> dip::ImageSliceIterator
Increment an image slice iterator by n
auto operator+(dip::ImageSliceIterator it, dip::uint n) -> dip::ImageSliceIterator
Increment an image slice iterator by n
auto operator+(dip::Histogram const& lhs, dip::Histogram const& rhs) -> dip::Histogram
Adds two histograms.
auto operator+(dip::Measurement const& lhs, dip::Measurement const& rhs) -> dip::Measurement
The + operator merges two dip::Measurement objects. more...
template<typename T>
auto operator+(dip::Vertex lhs, dip::Vertex const& rhs) -> dip::Vertex
Add two vertices together, with identical types.
auto operator+(dip::VertexFloat lhs, dip::VertexInteger const& rhs) -> dip::VertexFloat
Add two vertices together, where the LHS is floating-point and the RHS is integer.
auto operator+(dip::VertexInteger const& lhs, dip::VertexFloat rhs) -> dip::VertexFloat
Add two vertices together, where the LHS is integer and the RHS is floating-point.
template<typename T, typename S>
auto operator+(dip::Vertex v, S t) -> dip::Vertex
Add a vertex and a constant.
template<typename T>
auto operator+=(dip::Image& lhs, T const& rhs) -> dip::Image&
Compound assignment operator, calls dip::Add. more...
auto operator-(dip::Image::Pixel const& lhs, dip::Image::Pixel const& rhs) -> dip::Image::Pixel
Arithmetic operator, element-wise.
auto operator-(dip::Image::Pixel const& in) -> dip::Image::Pixel
Unary operator, element-wise.
template<typename T1, typename T2, typename <SFINAE> = T1>
auto operator-(T1 const& lhs, T2 const& rhs) -> dip::Image
Arithmetic operator, calls dip::Subtract.
auto operator-(dip::Image const& in) -> dip::Image
Unary operator, calls dip::Invert.
auto operator-(dip::PhysicalQuantity lhs, dip::PhysicalQuantity const& rhs) -> dip::PhysicalQuantity constexpr
Subtraction of two physical quantities.
template<typename T, typename I, typename <SFINAE>>
auto operator-(dip::SampleIterator it, I n) -> dip::SampleIterator
Subtract integer from a sample iterator
auto operator-(dip::ImageSliceIterator it, dip::sint n) -> dip::ImageSliceIterator
Decrement an image slice iterator by n, but never moves the iterator to before the first slide
auto operator-(dip::ImageSliceIterator it, dip::uint n) -> dip::ImageSliceIterator
Decrement an image slice iterator by n, but never moves the iterator to before the first slide
auto operator-(dip::Histogram const& lhs, dip::Histogram const& rhs) -> dip::Histogram
Subtracts two histograms.
template<typename T>
auto operator-(dip::Vertex lhs, dip::Vertex const& rhs) -> dip::Vertex
Subtract two vertices from each other.
auto operator-(dip::VertexFloat lhs, dip::VertexInteger const& rhs) -> dip::VertexFloat
Subtract two vertices from each other, where the LHS is floating-point and the RHS is integer.
auto operator-(dip::VertexInteger const& lhs, dip::VertexFloat const& rhs) -> dip::VertexFloat
Subtract two vertices from each other, where the LHS is integer and the RHS is floating-point.
template<typename T, typename S>
auto operator-(dip::Vertex v, S t) -> dip::Vertex
Subtract a vertex and a constant.
template<typename T>
auto operator-=(dip::Image& lhs, T const& rhs) -> dip::Image&
Compound assignment operator, calls dip::Subtract. more...
auto operator/(dip::Image::Pixel const& lhs, dip::Image::Pixel const& rhs) -> dip::Image::Pixel
Arithmetic operator, element-wise.
template<typename T1, typename T2, typename <SFINAE> = T1>
auto operator/(T1 const& lhs, T2 const& rhs) -> dip::Image
Arithmetic operator, calls dip::Divide.
auto operator/(dip::Units lhs, dip::Units const& rhs) -> dip::Units constexpr
Divides two units objects.
auto operator/(dip::PhysicalQuantity lhs, dip::PhysicalQuantity const& rhs) -> dip::PhysicalQuantity constexpr
Divides two physical quantities.
auto operator/(dip::PhysicalQuantity lhs, dip::dfloat rhs) -> dip::PhysicalQuantity constexpr
Scaling of a physical quantity.
auto operator/(dip::dfloat lhs, dip::PhysicalQuantity rhs) -> dip::PhysicalQuantity constexpr
Scaling of a physical quantity.
template<typename T>
auto operator/(dip::Vertex v, dip::dfloat s) -> dip::Vertex
Divide a vertex by a constant, scaling isotropically.
template<typename T>
auto operator/(dip::Vertex lhs, dip::Vertex const& rhs) -> dip::Vertex
Divide a vertex by another vertex, scaling anisotropically.
auto operator/(dip::VertexFloat lhs, dip::VertexInteger const& rhs) -> dip::VertexFloat
Divide a vertex by another vertex, scaling anisotropically, where the LHS is floating-point and the RHS is integer.
auto operator/(dip::VertexInteger const& lhs, dip::VertexFloat const& rhs) -> dip::VertexFloat
Divide a vertex by another vertex, scaling anisotropically, where the LHS is integer and the RHS is floating-point.
template<typename T>
auto operator/=(dip::Image& lhs, T const& rhs) -> dip::Image&
Compound assignment operator, calls dip::Divide. more...
template<typename T>
auto operator<(dip::DimensionArray const& lhs, dip::DimensionArray const& rhs) -> bool
Compares two arrays, returns true only if they have the same size and all lhs elements are smaller than all rhs elements.
template<typename T>
auto operator<(dip::DimensionArray const& lhs, T const& rhs) -> dip::DimensionArray
Compares an array to a scalar, returns a boolean array.
auto operator<(dip::Image::Pixel const& lhs, dip::Image::Pixel const& rhs) -> bool
Comparison operator, can only be true if the two pixels have compatible number of tensor elements.
template<typename T>
auto operator<(dip::Image const& lhs, T const& rhs) -> dip::Image
Comparison operator, calls dip::Lesser.
auto operator<(dip::Measurement::IteratorFeature const& featureValues, dip::Measurement::ValueType value) -> dip::LabelMap
Selects objects where the first element of featureValues is smaller than value.
auto operator<<(std::ostream& os, dip::DataType type) -> std::ostream&
You can output a dip::DataType to std::cout or any other stream. The result of type.Name() is written.
template<typename T>
auto operator<<(std::ostream& os, dip::DimensionArray const& array) -> std::ostream&
Writes the array to a stream
auto operator<<(std::ostream& os, dip::Image const& img) -> std::ostream&
You can output a dip::Image to std::cout or any other stream. Some information about the image is printed.
auto operator<<(std::ostream& os, dip::Image::Sample const& sample) -> std::ostream&
You can output a dip::Image::Sample to std::cout or any other stream. It is printed like any numeric value of the same type.
auto operator<<(std::ostream& os, dip::Image::Pixel const& pixel) -> std::ostream&
You can output a dip::Image::Pixel to std::cout or any other stream. It is printed as a sequence of values, prepended with “Pixel with values:”.
auto operator<<(std::ostream& os, dip::Units const& units) -> std::ostream&
Insert physical quantity to an output stream as a string of base units. See dip::Units::String.
auto operator<<(std::ostream& os, dip::PhysicalQuantity const& pq) -> std::ostream&
Insert physical quantity to an output stream.
auto operator<<(std::ostream& os, dip::PixelSize const& ps) -> std::ostream&
Writes the pixel sizes array to a stream
auto operator<<(std::ostream& os, dip::Tensor const& tensor) -> std::ostream&
Prints information about the tensor.
auto operator<<(std::ostream& os, dip::bin const& v) -> std::ostream&
Writes the value as a bool to a stream.
auto operator<<(std::ostream& os, dip::Range const& range) -> std::ostream&
Display a range as “{start, stop, step}”.
auto operator<<(std::ostream& os, dip::Distribution const& distribution) -> std::ostream&
Writes the distribution to a stream
auto operator<<(std::ostream& os, dip::Histogram const& histogram) -> std::ostream&
You can output a dip::Histogram to std::cout or any other stream. Some information about the histogram is printed.
auto operator<<(std::ostream& os, dip::Measurement const& measurement) -> std::ostream&
You can output a dip::Measurement to std::cout or any other stream to produce a human-readable representation of the tabular data in it.
template<typename T>
auto operator<=(dip::DimensionArray const& lhs, dip::DimensionArray const& rhs) -> bool
Compares two arrays, returns true only if they have the same size and all lhs elements are smaller or equal than all rhs elements.
template<typename T>
auto operator<=(dip::DimensionArray const& lhs, T const& rhs) -> dip::DimensionArray
Compares an array to a scalar, returns a boolean array.
auto operator<=(dip::Image::Pixel const& lhs, dip::Image::Pixel const& rhs) -> bool
Comparison operator, can only be true if the two pixels have compatible number of tensor elements.
template<typename T>
auto operator<=(dip::Image const& lhs, T const& rhs) -> dip::Image
Comparison operator, calls dip::NotGreater.
auto operator<=(dip::Measurement::IteratorFeature const& featureValues, dip::Measurement::ValueType value) -> dip::LabelMap
Selects objects where the first element of featureValues is not greater than value.
template<typename T>
auto operator==(dip::DimensionArray const& lhs, dip::DimensionArray const& rhs) -> bool
Compares two arrays, returns true only if they have the same size and contain the same values.
template<typename T>
auto operator==(dip::DimensionArray const& lhs, T const& rhs) -> dip::DimensionArray
Compares an array to a scalar, returns a boolean array.
auto operator==(dip::Image::Pixel const& lhs, dip::Image::Pixel const& rhs) -> bool
Comparison operator, can only be true if the two pixels have compatible number of tensor elements.
template<typename T>
auto operator==(dip::Image const& lhs, T const& rhs) -> dip::Image
Comparison operator, calls dip::Equal.
auto operator==(dip::Measurement::IteratorFeature const& featureValues, dip::Measurement::ValueType value) -> dip::LabelMap
Selects objects where the first element of featureValues is equal to value.
template<typename T>
auto operator==(dip::Vertex v1, dip::Vertex v2) -> bool
Compare two vertices.
template<typename T>
auto operator>(dip::DimensionArray const& lhs, dip::DimensionArray const& rhs) -> bool
Compares two arrays, returns true only if they have the same size and all lhs elements are larger than all rhs elements.
template<typename T>
auto operator>(dip::DimensionArray const& lhs, T const& rhs) -> dip::DimensionArray
Compares an array to a scalar, returns a boolean array.
auto operator>(dip::Image::Pixel const& lhs, dip::Image::Pixel const& rhs) -> bool
Comparison operator, can only be true if the two pixels have compatible number of tensor elements.
template<typename T>
auto operator>(dip::Image const& lhs, T const& rhs) -> dip::Image
Comparison operator, calls dip::Greater.
auto operator>(dip::Measurement::IteratorFeature const& featureValues, dip::Measurement::ValueType value) -> dip::LabelMap
Selects objects where the first element of featureValues is greater than value.
template<typename T>
auto operator>=(dip::DimensionArray const& lhs, dip::DimensionArray const& rhs) -> bool
Compares two arrays, returns true only if they have the same size and all lhs elements are larger or equal than all rhs elements.
template<typename T>
auto operator>=(dip::DimensionArray const& lhs, T const& rhs) -> dip::DimensionArray
Compares an array to a scalar, returns a boolean array.
auto operator>=(dip::Image::Pixel const& lhs, dip::Image::Pixel const& rhs) -> bool
Comparison operator, can only be true if the two pixels have compatible number of tensor elements.
template<typename T>
auto operator>=(dip::Image const& lhs, T const& rhs) -> dip::Image
Comparison operator, calls dip::NotLesser.
auto operator>=(dip::Measurement::IteratorFeature const& featureValues, dip::Measurement::ValueType value) -> dip::LabelMap
Selects objects where the first element of featureValues is not smaller than value.
auto operator^(dip::Image::Pixel const& lhs, dip::Image::Pixel const& rhs) -> dip::Image::Pixel
Bit-wise operator, element-wise.
template<typename T>
auto operator^(dip::Image const& lhs, T const& rhs) -> dip::Image
Bit-wise and logical operator, calls dip::Xor.
auto operator^(dip::LabelMap lhs, dip::LabelMap const& rhs) -> dip::LabelMap
Combines two maps using logical XOR. See operator^=.
template<typename T>
auto operator^=(dip::Image& lhs, T const& rhs) -> dip::Image&
Bit-wise compound assignment operator, calls dip::Xor. more...
auto operator|(dip::Image::Pixel const& lhs, dip::Image::Pixel const& rhs) -> dip::Image::Pixel
Bit-wise operator, element-wise.
template<typename T>
auto operator|(dip::Image const& lhs, T const& rhs) -> dip::Image
Bit-wise and logical operator, calls dip::Or.
auto operator|(dip::LabelMap lhs, dip::LabelMap const& rhs) -> dip::LabelMap
Combines two maps using logical OR. See operator|=.
template<typename T>
auto operator|=(dip::Image& lhs, T const& rhs) -> dip::Image&
Bit-wise compound assignment operator, calls dip::Or. more...
auto operator~(dip::Image::Pixel const& in) -> dip::Image::Pixel
Bit-wise unary operator operator.
auto operator~(dip::Image const& in) -> dip::Image
Bit-wise and logical unary operator, calls dip::Not.
auto operator~(dip::LabelMap rhs) -> dip::LabelMap
Applies logical NOT to the map. See dip::LabelMap::Negate.

Variables

dip::DataType const DT_BIN constexpr
Constant representing the type dip::bin.
dip::DataType const DT_COUNT constexpr
Data type of histogram bins. See dip::Histogram::CountType.
dip::DataType const DT_DCOMPLEX constexpr
Constant representing the type dip::dcomplex.
dip::DataType const DT_DFLOAT constexpr
Constant representing the type dip::dfloat.
dip::DataType const DT_LABEL = DT_UINT32 constexpr
Type currently used for all labeled images, see dip::LabelType.
dip::DataType const DT_SCOMPLEX constexpr
Constant representing the type dip::scomplex.
dip::DataType const DT_SFLOAT constexpr
Constant representing the type dip::sfloat.
dip::DataType const DT_SINT16 constexpr
Constant representing the type dip::sint16.
dip::DataType const DT_SINT32 constexpr
Constant representing the type dip::sint32.
dip::DataType const DT_SINT64 constexpr
Constant representing the type dip::sint64.
dip::DataType const DT_SINT8 constexpr
Constant representing the type dip::sint8.
dip::DataType const DT_UINT16 constexpr
Constant representing the type dip::uint16.
dip::DataType const DT_UINT32 constexpr
Constant representing the type dip::uint32.
dip::DataType const DT_UINT64 constexpr
Constant representing the type dip::uint64.
dip::DataType const DT_UINT8 constexpr
Constant representing the type dip::uint8.
dip::dfloat const infinity = std::numeric_limits::infinity() constexpr
Infinity.
dip::LibraryInformation const libraryInformation
Constant that holds information about the DIPlib binary.
dip::uint const maximumDFTSize
The largest size supported by dip::DFT and dip::FourierTransform. Is equal to 231-1 when using FFTW, 264-1 when using PocketFFT on a 64-bit system, or 232-1 when using PocketFFT on a 32-bit system.
dip::dfloat const nan = std::numeric_limits::quiet_NaN() constexpr
A NaN value.
dip::dfloat const pi = 3.14159265358979323846264338327950288 constexpr
The constant π.
bool const usingFFTW
Is true if dip::DFT and dip::RDFT use the FFTW library, or false if they use PocketFFT.