22#ifndef LSST_AFW_IMAGE_PYTHON_INDEXING_H
23#define LSST_AFW_IMAGE_PYTHON_INDEXING_H
25#include "pybind11/pybind11.h"
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();
int getMinY() const noexcept
int getMinX() const noexcept
int getMaxX() const noexcept
bool contains(Point2I const &point) const noexcept
int getMaxY() const noexcept
void checkBounds(geom::Point2I const &index, geom::Box2I const &bbox)