24 #ifndef LSST_AFW_GEOM_BOX_H
25 #define LSST_AFW_GEOM_BOX_H
28 #include "boost/format.hpp"
33 namespace lsst {
namespace afw {
namespace geom {
161 boost::fusion::vector2< ndarray::index::Range, ndarray::index::Range >
363 return dim.getX() * dim.getY();
418 void flipLR(
float xExtent);
421 void flipTB(
float yExtent);
void grow(double buffer)
Increase the size of the box by the given buffer amount in all directions.
Extent2I const getDimensions() const
A coordinate class intended to represent absolute positions.
bool contains(Point2D const &point) const
Return true if the box contains the point.
Point2D const getCenter() const
void shift(Extent2I const &offset)
Shift the position of the box by the given offset.
Box2I(Box2I const &other)
Standard copy constructor.
bool contains(Point2I const &point) const
Return true if the box contains the point.
Point2D const getMin() const
Box2I()
Construct an empty box.
std::ostream & operator<<(std::ostream &os, lsst::afw::geom::AffineTransform const &transform)
static double const INVALID
Value used to specify undefined coordinate values.
bool isEmpty() const
Return true if the box contains no points.
A coordinate class intended to represent offsets and dimensions.
void include(Point2I const &point)
Expand this to ensure that this->contains(point).
bool overlaps(Box2I const &other) const
Return true if any points in other are also in this.
bool operator==(Box2I const &other) const
Compare two boxes for equality.
Point2D const getMax() const
bool operator!=(Box2I const &other) const
Compare two boxes for equality.
Point< double, 2 > Point2D
bool operator==(Box2D const &other) const
Compare two boxes for equality.
Box2D(Box2D const &other)
Standard copy constructor.
Point2I const getMax() const
Extent< int, 2 > Extent2I
A coordinate class intended to represent absolute positions.
Box2D & operator=(Box2D const &other)
Standard assignment operator.
An integer coordinate rectangle.
void clip(Box2D const &other)
Shrink this to ensure that other.contains(*this).
afw::table::PointKey< int > dimensions
std::string toString() const
double getCenterX() const
double getCenterY() const
void flipTB(float yExtent)
Flip a bounding box about the x-axis given a parent box of extent (yExtent).
Box2I & operator=(Box2I const &other)
Standard assignment operator.
std::string toString() const
void include(Point2D const &point)
Expand this to ensure that this->contains(point).
static double const EPSILON
std::vector< Point2D > getCorners() const
std::string toString() const
bool isEmpty() const
Return true if the box contains no points.
std::string toString() const
void flipLR(int xExtent)
Flip a bounding box about the y-axis given a parent box of extent (xExtent).
Box2D()
Construct an empty box.
void flipLR(float xExtent)
Flip a bounding box about the y-axis given a parent box of extent (xExtent).
void grow(int buffer)
Increase the size of the box by the given buffer amount in all directions.
EigenVector const & asEigen() const
Return a fixed-size Eigen representation of the coordinate object.
A template meta-sequence that defines an arbitrary view into an unspecified array.
void flipTB(int yExtent)
Flip a bounding box about the x-axis given a parent box of extent (yExtent).
Point2I const getEnd() const
bool overlaps(Box2D const &other) const
Return true if any points in other are also in this.
void shift(Extent2D const &offset)
Shift the position of the box by the given offset.
Point2I const getBegin() const
Extent< double, 2 > Extent2D
void clip(Box2I const &other)
Shrink this to ensure that other.contains(*this).
A floating-point coordinate rectangle geometry.
Point2I const getMin() const
A coordinate class intended to represent offsets and dimensions.
bool operator!=(Box2D const &other) const
Compare two boxes for equality.
std::vector< Point2I > getCorners() const
Extent2D const getDimensions() const
ndarray::View< boost::fusion::vector2< ndarray::index::Range, ndarray::index::Range > > getSlices() const
Return slices to extract the box's region from an ndarray::Array.