The library infrastructure » Physical dimensions module
#include "diplib.h"

Support for units, physical quantities and pixel sizes.

Contents

Classes

class dip::Units
Encapsulates the concepts of physical units, using SI units.
struct dip::PhysicalQuantity
Encapsulates a quantity with physical units.
class dip::PixelSize
Specifies an image’s pixel size as physical quantities.

Aliases

using dip::PhysicalQuantityArray = dip::DimensionArray
An array to hold physical quantities, such as a pixel’s size.

Operators

auto dip::operator*(dip::Units lhs, dip::Units const& rhs) -> dip::Units constexpr
Multiplies two units objects.
auto dip::operator/(dip::Units lhs, dip::Units const& rhs) -> dip::Units constexpr
Divides two units objects.
auto dip::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 dip::operator*(dip::PhysicalQuantity lhs, dip::PhysicalQuantity const& rhs) -> dip::PhysicalQuantity constexpr
Multiplies two physical quantities.
auto dip::operator*(dip::PhysicalQuantity lhs, dip::dfloat rhs) -> dip::PhysicalQuantity constexpr
Scaling of a physical quantity.
auto dip::operator*(dip::dfloat lhs, dip::PhysicalQuantity rhs) -> dip::PhysicalQuantity constexpr
Scaling of a physical quantity.
auto dip::operator/(dip::PhysicalQuantity lhs, dip::PhysicalQuantity const& rhs) -> dip::PhysicalQuantity constexpr
Divides two physical quantities.
auto dip::operator/(dip::PhysicalQuantity lhs, dip::dfloat rhs) -> dip::PhysicalQuantity constexpr
Scaling of a physical quantity.
auto dip::operator/(dip::dfloat lhs, dip::PhysicalQuantity rhs) -> dip::PhysicalQuantity constexpr
Scaling of a physical quantity.
auto dip::operator+(dip::PhysicalQuantity lhs, dip::PhysicalQuantity const& rhs) -> dip::PhysicalQuantity constexpr
Addition of two physical quantities.
auto dip::operator-(dip::PhysicalQuantity lhs, dip::PhysicalQuantity const& rhs) -> dip::PhysicalQuantity constexpr
Subtraction of two physical quantities.
auto dip::operator<<(std::ostream& os, dip::PhysicalQuantity const& pq) -> std::ostream&
Insert physical quantity to an output stream.
auto dip::operator*(dip::dfloat magnitude, dip::Units const& units) -> dip::PhysicalQuantity constexpr
Create an arbitrary physical quantity by multiplying a magnitude with units.
auto dip::operator*(dip::Units const& units, dip::dfloat magnitude) -> dip::PhysicalQuantity constexpr
Create an arbitrary physical quantity by multiplying a magnitude with units.
auto dip::operator<<(std::ostream& os, dip::PixelSize const& ps) -> std::ostream&
Writes the pixel sizes array to a stream