22 #ifndef LSST_AFW_IMAGE_PYTHON_INDEXING_H 23 #define LSST_AFW_IMAGE_PYTHON_INDEXING_H 25 #include "pybind11/pybind11.h" 28 namespace lsst {
namespace afw {
namespace image {
namespace python {
32 std::string msg = (boost::format(
"Index (%d, %d) outside image bounds (%d, %d) to (%d, %d).")
35 if (index.getX() < 0 || index.getY() < 0) {
36 msg +=
" Note that negative indices are only interpreted as relative to the upper bound " 37 "when LOCAL coordinates are used.";
39 PyErr_SetString(PyExc_IndexError, msg.
c_str());
40 throw pybind11::error_already_set();
A base class for image defects.
int getMaxY() const noexcept
int getMaxX() const noexcept
void checkBounds(geom::Point2I const &index, geom::Box2I const &bbox)
int getMinX() const noexcept
bool contains(Point2I const &point) const noexcept
int getMinY() const noexcept