23 #include "pybind11/pybind11.h"
27 namespace py = pybind11;
28 using namespace pybind11::literals;
35 using PyDefectBase = py::class_<DefectBase, std::shared_ptr<DefectBase>>;
38 py::module mod(
"defect");
40 py::module::import(
"lsst.afw.geom");
42 PyDefectBase
cls(mod,
"DefectBase");
45 cls.def(py::init<const geom::Box2I &>(),
"bbox"_a);
48 cls.def(
"getBBox", &DefectBase::getBBox);
49 cls.def(
"getX0", &DefectBase::getX0);
50 cls.def(
"getX1", &DefectBase::getX1);
51 cls.def(
"getY0", &DefectBase::getY0);
52 cls.def(
"getY1", &DefectBase::getY1);
53 cls.def(
"clip", &DefectBase::clip);
54 cls.def(
"shift", (
void (DefectBase::*)(
int,
int)) & DefectBase::shift,
"dx"_a,
"dy"_a);
55 cls.def(
"shift", (
void (DefectBase::*)(
geom::Extent2I const &)) & DefectBase::shift,
"d"_a);
Extent< int, 2 > Extent2I
PYBIND11_PLUGIN(_cameraPoint)