dip namespace

The dip namespace contains all the library functionality.

Namespaces

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

Classes

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

Aliases

using DataTypeArray = dip::DimensionArray
An array to hold data types
using DataSegment = std::shared_ptr<void>
A dip::Image holds a shared pointer to the data segment using this type.
using ImageArray = std::vector<Image>
An array of images
using ImageRefArray = std::vector<std::reference_wrapper<Image>>
An array of image references
using ImageConstRefArray = std::vector<std::reference_wrapper<const Image>>
An array of const image references
using PhysicalQuantityArray = dip::DimensionArray
An array to hold physical quantities, such as a pixel’s size.
template<typename T>
using ConstSampleIterator = dip::SampleIterator
A const iterator to iterate over samples in a tensor, or pixels on an image line.
using sint = std::ptrdiff_t
An integer type to be used for strides and similar measures.
using uint = std::size_t
An integer type to be used for sizes and the like.
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 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 sint8 = std::int8_t
Type for samples in an 8-bit signed integer image
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 sfloat = float
Type for samples in a 32-bit floating point (single-precision) image
using dfloat = double
Type for samples in a 64-bit floating point (double-precision) image
using scomplex = std::complex<sfloat>
Type for samples in a 64-bit complex-valued (single-precision) image
using dcomplex = std::complex<dfloat>
Type for samples in a 128-bit complex-valued (double-precision) image
using LabelType = dip::uint32
Type currently used for all labeled images, see dip::DT_LABEL.
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.
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 ComplexType = dip::detail::ComplexTypeCalculator
The type to use in calculations when a complex type is needed. Matches dip::DataType::SuggestComplex.
template<typename T>
using FlexType = dip::detail::FlexTypeCalculator
The type to use in calculations. Matches dip::DataType::SuggestFlex.
template<typename T>
using FlexBinType = dip::detail::FlexBinTypeCalculator
The type to use in calculations. Matches dip::DataType::SuggestFlexBin.
template<typename T>
using AbsType = dip::detail::AbsTypeCalculator
The type to use for the output of abs operations. Matches dip::DataType::SuggestAbs.
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 IntegerArray = dip::DimensionArray
An array to hold strides, filter sizes, etc.
using UnsignedArray = dip::DimensionArray
An array to hold dimensions, dimension lists, etc.
using FloatArray = dip::DimensionArray
An array to hold filter parameters.
using BooleanArray = dip::DimensionArray
An array used as a dimension selector.
using CoordinateArray = std::vector<UnsignedArray>
An array of pixel coordinates.
using FloatCoordinateArray = std::vector<FloatArray>
An array of subpixel coordinates.
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 RangeArray = dip::DimensionArray
An array of ranges
using SubpixelLocationArray = std::vector<SubpixelLocationResult>
Contains the result of the functions dip::SubpixelMaxima and dip::SubpixelMinima.
using IntervalArray = std::vector<Interval>
An array of intervals.
using BoundaryConditionArray = dip::DimensionArray
An array to hold boundary conditions.
using VertexFloat = dip::Vertex
A vertex with floating-point coordinates.
using VertexInteger = dip::Vertex
A vertex with integer coordinates
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.
using XYZ = std::array<dfloat, 3>
An XYZ triplet, used to specify a white point for color spaces.
using xy = std::array<dfloat, 2>
A color, as (x,y) chromaticity coordinates, 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.
using RadonCircleParametersArray = std::vector<RadonCircleParameters>
An array of dip::RadonCircleParameters, storing parameters for all hyperspheres detected by dip::RadonTransformCircles.
using InterpolationFunctionPointer = void(*)(Image, Image::Pixel, FloatArray)
Pointer to an interpolation function. Only use pointers returned by dip::PrepareResampleAtUnchecked.
template<typename T>
using ConstLineIterator = dip::LineIterator
A const iterator to iterate over all pixels of an image line.
template<typename T>
using ConstImageIterator = dip::ImageIterator
A const iterator to iterate over all pixels of an image, or all lines of an image.
using OneDimensionalFilterArray = std::vector<OneDimensionalFilter>
An array of 1D filters
using ObjectIdToIndexMap = tsl::robin_map<dip::uint, dip::uint>
Maps object IDs to object indices

Enums

enum class BoundaryCondition: uint8{ SYMMETRIC_MIRROR, DEFAULT, ASYMMETRIC_MIRROR, PERIODIC, ASYMMETRIC_PERIODIC, ADD_ZEROS, ADD_MAX_VALUE, ADD_MIN_VALUE, ZERO_ORDER_EXTRAPOLATE, FIRST_ORDER_EXTRAPOLATE, SECOND_ORDER_EXTRAPOLATE, THIRD_ORDER_EXTRAPOLATE, ALREADY_EXPANDED }
Enumerates various ways of extending image data beyond its boundary.

