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 flipLR(float xExtent)
Flip a bounding box about the y-axis given a parent box of extent (xExtent).
void grow(double buffer)
Increase the size of the box by the given buffer amount in all directions.
void clip(Box2I const &other)
Shrink this to ensure that other.contains(*this).
A coordinate class intended to represent absolute positions.
void clip(Box2D const &other)
Shrink this to ensure that other.contains(*this).
bool operator!=(Box2D const &other) const
Compare two boxes for equality.
void grow(int buffer)
Increase the size of the box by the given buffer amount in all directions.
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.
std::ostream & operator<<(std::ostream &os, lsst::afw::geom::AffineTransform const &transform)
bool operator==(Box2I const &other) const
Compare two boxes for equality.
A coordinate class intended to represent offsets and dimensions.
Extent< double, 2 > Extent2D
static double const EPSILON
void include(Point2D const &point)
Expand this to ensure that this->contains(point).
Extent2D const getDimensions() const
Box2I & operator=(Box2I const &other)
Standard assignment operator.
bool operator==(Box2D const &other) const
Compare two boxes for equality.
bool overlaps(Box2D const &other) const
Return true if any points in other are also in this.
A coordinate class intended to represent absolute positions.
An integer coordinate rectangle.
void flipTB(int yExtent)
Flip a bounding box about the x-axis given a parent box of extent (yExtent).
double getCenterX() const
afw::table::PointKey< int > dimensions
void shift(Extent2I const &offset)
Shift the position of the box by the given offset.
Extent2I const getDimensions() const
Box2I()
Construct an empty box.
Point2I const getBegin() const
std::string toString() const
Point2D const getMin() const
bool operator!=(Box2I const &other) const
Compare two boxes for equality.
EigenVector const & asEigen() const
Return a fixed-size Eigen representation of the coordinate object.
Box2D(Box2D const &other)
Standard copy constructor.
bool contains(Point2I const &point) const
Return true if the box contains the point.
std::string toString() const
void include(Point2I const &point)
Expand this to ensure that this->contains(point).
void flipLR(int xExtent)
Flip a bounding box about the y-axis given a parent box of extent (xExtent).
std::vector< Point2I > getCorners() const
void shift(Extent2D const &offset)
Shift the position of the box by the given offset.
Box2I(Box2I const &other)
Standard copy constructor.
bool isEmpty() const
Return true if the box contains no points.
static double const INVALID
Value used to specify undefined coordinate values.
std::vector< Point2D > getCorners() const
Point2I const getMin() const
A template meta-sequence that defines an arbitrary view into an unspecified array.
Box2D & operator=(Box2D const &other)
Standard assignment operator.
Point2I const getEnd() const
Point2D const getMax() const
double getCenterY() const
Point< double, 2 > Point2D
void flipTB(float yExtent)
Flip a bounding box about the x-axis given a parent box of extent (yExtent).
Point2I const getMax() const
A floating-point coordinate rectangle geometry.
std::string toString() const
bool isEmpty() const
Return true if the box contains no points.
bool overlaps(Box2I const &other) const
Return true if any points in other are also in this.
bool contains(Point2D const &point) const
Return true if the box contains the point.
A coordinate class intended to represent offsets and dimensions.
Extent< int, 2 > Extent2I
Point2D const getCenter() const
Box2D()
Construct an empty box.
std::string toString() const