template<typename T>
dip::BoundingBox struct

Encodes a bounding box in a 2D image by the top left and bottom right corners (both coordinates included in the box).

Constructors, destructors, assignment and conversion operators

BoundingBox() defaulted constexpr
Default constructor, yields a bounding box of a single pixel at {0,0}.
BoundingBox(dip::BoundingBox::VertexType pt) explicit constexpr
Constructor, yields a bounding box of a single pixel at pt.
BoundingBox(dip::BoundingBox::VertexType a, dip::BoundingBox::VertexType b)
Constructor, yields a bounding box with the two points as two of its vertices.

Aliases

using VertexType = dip::Vertex
The bounding box is defined in terms of two vertices.

Functions

auto Contains(dip::VertexInteger pt) -> bool
Tests to see if the given point is inside the bounding box.
auto Contains(dip::VertexFloat pt) -> bool
Tests to see if the given point is inside the bounding box.
void Expand(dip::BoundingBox::VertexType pt)
Expand bounding box to include given point.
auto Size() const -> dip::DimensionArray
Returns the size of the bounding box.

Variables

dip::BoundingBox::VertexType bottomRight
Bottom-right corner of the box
dip::BoundingBox::VertexType topLeft
Top-left corner of the box

Alias documentation

template<typename T>
using VertexType = dip::Vertex

The bounding box is defined in terms of two vertices.

template<typename T>
using dip::BoundingBoxFloat = dip::BoundingBox

A bounding box with floating-point coordinates.

template<typename T>
using dip::BoundingBoxInteger = dip::BoundingBox

A bounding box with integer coordinates.

Function documentation

template<typename T>
BoundingBox( ) defaulted constexpr

Default constructor, yields a bounding box of a single pixel at {0,0}.

template<typename T>
BoundingBox( dip::BoundingBox::VertexType pt) explicit constexpr

Constructor, yields a bounding box of a single pixel at pt.

template<typename T>
BoundingBox( dip::BoundingBox::VertexType a, dip::BoundingBox::VertexType b)

Constructor, yields a bounding box with the two points as two of its vertices.

template<typename T>
void Expand( dip::BoundingBox::VertexType pt)

Expand bounding box to include given point.

template<typename T>
bool Contains( dip::VertexInteger pt)

Tests to see if the given point is inside the bounding box.

template<typename T>
bool Contains( dip::VertexFloat pt)

Tests to see if the given point is inside the bounding box.

template<typename T>
dip::DimensionArray Size( ) const

Returns the size of the bounding box.

Variable documentation

template<typename T>
dip::BoundingBox::VertexType topLeft

Top-left corner of the box

template<typename T>
dip::BoundingBox::VertexType bottomRight

Bottom-right corner of the box