Functions

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.
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.
template<typename T>
auto SquareDistance(dip::DimensionArray const& v1, dip::DimensionArray const& v2) -> double
Computes the Square Euclidean distance between two points.
template<typename T>
auto Distance(dip::DimensionArray const& v1, dip::DimensionArray const& v2) -> double
Computes the Square Euclidean distance between two points.
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.
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.
auto Alias(dip::Image const& img1, dip::Image const& img2) -> bool
Calls img1.Aliases( img2 ). See dip::Image::Aliases.
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.
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.
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.
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 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.
void Convert(dip::Image const& src, dip::Image& dest, dip::DataType dt)
Copies samples over from src to dest, with data type conversion.
auto CreateImageRefArray(dip::ImageArray& imar) -> dip::ImageRefArray
Creates a dip::ImageRefArray from a dip::ImageArray.
auto CreateImageConstRefArray(dip::ImageArray const& imar) -> dip::ImageConstRefArray
Creates a dip::ImageConstRefArray from a dip::ImageArray.
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.
auto gcd(dip::uint a, dip::uint b) -> dip::uint constexpr
Compute the greatest common denominator of two positive integers.
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.
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.
template<typename T, typename <SFINAE>>
auto floor_cast(T v) -> dip::sint constexpr
Fast floor operation, without checks, returning a dip::sint.
template<typename T, typename <SFINAE>>
auto ceil_cast(T v) -> dip::sint constexpr
Fast ceil operation, without checks, returning a dip::sint.
template<typename T, typename <SFINAE>>
auto round_cast(T v) -> dip::sint
Fast round operation, without checks, returning a dip::sint.
template<typename T, bool inverse = false, typename <SFINAE>>
auto consistent_round(T v) -> dip::sint constexpr
Consistent rounding, without checks, returning a dip::sint.
template<typename T>
auto abs(T value) -> T constexpr
constexpr version of std::abs. Prefer std::abs outside of constexpr functions.
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.).
auto pow10(dip::sint power) -> dip::dfloat constexpr
Computes integer powers of 10, assuming the power is relatively small.
auto ApproximatelyEquals(dip::dfloat lhs, dip::dfloat rhs, dip::dfloat tolerance = 1e-6) -> bool constexpr
Approximate floating-point equality: abs(lhs-rhs)/lhs <= tolerance.
auto LengthUnicode(dip::String const& string) -> dip::uint
Counts the length of a (UTF-8 encoded) Unicode string.
auto BesselJ0(dip::dfloat x) -> dip::dfloat
Computes the Bessel function J of the order 0 (with around 7 digits of precision).
auto BesselJ1(dip::dfloat x) -> dip::dfloat
Computes the Bessel function J of the order 1 (with around 7 digits of precision).
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).
auto BesselY0(dip::dfloat x) -> dip::dfloat
Computes the Bessel function Y of the order 0 (with around 7 digits of precision).
auto BesselY1(dip::dfloat x) -> dip::dfloat
Computes the Bessel function Y of the order 1 (with around 7 digits of precision).
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).
auto Sinc(dip::dfloat x) -> dip::dfloat
Computes the sinc function.
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.
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 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.
void SymmetricEigenDecomposition2(dip::ConstSampleIterator input, dip::SampleIterator lambdas, dip::SampleIterator vectors = nullptr)
Finds the eigenvalues and eigenvectors of a 2x2 symmetric, real-valued matrix.
void SymmetricEigenDecomposition3(dip::ConstSampleIterator input, dip::SampleIterator lambdas, dip::SampleIterator vectors = nullptr)
Finds the eigenvalues and eigenvectors of a 3x3 symmetric, real-valued matrix.
void LargestEigenvector(dip::uint n, dip::ConstSampleIterator input, dip::SampleIterator vector)
Finds the largest eigenvector of a symmetric, real-valued matrix.
void SmallestEigenvector(dip::uint n, dip::ConstSampleIterator input, dip::SampleIterator vector)
Finds the smallest eigenvector of a 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.
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.
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.
template<typename T>
auto Sum(dip::uint n, dip::ConstSampleIterator input) -> T
Computes the sum of the values of a vector.
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.
template<typename T>
auto Product(dip::uint n, dip::ConstSampleIterator input) -> T
Computes the product of the values of a vector.
template<typename T>
auto Norm(dip::uint n, dip::ConstSampleIterator input) -> dip::FloatType
Computes the norm of a vector.
template<typename T>
auto SquareNorm(dip::uint n, dip::ConstSampleIterator input) -> dip::FloatType
Computes the square norm of a vector.
auto Determinant(dip::uint n, dip::ConstSampleIterator input) -> dip::dfloat
Computes the determinant of a square, real-valued matrix.
auto Determinant(dip::uint n, dip::ConstSampleIterator input) -> dip::dcomplex
Computes the determinant of a square, complex-valued matrix.
template<typename T>
auto DeterminantDiagonal(dip::uint n, dip::ConstSampleIterator input) -> T
Computes the determinant of a diagonal matrix.
template<typename T>
auto Trace(dip::uint n, dip::ConstSampleIterator input) -> T
Computes the trace of a square matrix.
template<typename T>
auto TraceDiagonal(dip::uint n, dip::ConstSampleIterator input) -> T
Computes the trace of a diagonal matrix.
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
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
void Inverse(dip::uint n, dip::ConstSampleIterator input, dip::SampleIterator output)
Computes the inverse of a square, real-valued matrix.
void Inverse(dip::uint n, dip::ConstSampleIterator input, dip::SampleIterator output)
Computes the inverse of a square, complex-valued matrix.
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.
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.
auto Rank(dip::uint m, dip::uint n, dip::ConstSampleIterator input) -> dip::uint
Computes the rank of a real-valued matrix.
auto Rank(dip::uint m, dip::uint n, dip::ConstSampleIterator input) -> dip::uint
Computes the rank of a complex-valued matrix.
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.
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.
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.
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.
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.
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.
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.
void Divide(dip::Image const& lhs, dip::Image const& rhs, dip::Image& out, dip::DataType dt)
Divides two images, sample-wise, with singleton expansion.
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.
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.
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.
void Invert(dip::Image const& in, dip::Image& out)
Inverts each sample of the input image, yielding an image of the same type.
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.
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.
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.
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.
void Equal(dip::Image const& lhs, dip::Image const& rhs, dip::Image& out)
Equality comparison, sample-wise, with singleton expansion.
void NotEqual(dip::Image const& lhs, dip::Image const& rhs, dip::Image& out)
Inequality comparison, sample-wise, with singleton expansion.
void Lesser(dip::Image const& lhs, dip::Image const& rhs, dip::Image& out)
Inequality comparison, sample-wise, with singleton expansion.
void Greater(dip::Image const& lhs, dip::Image const& rhs, dip::Image& out)
Inequality comparison, sample-wise, with singleton expansion.
void NotGreater(dip::Image const& lhs, dip::Image const& rhs, dip::Image& out)
Inequality comparison, sample-wise, with singleton expansion.
void NotLesser(dip::Image const& lhs, dip::Image const& rhs, dip::Image& out)
Inequality comparison, sample-wise, with singleton expansion.
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.
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.
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.
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)
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.
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.
auto StringCompareCaseInsensitive(dip::String const& string1, dip::String const& string2) -> bool
A case-insensitive string comparison, use only with ASCII characters!
void ToLowerCase(dip::String& string)
Convert a string to lower case, use only with ASCII characters!
void ToUpperCase(dip::String& string)
Convert a string to upper case, use only with ASCII characters!
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.
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
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
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
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
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.
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.
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.
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.
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.
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
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.
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.
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.
void StructureTensorAnalysis(dip::Image const& in, dip::ImageRefArray& out, dip::StringArray const& outputs)
Interface to dip::StructureTensorAnalysis2D and dip::StructureTensorAnalysis3D.
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.
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.
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.
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
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.
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.
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.
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.
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.
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 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.
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.
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.
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
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.
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.
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.
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.
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.
void IsotropicDilation(dip::Image const& in, dip::Image& out, dip::dfloat distance)
Isotropic dilation of binary image.
void IsotropicErosion(dip::Image const& in, dip::Image& out, dip::dfloat distance)
Isotropic erosion of binary image.
void IsotropicClosing(dip::Image const& in, dip::Image& out, dip::dfloat distance)
Isotropic closing of binary image.
void IsotropicOpening(dip::Image const& in, dip::Image& out, dip::dfloat distance)
Isotropic opening of binary image.
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.
void EdgeObjectsRemove(dip::Image const& c_in, dip::Image& out, dip::uint connectivity = 1)
Remove edge objects from a binary or labeled image.
void FillHoles(dip::Image const& in, dip::Image& out, dip::uint connectivity = 1)
Fill holes in binary image.
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).
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).
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
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 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).
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.
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.
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 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.
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.
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 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 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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
auto HomotopicThinningInterval2D(dip::uint connectivity = 2) -> dip::IntervalArray
Returns a 2D interval array for homotopic thinning.
auto HomotopicThickeningInterval2D(dip::uint connectivity = 2) -> dip::IntervalArray
Returns a 2D interval array for homotopic thickening.
auto EndPixelInterval2D(dip::uint connectivity = 2) -> dip::IntervalArray
Returns an interval array for detecting end pixels. Includes isolated pixels.
auto HomotopicEndPixelInterval2D(dip::uint connectivity = 2) -> dip::IntervalArray
Returns an interval array for detecting end pixels. Excludes isolated pixels
auto HomotopicInverseEndPixelInterval2D(dip::uint connectivity = 2) -> dip::IntervalArray
Returns an interval array for detecting end background pixels. Excludes isolated pixels.
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.
auto BranchPixelInterval2D() -> dip::IntervalArray
Returns a 2D interval array for detecting branch pixels.
auto BoundaryPixelInterval2D() -> dip::Interval
Returns a 2D interval for detecting boundary pixels.
auto ConvexHullInterval2D() -> dip::IntervalArray
Returns a 2D interval array to thicken to a convex hull.
auto StringToBoundaryCondition(dip::String const& bc) -> dip::BoundaryCondition
Convert a string to a boundary condition.
auto StringArrayToBoundaryConditionArray(dip::StringArray const& bc) -> dip::BoundaryConditionArray
Convert an array of strings to an array of boundary conditions.
void BoundaryArrayUseParameter(dip::BoundaryConditionArray& bc, dip::uint nDims)
Check the length of a BoundaryConditionArray, and extend it if necessary and possible.
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.
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.
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.
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.
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.
void ExtendRegion(dip::Image& image, dip::RangeArray ranges, dip::BoundaryConditionArray boundaryConditions = {})
Fills the pixels outside a region in the image using a boundary condition.
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.
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.
template<typename T>
auto Norm(dip::Vertex const& v) -> dip::dfloat
The norm of the vector v.
template<typename T>
auto NormSquare(dip::Vertex const& v) -> dip::dfloat
The square of the norm of the vector v.
template<typename T>
auto Distance(dip::Vertex const& v1, dip::Vertex const& v2) -> dip::dfloat
The norm of the vector v2-v1.
template<typename T>
auto DistanceSquare(dip::Vertex const& v1, dip::Vertex const& v2) -> dip::dfloat
The square norm of the vector v2-v1.
template<typename T>
auto Angle(dip::Vertex const& v1, dip::Vertex const& v2) -> dip::dfloat
The angle of the vector v2-v1.
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.
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.
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 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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
auto PointDistanceDistribution(dip::Image const& in, dip::CoordinateArray const& points, dip::UnsignedArray range = {}) -> dip::Distribution
Compute distance distribution for a set of points.
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.
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.
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
void ShiTomasiCornerDetector(dip::Image const& in, dip::Image& out, dip::FloatArray const& sigmas = {2.0}, dip::StringArray const& boundaryCondition = {})
Shi-Tomasi corner detector
void NobleCornerDetector(dip::Image const& in, dip::Image& out, dip::FloatArray const& sigmas = {2.0}, dip::StringArray const& boundaryCondition = {})
Noble’s corner detector
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
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)
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
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
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
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.
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 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.
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.
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.
void EuclideanDistanceTransform(dip::Image const& in, dip::Image& out, dip::String const& border = S::BACKGROUND, dip::String const& method = S::SEPARABLE)
Euclidean distance transform
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
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
void GeodesicDistanceTransform(dip::Image const& marker, dip::Image const& condition, dip::Image& out)
Geodesic distance transform
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.
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.
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.
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 ImageIsICS(dip::String const& filename) -> bool
Returns true if the file filename is an ICS file.
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.
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.
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.
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.
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.
auto ImageIsTIFF(dip::String const& filename) -> bool
Returns true if the file filename is a TIFF file.
void ImageWriteTIFF(dip::Image const& image, dip::String const& filename, dip::String const& compression = "", dip::uint jpegLevel = 80)
Writes image as a TIFF file.
auto ImageReadJPEG(dip::Image& out, dip::String const& filename) -> dip::FileInformation
Reads an image from the JPEG file filename and puts it in out.
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 ImageIsJPEG(dip::String const& filename) -> bool
Returns true if the file filename is a JPEG file.
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.
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.
void ImageWriteJPEG(dip::Image const& image, dip::String const& filename, dip::uint jpegLevel = 80)
Writes image as a JPEG file.
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.
auto ImageReadPNG(dip::Image& out, dip::String const& filename) -> dip::FileInformation
Reads an image from the PNG file filename and puts it in out.
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 ImageIsPNG(dip::String const& filename) -> bool
Returns true if the file filename is a PNG file.
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.
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.
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.
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.
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.
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 ImageIsNPY(dip::String const& filename) -> bool
Returns true if the file filename is a NPY file.
void ImageWriteNPY(dip::Image const& image, dip::String const& filename)
Writes image as a numeric array to a NumPy NPY file.
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.
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 FileCompareExtension(dip::String const& filename, dip::String const& extension) -> bool
Returns true if the file name has the given extension.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
void FillDelta(dip::Image& out, dip::String const& origin = "")
Fills an image with a delta function.
void CreateDelta(dip::Image& out, dip::UnsignedArray const& sizes, dip::String const& origin = "")
Creates a delta function image.
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 CreateGauss(dip::Image& out, dip::FloatArray const& sigmas, dip::UnsignedArray derivativeOrder = {0}, dip::dfloat truncation = 3.0, dip::UnsignedArray exponents = {0})
Creates a Gaussian kernel.
void CreateGabor(dip::Image& out, dip::FloatArray const& sigmas, dip::FloatArray const& frequencies, dip::dfloat truncation = 3.0)
Creates a Gabor kernel.
void FTEllipsoid(dip::Image& out, dip::FloatArray radius = {1}, dip::dfloat amplitude = 1)
Generates the Fourier transform of an ellipsoid.
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 FTBox(dip::Image& out, dip::FloatArray length = {1}, dip::dfloat amplitude = 1)
Generates the Fourier transform of a box.
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.
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 FTGaussian(dip::Image& out, dip::FloatArray sigma, dip::dfloat amplitude = 1, dip::dfloat truncation = 3)
Generates the Fourier transform of a Gaussian.
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 TestObject(dip::Image& out, dip::TestObjectParams const& params, dip::Random& random)
Generates a test object according to params.
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 FillPoissonPointProcess(dip::Image& out, dip::Random& random, dip::dfloat density = 0.01)
Fills the binary image out with a Poisson point process of density.
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.
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.
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.
void FillRamp(dip::Image& out, dip::uint dimension, dip::StringSet const& mode = {})
Fills an image with a ramp function.
void CreateRamp(dip::Image& out, dip::UnsignedArray const& sizes, dip::uint dimension, dip::StringSet const& mode = {})
Creates a ramp function image.
void FillXCoordinate(dip::Image& out, dip::StringSet const& mode = {})
Fills an image with a ramp function that increases along the x-axis.
void CreateXCoordinate(dip::Image& out, dip::UnsignedArray const& sizes, dip::StringSet const& mode = {})
Creates a ramp function image.
void FillYCoordinate(dip::Image& out, dip::StringSet const& mode = {})
Fills an image with a ramp function that increases along the y-axis.
void CreateYCoordinate(dip::Image& out, dip::UnsignedArray const& sizes, dip::StringSet const& mode = {})
Creates a ramp function image.
void FillZCoordinate(dip::Image& out, dip::StringSet const& mode = {})
Fills an image with a ramp function that increases along the z-axis.
void CreateZCoordinate(dip::Image& out, dip::UnsignedArray const& sizes, dip::StringSet const& mode = {})
Creates a ramp function image.
void FillRadiusCoordinate(dip::Image& out, dip::StringSet const& mode = {})
Fills an image with the distance to the origin.
void CreateRadiusCoordinate(dip::Image& out, dip::UnsignedArray const& sizes, dip::StringSet const& mode = {})
Creates an image filled with the distance to the origin.
void FillRadiusSquareCoordinate(dip::Image& out, dip::StringSet const& mode = {})
Fills an image with the square distance to the origin.
void CreateRadiusSquareCoordinate(dip::Image& out, dip::UnsignedArray const& sizes, dip::StringSet const& mode = {})
Creates an image filled with the square distance to the origin.
void FillPhiCoordinate(dip::Image& out, dip::StringSet const& mode = {})
Fills an image with the angle to the x-axis within the x-y plane.
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.
void FillThetaCoordinate(dip::Image& out, dip::StringSet const& mode = {})
Fills an image with the angle to the z-axis.
void CreateThetaCoordinate(dip::Image& out, dip::UnsignedArray const& sizes, dip::StringSet const& mode = {})
Creates an image filled with the angle to the z-axis.
void FillCoordinates(dip::Image& out, dip::StringSet const& mode = {}, dip::String const& system = S::CARTESIAN)
Fills an image with the coordinates of each pixel.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
void Subsampling(dip::Image const& in, dip::Image& out, dip::UnsignedArray const& sample)
Subsamples the input image.
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.
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
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.
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.
auto PrepareResampleAtUnchecked(dip::Image const& in, dip::String const& interpolationMethod) -> dip::InterpolationFunctionPointer
Prepare for repeated calls to dip::ResampleAtUnchecked. See dip::ResampleAt.
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 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.
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
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
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.
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
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
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
void RotationMatrix2D(dip::Image& out, dip::dfloat angle)
Creates a 0D (one pixel) 2x2 matrix image containing a 2D rotation matrix.
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.
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.
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.
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
void LogPolarTransform2D(dip::Image const& in, dip::Image& out, dip::String const& interpolationMethod = S::LINEAR)
Computes the log-polar transform of the 2D image.
void Tile(dip::ImageConstRefArray const& in, dip::Image& out, dip::UnsignedArray tiling = {})
Tiles a set of images to form a single image.
void TileTensorElements(dip::Image const& in, dip::Image& out)
Tiles the tensor elements of in to produce a scalar image
void Concatenate(dip::ImageConstRefArray const& in, dip::Image& out, dip::uint dimension = 0)
Concatenates a set of images along one dimension.
void Concatenate(dip::Image const& in1, dip::Image const& in2, dip::Image& out, dip::uint dimension = 0)
Concatenates two images.
void JoinChannels(dip::ImageConstRefArray const& in, dip::Image& out)
Concatenates a set of scalar images along the tensor dimension.
auto SplitChannels(dip::Image const& in) -> dip::ImageArray
Splits the tensor elements of a tensor image into individual images.
auto CumulativeHistogram(dip::Histogram const& in) -> dip::Histogram
Computes a cumulative histogram from in. See dip::Histogram::Cumulative.
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.
auto Mean(dip::Histogram const& in) -> dip::FloatArray
Computes the mean value of the data represented by the histogram.
auto Covariance(dip::Histogram const& in) -> dip::FloatArray
Computes the covariance matrix of the data represented by the histogram.
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.
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 Mode(dip::Histogram const& in) -> dip::FloatArray
Returns the mode, the bin with the largest count.
auto PearsonCorrelation(dip::Histogram const& in) -> dip::dfloat
Computes the Pearson correlation coefficient between two images from their joint histogram in.
auto Regression(dip::Histogram const& in) -> dip::RegressionParameters
Fits a line through the histogram. Returns the slope and intercept of the regression line.
auto MutualInformation(dip::Histogram const& in) -> dip::dfloat
Calculates the mutual information, in bits, between two images from their joint histogram in.
auto Entropy(dip::Histogram const& in) -> dip::dfloat
Calculates the entropy, in bits, of an image from its histogram in.
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.
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.
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.
auto MinimumErrorThreshold(dip::Histogram const& in) -> dip::dfloat
Determines a threshold using the minimal error method method, and the image’s histogram in.
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.
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.
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.
auto KMeansClustering(dip::Histogram const& in, dip::uint nClusters = 2) -> dip::Histogram
Partitions a (multi-dimensional) histogram into nClusters partitions using k-means clustering.
auto MinimumVariancePartitioning(dip::Histogram const& in, dip::uint nClusters = 2) -> dip::Histogram
Partitions a (multi-dimensional) histogram into nClusters partitions iteratively using Otsu thresholding along individual dimensions.
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).
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.
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.
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.
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.
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.
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.
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).
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.
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
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
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
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
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
void SobelGradient(dip::Image const& in, dip::Image& out, dip::uint dimension = 0, dip::StringArray const& boundaryCondition = {})
The Sobel derivative filter
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
void Dx(dip::Image const& in, dip::Image& out, dip::FloatArray sigmas = {1.0})
Computes the first derivative along x, 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 Dz(dip::Image const& in, dip::Image& out, dip::FloatArray sigmas = {1.0})
Computes the first derivative along z, 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 Dyy(dip::Image const& in, dip::Image& out, dip::FloatArray sigmas = {1.0})
Computes the second derivative along y, 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 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 Dyz(dip::Image const& in, dip::Image& out, dip::FloatArray sigmas = {1.0})
Computes the first derivative along y and y, see dip::Derivative.
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.
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 )).
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 )).
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.
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.
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.
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.
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.
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.
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.
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.
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.
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
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
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
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
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.
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.
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
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.
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 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 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.
void Zero(dip::Image const& in, dip::Image& out, dip::dfloat threshold = 128.0)
Zeros the sample values in in that are below threshold.
void Shrinkage(dip::Image const& in, dip::Image& out, dip::dfloat threshold = 128.0)
Shrinkage function, also known as soft threshold.
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.
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.
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.
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.
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.
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.
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.
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 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 Reciprocal(dip::Image const& in, dip::Image& out)
Computes the reciprocal of each sample: out = in == 0 ? 0 : 1/in.
void Square(dip::Image const& in, dip::Image& out)
Computes the square of each sample.
void Sqrt(dip::Image const& in, dip::Image& out)
Computes the square root of each sample.
void Exp(dip::Image const& in, dip::Image& out)
Computes the base e exponent (natural exponential) of each sample.
void Exp2(dip::Image const& in, dip::Image& out)
Computes the base 2 exponent of each sample.
void Exp10(dip::Image const& in, dip::Image& out)
Computes the base 10 exponent of each sample.
void Ln(dip::Image const& in, dip::Image& out)
Computes the natural logarithm (base e logarithm) of each sample.
void Log2(dip::Image const& in, dip::Image& out)
Computes the base 2 logarithm of each sample.
void Log10(dip::Image const& in, dip::Image& out)
Computes the base 10 logarithm of each sample.
void Sin(dip::Image const& in, dip::Image& out)
Computes the sine of each sample.
void Cos(dip::Image const& in, dip::Image& out)
Computes the cosine of each sample.
void Tan(dip::Image const& in, dip::Image& out)
Computes the tangent of each sample.
void Asin(dip::Image const& in, dip::Image& out)
Computes the arc sine of each sample.
void Acos(dip::Image const& in, dip::Image& out)
Computes the arc cosine of each sample.
void Atan(dip::Image const& in, dip::Image& out)
Computes the arc tangent of each sample.
void Sinh(dip::Image const& in, dip::Image& out)
Computes the hyperbolic sine of each sample.
void Cosh(dip::Image const& in, dip::Image& out)
Computes the hyperbolic cosine of each sample.
void Tanh(dip::Image const& in, dip::Image& out)
Computes the hyperbolic tangent of each sample.
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.
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.
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.
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.
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.
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 LnGamma(dip::Image const& in, dip::Image& out)
Computes the natural logarithm of the gamma function of each sample.
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 Sinc(dip::Image const& in, dip::Image& out)
Computes the sinc function of each sample. \(\mathrm{sinc}(x) = \sin(x)/x\) .
void IsNotANumber(dip::Image const& in, dip::Image& out)
True for each pixel that is NaN.
void IsInfinite(dip::Image const& in, dip::Image& out)
True for each pixel that is positive or negative infinity.
void IsFinite(dip::Image const& in, dip::Image& out)
True for each pixel that is not NaN nor infinity.
void Abs(dip::Image const& in, dip::Image& out)
Computes the absolute value of each sample.
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.
void SquareModulus(dip::Image const& in, dip::Image& out)
Computes the square of the modulus of each sample.
void Phase(dip::Image const& in, dip::Image& out)
Computes the phase (angle on complex plane, through std::arg) of each sample.
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.
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 Conjugate(dip::Image const& in, dip::Image& out)
Computes the complex conjugate of each sample.
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 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 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 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.
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 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.
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,
void Atan2(dip::Image const& y, dip::Image const& x, dip::Image& out)
Computes the four-quadrant arc tangent of y/x.
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.
auto Transpose(dip::Image const& in) -> dip::Image
Transposes the tensor image, the data are not copied.
void ConjugateTranspose(dip::Image const& in, dip::Image& out)
Computes the conjugate transpose of the tensor image in.
void DotProduct(dip::Image const& lhs, dip::Image const& rhs, dip::Image& out)
Computes the dot product (inner product) of two vector images.
void CrossProduct(dip::Image const& lhs, dip::Image const& rhs, dip::Image& out)
Computes the cross product (inner product) of two vector images.
void Norm(dip::Image const& in, dip::Image& out)
Computes the norm of the vector at each pixel in image in.
void SquareNorm(dip::Image const& in, dip::Image& out)
Computes the square of the norm of the vector at each pixel in image in.
void Angle(dip::Image const& in, dip::Image& out)
Computes the angle of the vector at each pixel in image in.
void Orientation(dip::Image const& in, dip::Image& out)
Computes the orientation of the vector at each pixel in image in.
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.
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.
void Determinant(dip::Image const& in, dip::Image& out)
Computes the determinant of the square matrix at each pixel in image in.
void Trace(dip::Image const& in, dip::Image& out)
Computes the trace of the square matrix at each pixel in image in.
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 Eigenvalues(dip::Image const& in, dip::Image& out)
Computes the eigenvalues of the square matrix at each pixel in image in.
void LargestEigenvalue(dip::Image const& in, dip::Image& out)
Finds the largest eigenvalue of the square matrix at each pixel in image in.
void SmallestEigenvalue(dip::Image const& in, dip::Image& out)
Finds the smallest eigenvalue of the square matrix at each pixel in image in.
void EigenDecomposition(dip::Image const& in, dip::Image& out, dip::Image& eigenvectors)
Computes the eigenvalues and eigenvectors of the square matrix at each pixel in image in.
void LargestEigenvector(dip::Image const& in, dip::Image& out)
Finds the largest eigenvector of the symmetric matrix at each pixel in image in.
void SmallestEigenvector(dip::Image const& in, dip::Image& out)
Finds the smallest eigenvector of the symmetric matrix at each pixel in image in.
void Inverse(dip::Image const& in, dip::Image& out)
Computes the inverse of the square matrix at each pixel in image in.
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.
void SingularValues(dip::Image const& in, dip::Image& out)
Computes the “thin” singular value decomposition of the matrix at each pixel in image in.
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.
void Identity(dip::Image const& in, dip::Image& out)
Creates an image whose pixels are identity matrices.
void SumTensorElements(dip::Image const& in, dip::Image& out)
Adds all tensor elements, producing a scalar image.
void ProductTensorElements(dip::Image const& in, dip::Image& out)
Multiplies all tensor elements, producing a scalar image.
void AllTensorElements(dip::Image const& in, dip::Image& out)
Determines if all tensor elements are non-zero, producing a binary scalar image.
void AnyTensorElement(dip::Image const& in, dip::Image& out)
Determines if any tensor element is non-zero, producing a binary scalar image.
void MaximumTensorElement(dip::Image const& in, dip::Image& out)
Takes the maximum tensor element at each pixel, producing a scalar image.
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.
void MinimumTensorElement(dip::Image const& in, dip::Image& out)
Takes the minimum tensor element at each pixel, producing a scalar image.
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.
void MeanTensorElement(dip::Image const& in, dip::Image& out)
Computes the mean tensor element value at each pixel, producing a scalar image.
void GeometricMeanTensorElement(dip::Image const& in, dip::Image& out)
Computes the geometric mean tensor element value at each pixel, producing a scalar image.
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.
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.
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.
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.
void ObjectToMeasurement(dip::Image const& label, dip::Image& out, dip::Measurement::IteratorFeature const& featureValues)
Paints each object with the selected measurement feature values.
void MeasurementWriteCSV(dip::Measurement const& measurement, dip::String const& filename, dip::StringSet const& options = {})
Writes a dip::Measurement structure to a CSV file.
auto Minimum(dip::Measurement::IteratorFeature const& featureValues) -> dip::Measurement::ValueType
Returns the smallest feature value in the first column of featureValues.
auto Maximum(dip::Measurement::IteratorFeature const& featureValues) -> dip::Measurement::ValueType
Returns the largest feature value in the first column of featureValues.
auto Percentile(dip::Measurement::IteratorFeature const& featureValues, dip::dfloat percentile) -> dip::Measurement::ValueType
Returns the percentile feature value in the first column of featureValues.
auto Median(dip::Measurement::IteratorFeature const& featureValues) -> dip::dfloat
Returns the median feature value in the first column of featureValues.
auto Mean(dip::Measurement::IteratorFeature const& featureValues) -> dip::dfloat
Returns the mean feature value in the first column of featureValues.
auto MaximumAndMinimum(dip::Measurement::IteratorFeature const& featureValues) -> dip::MinMaxAccumulator
Returns the maximum and minimum feature values in the first column of featureValues.
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.
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.
auto ObjectMinimum(dip::Measurement::IteratorFeature const& featureValues) -> dip::uint
Returns the object ID with the smallest feature value in the first column of featureValues.
auto ObjectMaximum(dip::Measurement::IteratorFeature const& featureValues) -> dip::uint
Returns the object ID with the largest feature value in the first column of featureValues.
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
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
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.
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)
auto MandersOverlapCoefficient(dip::Image const& channel1, dip::Image const& channel2, dip::Image const& mask = {}) -> dip::dfloat
Computes the Manders Overlap Coefficient.
auto IntensityCorrelationQuotient(dip::Image const& channel1, dip::Image const& channel2, dip::Image const& mask = {}) -> dip::dfloat
Computes Li’s Intensity Correlation Quotient.
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.
auto CostesColocalizationCoefficients(dip::Image const& channel1, dip::Image const& channel2, dip::Image const& mask = {}) -> dip::ColocalizationCoefficients
Computes Costes’ colocalization coefficients.
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
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.
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)
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)
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
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
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
void Dilation(dip::Image const& in, dip::Image& out, dip::StructuringElement const& se = {}, dip::StringArray const& boundaryCondition = {})
Applies the dilation.
void Erosion(dip::Image const& in, dip::Image& out, dip::StructuringElement const& se = {}, dip::StringArray const& boundaryCondition = {})
Applies the erosion with a standard structuring element.
void Closing(dip::Image const& in, dip::Image& out, dip::StructuringElement const& se = {}, dip::StringArray const& boundaryCondition = {})
Applies the closing with a standard structuring element.
void Opening(dip::Image const& in, dip::Image& out, dip::StructuringElement const& se = {}, dip::StringArray const& boundaryCondition = {})
Applies the opening with a standard structuring element.
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
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
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
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
void MorphologicalGradientMagnitude(dip::Image const& in, dip::Image& out, dip::StructuringElement const& se = {}, dip::StringArray const& boundaryCondition = {})
The morphological version of the gradient magnitude
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
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
void MorphologicalSharpening(dip::Image const& in, dip::Image& out, dip::StructuringElement const& se = {}, dip::StringArray const& boundaryCondition = {})
A morphological sharpening filter
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
void MorphologicalLaplace(dip::Image const& in, dip::Image& out, dip::StructuringElement const& se = {}, dip::StringArray const& boundaryCondition = {})
The morphological version of the Laplace operator
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
void Minima(dip::Image const& in, dip::Image& out, dip::uint connectivity = 0, dip::String const& output = S::BINARY)
Marks local minima.
void Maxima(dip::Image const& in, dip::Image& out, dip::uint connectivity = 0, dip::String const& output = S::BINARY)
Marks local maxima.
void UpperSkeleton2D(dip::Image const& in, dip::Image const& mask, dip::Image& out, dip::String const& endPixelCondition = S::NATURAL)
Grey-value skeleton (2D only).
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
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.
void HMinima(dip::Image const& in, dip::Image& out, dip::dfloat h, dip::uint connectivity = 0)
Computes the H-Minima filtered image
void HMaxima(dip::Image const& in, dip::Image& out, dip::dfloat h, dip::uint connectivity = 0)
Computes the H-Maxima filtered image
void ImposeMinima(dip::Image const& in, dip::Image const& marker, dip::Image& out, dip::uint connectivity = 0)
Impose minima.
void Leveling(dip::Image const& in, dip::Image const& marker, dip::Image& out, dip::uint connectivity = 0)
The leveling of in imposed by marker.
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.
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 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.
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 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
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.
void OpeningByReconstruction(dip::Image const& in, dip::Image& out, dip::StructuringElement const& se = {}, dip::uint connectivity = 0, dip::StringArray const& boundaryCondition = {})
Opening by reconstruction
void ClosingByReconstruction(dip::Image const& in, dip::Image& out, dip::StructuringElement const& se = {}, dip::uint connectivity = 0, dip::StringArray const& boundaryCondition = {})
Closing by reconstruction
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
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.
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.
void SetNumberOfThreads(dip::uint nThreads)
Sets the maximum number of threads to be using in computations.
auto GetNumberOfThreads() -> dip::uint
Gets the maximum number of threads that can be used in computations.
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.
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.
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.
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.
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.
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.
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.
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
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
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
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
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.
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.
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
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
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
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
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
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.
void Relabel(dip::Image const& label, dip::Image& out)
Re-assigns labels to objects in a labeled image, such that all labels are consecutive.
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.
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.
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.
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.
void SplitRegions(dip::Image const& label, dip::Image& out, dip::uint connectivity = 0)
Ensures a gap between regions with unequal labels.
void MakeRegionsConvex2D(dip::Image const& label, dip::Image& out, dip::String const& mode = S::FILLED)
Make each object a single, convex shape.
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.
auto RegionAdjacencyGraph(dip::Image const& labels, dip::String const& mode = "touching") -> dip::Graph
Construct a graph for the given labeled image.
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.
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_sub(T lhs, T rhs) -> T constexpr
Subtracts two values using saturated arithmetic.
template<typename T, <SFINAE> = 0>
auto saturated_mul(T lhs, T rhs) -> T constexpr
Multiplies 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>
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_inv(T v) -> T constexpr
Inverts a value using saturated arithmetic. This is the same as negation, but not for unsigned values.
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.
auto KMeansClustering(dip::Image const& in, dip::Image& out, dip::uint nClusters = 2) -> dip::CoordinateArray
Like above, using a default-initialized dip::Random object.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
void HysteresisThreshold(dip::Image const& in, dip::Image& out, dip::dfloat lowThreshold, dip::dfloat highThreshold)
Hysteresis threshold.
void MultipleThresholds(dip::Image const& in, dip::Image& out, dip::FloatArray const& thresholds)
Thresholds an image at multiple values, yielding a labeled image.
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.
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.
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
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)
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.
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.
void ImageWrite(dip::Image const& image, dip::String const& filename, dip::String format = "", dip::String const& compression = "")
Writes image to file.
auto Count(dip::Image const& in, dip::Image const& mask = {}) -> dip::uint
Counts the number of non-zero pixels in a scalar image.
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.
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.
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.
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.
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.
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.
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.
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 SpearmanRankCorrelation(dip::Image const& in1, dip::Image const& in2, dip::Image const& mask = {}) -> dip::dfloat
Computes the Spearman rank correlation coefficient.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
void MedianAbsoluteDeviation(dip::Image const& in, dip::Image const& mask, dip::Image& out, dip::BooleanArray const& process = {})
Computes the median absolute deviation (MAD)
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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)
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.
auto SpatialOverlap(dip::Image const& in, dip::Image const& reference) -> dip::SpatialOverlapMetrics
Compares a segmentation result in to the ground truth reference.
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.
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.
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.
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.
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.
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.
auto HausdorffDistance(dip::Image const& in, dip::Image const& reference) -> dip::dfloat
Computes the Hausdorff distance between two binary images.
auto ModifiedHausdorffDistance(dip::Image const& in, dip::Image const& reference) -> dip::dfloat
Computes the modified Hausdorff distance between two binary images.
auto SumOfMinimalDistances(dip::Image const& in, dip::Image const& reference) -> dip::dfloat
Computes the sum of minimal distances (SMD) between two binary images.
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.
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.
auto EstimateNoiseVariance(dip::Image const& in, dip::Image const& mask = {}) -> dip::dfloat
Estimates the variance of white Gaussian noise in an image.
void FourierTransform(dip::Image const& in, dip::Image& out, dip::StringSet const& options = {}, dip::BooleanArray process = {})
Computes the forward and inverse Fourier Transform
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.
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.
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.
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).
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.

