diplib/library/operators.h file

Declares the overloaded arithmetic, logical and comparison operators for dip::Image. This file is always included through diplib.h. See Arithmetic operators, Comparison operators.

Contents

Functions

void dip::Add(dip::Image const& lhs, dip::Image const& rhs, dip::Image& out, dip::DataType dt)
Adds two images, sample-wise, with singleton expansion, and using saturated arithmetic. more...
void dip::Subtract(dip::Image const& lhs, dip::Image const& rhs, dip::Image& out, dip::DataType dt)
Subtracts two images, sample-wise, with singleton expansion, and using saturated arithmetic. more...
void dip::Multiply(dip::Image const& lhs, dip::Image const& rhs, dip::Image& out, dip::DataType dt)
Multiplies two images, pixel-wise, with singleton expansion, and using saturated arithmetic. more...
void dip::MultiplySampleWise(dip::Image const& lhs, dip::Image const& rhs, dip::Image& out, dip::DataType dt)
Multiplies two images, sample-wise, with singleton expansion, and using saturated arithmetic. more...
void dip::MultiplyConjugate(dip::Image const& lhs, dip::Image const& rhs, dip::Image& out, dip::DataType dt)
Multiplies two images with complex conjugation, sample-wise, with singleton expansion. more...
void dip::Divide(dip::Image const& lhs, dip::Image const& rhs, dip::Image& out, dip::DataType dt)
Divides two images, sample-wise, with singleton expansion. more...
void dip::SafeDivide(dip::Image const& lhs, dip::Image const& rhs, dip::Image& out, dip::DataType dt)
Divides two images, sample-wise, with singleton expansion. Tests for division by zero, filling in 0 instead. more...
void dip::Modulo(dip::Image const& lhs, dip::Image const& rhs, dip::Image& out, dip::DataType dt)
Computes the modulo of two images, sample-wise, with singleton expansion. more...
void dip::Power(dip::Image const& lhs, dip::Image const& rhs, dip::Image& out, dip::DataType dt)
Elevates lhs to the power of rhs, sample-wise, with singleton expansion. more...
void dip::Invert(dip::Image const& in, dip::Image& out)
Inverts each sample of the input image, yielding an image of the same type. more...
void dip::And(dip::Image const& lhs, dip::Image const& rhs, dip::Image& out)
Bit-wise AND of two integer images, or logical AND of two binary images, sample-wise, with singleton expansion. more...
void dip::Or(dip::Image const& lhs, dip::Image const& rhs, dip::Image& out)
Bit-wise OR of two integer images, or logical OR of two binary images, sample-wise, with singleton expansion. more...
void dip::Xor(dip::Image const& lhs, dip::Image const& rhs, dip::Image& out)
Bit-wise XOR of two integer images, or logical XOR of two binary images, sample-wise, with singleton expansion. more...
void dip::Not(dip::Image const& in, dip::Image& out)
Bit-wise NOT of an integer image, or logical NOT of a binary image, sample-wise. more...
void dip::Equal(dip::Image const& lhs, dip::Image const& rhs, dip::Image& out)
Equality comparison, sample-wise, with singleton expansion. more...
void dip::NotEqual(dip::Image const& lhs, dip::Image const& rhs, dip::Image& out)
Inequality comparison, sample-wise, with singleton expansion. more...
void dip::Lesser(dip::Image const& lhs, dip::Image const& rhs, dip::Image& out)
Inequality comparison, sample-wise, with singleton expansion. more...
void dip::Greater(dip::Image const& lhs, dip::Image const& rhs, dip::Image& out)
Inequality comparison, sample-wise, with singleton expansion. more...
void dip::NotGreater(dip::Image const& lhs, dip::Image const& rhs, dip::Image& out)
Inequality comparison, sample-wise, with singleton expansion. more...
void dip::NotLesser(dip::Image const& lhs, dip::Image const& rhs, dip::Image& out)
Inequality comparison, sample-wise, with singleton expansion. more...
void dip::InRange(dip::Image const& in, dip::Image const& lhs, dip::Image const& rhs, dip::Image& out)
In-range ternary comparison, sample-wise, with singleton expansion. more...
void dip::OutOfRange(dip::Image const& in, dip::Image const& lhs, dip::Image const& rhs, dip::Image& out)
Out-of-range ternary comparison, sample-wise, with singleton expansion. more...

Operators

