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

void Expand(dip::BoundingBox::VertexType pt)
Expand bounding box to include given point.
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.
auto Size() const -> dip::DimensionArray
Returns the size of the bounding box.

Variables

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