Operators

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==(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, 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, 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, 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, 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, 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.
template<typename T>
auto operator!=(dip::DimensionArray const& lhs, T const& rhs) -> dip::DimensionArray
Compares an array to a scalar, returns a boolean array.
template<typename T>
auto operator>(dip::DimensionArray const& lhs, T const& rhs) -> dip::DimensionArray
Compares an array to a scalar, returns a boolean array.
template<typename T>
auto operator<(dip::DimensionArray const& lhs, T const& rhs) -> dip::DimensionArray
Compares an array to a scalar, returns a boolean array.
template<typename T>
auto operator>=(dip::DimensionArray const& lhs, T const& rhs) -> dip::DimensionArray
Compares an array to a scalar, returns a boolean array.
template<typename T>
auto operator<=(dip::DimensionArray const& lhs, T const& rhs) -> dip::DimensionArray
Compares an array to a scalar, returns a boolean array.
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+(dip::Image::Pixel const& lhs, dip::Image::Pixel const& rhs) -> dip::Image::Pixel
Arithmetic operator, element-wise.
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& lhs, dip::Image::Pixel const& rhs) -> dip::Image::Pixel
Arithmetic operator, tensor multiplication.
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& lhs, dip::Image::Pixel const& rhs) -> dip::Image::Pixel
Arithmetic operator, element-wise.
auto operator&(dip::Image::Pixel const& lhs, dip::Image::Pixel const& rhs) -> dip::Image::Pixel
Bit-wise operator, element-wise.
auto operator|(dip::Image::Pixel const& lhs, dip::Image::Pixel const& rhs) -> dip::Image::Pixel
Bit-wise operator, element-wise.
auto operator^(dip::Image::Pixel const& lhs, dip::Image::Pixel const& rhs) -> dip::Image::Pixel
Bit-wise operator, element-wise.
auto operator-(dip::Image::Pixel const& in) -> dip::Image::Pixel
Unary operator, element-wise.
auto operator~(dip::Image::Pixel const& in) -> dip::Image::Pixel
Bit-wise unary operator operator.
auto operator!(dip::Image::Pixel const& in) -> dip::Image::Pixel
Boolean unary operator, element-wise.
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, typename <SFINAE>>
auto operator!=(dip::Image::Pixel const& lhs, T const& rhs) -> bool
Comparison operator, equivalent to !(lhs==rhs).
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.
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.
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.
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.
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:”.
template<typename T1, typename T2, typename <SFINAE> = T1>
auto operator+(T1 const& lhs, T2 const& rhs) -> dip::Image
Arithmetic operator, calls dip::Add.
template<typename T1, typename T2, typename <SFINAE> = T1>
auto operator-(T1 const& lhs, T2 const& rhs) -> dip::Image
Arithmetic operator, calls dip::Subtract.
template<typename T1, typename T2, typename <SFINAE> = T1>
auto operator*(T1 const& lhs, T2 const& rhs) -> dip::Image
Arithmetic operator, calls dip::Multiply.
template<typename T1, typename T2, typename <SFINAE> = T1>
auto operator/(T1 const& lhs, T2 const& rhs) -> dip::Image
Arithmetic operator, calls dip::Divide.
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 const& lhs, T const& rhs) -> dip::Image
Bit-wise and logical operator, calls dip::And.
template<typename T>
auto operator|(dip::Image const& lhs, T const& rhs) -> dip::Image
Bit-wise and logical operator, calls dip::Or.
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::Image const& in) -> dip::Image
Unary operator, converts binary image to dip::DT_UINT, leaves other images unchanged.
auto operator-(dip::Image const& in) -> dip::Image
Unary operator, calls dip::Invert.
auto operator~(dip::Image const& in) -> dip::Image
Bit-wise and logical unary operator, calls dip::Not.
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::Image& lhs, T const& rhs) -> dip::Image&
Compound assignment operator, calls dip::Add.
template<typename T>
auto operator-=(dip::Image& lhs, T const& rhs) -> dip::Image&
Compound assignment operator, calls dip::Subtract.
template<typename T>
auto operator*=(dip::Image& lhs, T const& rhs) -> dip::Image&
Compound assignment operator, calls dip::Multiply.
template<typename T>
auto operator/=(dip::Image& lhs, T const& rhs) -> dip::Image&
Compound assignment operator, calls dip::Divide.
template<typename T>
auto operator%=(dip::Image& lhs, T const& rhs) -> dip::Image&
Compound assignment operator, calls dip::Modulo.
template<typename T>
auto operator&=(dip::Image& lhs, T const& rhs) -> dip::Image&
Bit-wise compound assignment operator, calls dip::And.
template<typename T>
auto operator|=(dip::Image& lhs, T const& rhs) -> dip::Image&
Bit-wise compound assignment operator, calls dip::Or.
template<typename T>
auto operator^=(dip::Image& lhs, T const& rhs) -> dip::Image&
Bit-wise compound assignment operator, calls dip::Xor.
template<typename T>
auto operator==(dip::Image const& lhs, T const& rhs) -> dip::Image
Comparison operator, calls dip::Equal.
template<typename T>
auto operator!=(dip::Image const& lhs, T const& rhs) -> dip::Image
Comparison operator, calls dip::NotEqual.
template<typename T>
auto operator<(dip::Image const& lhs, T const& rhs) -> dip::Image
Comparison operator, calls dip::Lesser.
template<typename T>
auto operator>(dip::Image const& lhs, T const& rhs) -> dip::Image
Comparison operator, calls dip::Greater.
template<typename T>
auto operator<=(dip::Image const& lhs, T const& rhs) -> dip::Image
Comparison operator, calls dip::NotGreater.
template<typename T>
auto operator>=(dip::Image const& lhs, T const& rhs) -> dip::Image
Comparison operator, calls dip::NotLesser.
auto operator*(dip::Units lhs, dip::Units const& rhs) -> dip::Units constexpr
Multiplies two units objects.
auto operator/(dip::Units lhs, dip::Units const& rhs) -> dip::Units constexpr
Divides two units objects.
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*(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::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.
auto operator+(dip::PhysicalQuantity lhs, dip::PhysicalQuantity const& rhs) -> dip::PhysicalQuantity constexpr
Addition of two physical quantities.
auto operator-(dip::PhysicalQuantity lhs, dip::PhysicalQuantity const& rhs) -> dip::PhysicalQuantity constexpr
Subtraction of two physical quantities.
auto operator<<(std::ostream& os, dip::PhysicalQuantity const& pq) -> std::ostream&
Insert physical quantity to an output stream.
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.
auto operator<<(std::ostream& os, dip::PixelSize const& ps) -> std::ostream&
Writes the pixel sizes array to a stream
template<typename T, typename I, typename <SFINAE>>
auto operator+(dip::SampleIterator it, I n) -> dip::SampleIterator
Add integer to a sample iterator
template<typename T, typename I, typename <SFINAE>>
auto operator-(dip::SampleIterator it, I n) -> dip::SampleIterator
Subtract integer from a sample iterator
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+(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
template<typename T>
auto operator==(dip::Vertex v1, dip::Vertex v2) -> bool
Compare two vertices.
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>
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
Add a vertex and a constant.
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::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::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.
auto operator<<(std::ostream& os, dip::Distribution const& distribution) -> std::ostream&
Writes the distribution to a stream
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::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
Adds two histograms.
auto operator-(dip::Histogram const& lhs, dip::Histogram const& rhs) -> dip::Histogram
Subtracts two histograms.
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&(dip::LabelMap lhs, dip::LabelMap const& rhs) -> dip::LabelMap
Combines two maps using logical AND. See operator&=.
auto operator|(dip::LabelMap lhs, dip::LabelMap const& rhs) -> dip::LabelMap
Combines two maps using logical OR. See operator|=.
auto operator^(dip::LabelMap lhs, dip::LabelMap const& rhs) -> dip::LabelMap
Combines two maps using logical XOR. See operator^=.
auto operator~(dip::LabelMap rhs) -> dip::LabelMap
Applies logical NOT to the map. See dip::LabelMap::Negate.
auto operator+(dip::Measurement const& lhs, dip::Measurement const& rhs) -> dip::Measurement
The + operator merges two dip::Measurement objects.
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.
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.
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::Measurement::IteratorFeature const& featureValues, dip::Measurement::ValueType value) -> dip::LabelMap
Selects objects where the first element of featureValues is greater than value.
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::Measurement::IteratorFeature const& featureValues, dip::Measurement::ValueType value) -> dip::LabelMap
Selects objects where the first element of featureValues is smaller than value.
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.