template<typename T1, typename T2, typename <SFINAE> = T1>
auto dip::operator+(T1 const& lhs, T2 const& rhs) -> dip::Image
Arithmetic operator, calls dip::Add. more...
template<typename T1, typename T2, typename <SFINAE> = T1>
auto dip::operator-(T1 const& lhs, T2 const& rhs) -> dip::Image
Arithmetic operator, calls dip::Subtract. more...
template<typename T1, typename T2, typename <SFINAE> = T1>
auto dip::operator*(T1 const& lhs, T2 const& rhs) -> dip::Image
Arithmetic operator, calls dip::Multiply. more...
template<typename T1, typename T2, typename <SFINAE> = T1>
auto dip::operator/(T1 const& lhs, T2 const& rhs) -> dip::Image
Arithmetic operator, calls dip::Divide. more...
template<typename T1, typename T2, typename <SFINAE> = T1>
auto dip::operator%(T1 const& lhs, T2 const& rhs) -> dip::Image
Arithmetic operator, calls dip::Modulo. more...
template<typename T>
auto dip::operator&(dip::Image const& lhs, T const& rhs) -> dip::Image
Bit-wise and logical operator, calls dip::And. more...
template<typename T>
auto dip::operator|(dip::Image const& lhs, T const& rhs) -> dip::Image
Bit-wise and logical operator, calls dip::Or. more...
template<typename T>
auto dip::operator^(dip::Image const& lhs, T const& rhs) -> dip::Image
Bit-wise and logical operator, calls dip::Xor. more...
auto dip::operator+(dip::Image const& in) -> dip::Image
Unary operator, converts binary image to dip::DT_UINT and leaves other images unchanged, does not copy data. more...
auto dip::operator-(dip::Image const& in) -> dip::Image
Unary operator, calls dip::Invert. more...
auto dip::operator~(dip::Image const& in) -> dip::Image
Bit-wise and logical unary operator, calls dip::Not. more...
auto dip::operator!(dip::Image const& in) -> dip::Image
Logical unary operator. The input is converted to a binary image, then calls dip::Invert. more...
template<typename T>
auto dip::operator+=(dip::Image& lhs, T const& rhs) -> dip::Image&
Compound assignment operator, calls dip::Add. more...
template<typename T>
auto dip::operator-=(dip::Image& lhs, T const& rhs) -> dip::Image&
Compound assignment operator, calls dip::Subtract. more...
template<typename T>
auto dip::operator*=(dip::Image& lhs, T const& rhs) -> dip::Image&
Compound assignment operator, calls dip::Multiply. more...
template<typename T>
auto dip::operator/=(dip::Image& lhs, T const& rhs) -> dip::Image&
Compound assignment operator, calls dip::Divide. more...
template<typename T>
auto dip::operator%=(dip::Image& lhs, T const& rhs) -> dip::Image&
Compound assignment operator, calls dip::Modulo. more...
template<typename T>
auto dip::operator&=(dip::Image& lhs, T const& rhs) -> dip::Image&
Bit-wise compound assignment operator, calls dip::And. more...
template<typename T>
auto dip::operator|=(dip::Image& lhs, T const& rhs) -> dip::Image&
Bit-wise compound assignment operator, calls dip::Or. more...
template<typename T>
auto dip::operator^=(dip::Image& lhs, T const& rhs) -> dip::Image&
Bit-wise compound assignment operator, calls dip::Xor. more...
template<typename T>
auto dip::operator==(dip::Image const& lhs, T const& rhs) -> dip::Image
Comparison operator, calls dip::Equal. more...
template<typename T>
auto dip::operator!=(dip::Image const& lhs, T const& rhs) -> dip::Image
Comparison operator, calls dip::NotEqual. more...
template<typename T>
auto dip::operator<(dip::Image const& lhs, T const& rhs) -> dip::Image
Comparison operator, calls dip::Lesser. more...
template<typename T>
auto dip::operator>(dip::Image const& lhs, T const& rhs) -> dip::Image
Comparison operator, calls dip::Greater. more...
template<typename T>
auto dip::operator<=(dip::Image const& lhs, T const& rhs) -> dip::Image
Comparison operator, calls dip::NotGreater. more...
template<typename T>
auto dip::operator>=(dip::Image const& lhs, T const& rhs) -> dip::Image
Comparison operator, calls dip::NotLesser. more...