Variables

dip::LibraryInformation const libraryInformation
Constant that holds information about the DIPlib binary.
dip::DataType const DT_BIN constexpr
Constant representing the type dip::bin.
dip::DataType const DT_UINT8 constexpr
Constant representing the type dip::uint8.
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_SINT16 constexpr
Constant representing the type dip::sint16.
dip::DataType const DT_UINT32 constexpr
Constant representing the type dip::uint32.
dip::DataType const DT_SINT32 constexpr
Constant representing the type dip::sint32.
dip::DataType const DT_UINT64 constexpr
Constant representing the type dip::uint64.
dip::DataType const DT_SINT64 constexpr
Constant representing the type dip::sint64.
dip::DataType const DT_SFLOAT constexpr
Constant representing the type dip::sfloat.
dip::DataType const DT_DFLOAT constexpr
Constant representing the type dip::dfloat.
dip::DataType const DT_SCOMPLEX constexpr
Constant representing the type dip::scomplex.
dip::DataType const DT_DCOMPLEX constexpr
Constant representing the type dip::dcomplex.
dip::DataType const DT_LABEL constexpr
Type currently used for all labeled images, see dip::LabelType.
dip::dfloat const pi constexpr
The constant π.
dip::dfloat const nan constexpr
A NaN value.
dip::dfloat const infinity constexpr
Infinity.
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.
bool const usingFFTW
Is true if dip::DFT and dip::RDFT use the FFTW library, or false if they use PocketFFT.
dip::DataType const DT_COUNT constexpr
Data type of histogram bins. See dip::Histogram::CountType.