23 #include <pybind11/pybind11.h> 25 #include <pybind11/stl.h> 29 namespace py = pybind11;
38 py::module mod(
"_footprintCtrl",
"Python wrapper for afw _footprintCtrl library");
40 py::class_<FootprintControl> clsFootprintControl(mod,
"FootprintControl");
43 clsFootprintControl.def(py::init<>());
44 clsFootprintControl.def(py::init<bool, bool>(),
"circular"_a,
"isotropic"_a =
false);
45 clsFootprintControl.def(py::init<bool, bool, bool, bool>(),
"left"_a,
"right"_a,
"up"_a,
"down"_a);
48 clsFootprintControl.def(
"growCircular", &FootprintControl::growCircular);
49 clsFootprintControl.def(
"growIsotropic", &FootprintControl::growIsotropic);
50 clsFootprintControl.def(
"growLeft", &FootprintControl::growLeft);
51 clsFootprintControl.def(
"growRight", &FootprintControl::growRight);
52 clsFootprintControl.def(
"growUp", &FootprintControl::growUp);
53 clsFootprintControl.def(
"growDown", &FootprintControl::growDown);
55 clsFootprintControl.def(
"isCircular", &FootprintControl::isCircular);
56 clsFootprintControl.def(
"isIsotropic", &FootprintControl::isIsotropic);
57 clsFootprintControl.def(
"isLeft", &FootprintControl::isLeft);
58 clsFootprintControl.def(
"isRight", &FootprintControl::isRight);
59 clsFootprintControl.def(
"isUp", &FootprintControl::isUp);
60 clsFootprintControl.def(
"isDown", &FootprintControl::isDown);
62 py::class_<HeavyFootprintCtrl> clsHeavyFootprintCtrl(mod,
"HeavyFootprintCtrl");
64 py::enum_<HeavyFootprintCtrl::ModifySource>(clsHeavyFootprintCtrl,
"ModifySource")
65 .value(
"NONE", HeavyFootprintCtrl::ModifySource::NONE)
66 .value(
"SET", HeavyFootprintCtrl::ModifySource::SET)
69 clsHeavyFootprintCtrl.def(py::init<HeavyFootprintCtrl::ModifySource>(),
70 "modifySource"_a = HeavyFootprintCtrl::ModifySource::NONE);
72 clsHeavyFootprintCtrl.def(
"getModifySource", &HeavyFootprintCtrl::getModifySource);
73 clsHeavyFootprintCtrl.def(
"setModifySource", &HeavyFootprintCtrl::setModifySource);
74 clsHeavyFootprintCtrl.def(
"getImageVal", &HeavyFootprintCtrl::getImageVal);
75 clsHeavyFootprintCtrl.def(
"setImageVal", &HeavyFootprintCtrl::setImageVal);
76 clsHeavyFootprintCtrl.def(
"getMaskVal", &HeavyFootprintCtrl::getMaskVal);
77 clsHeavyFootprintCtrl.def(
"setMaskVal", &HeavyFootprintCtrl::setMaskVal);
78 clsHeavyFootprintCtrl.def(
"getVarianceVal", &HeavyFootprintCtrl::getVarianceVal);
79 clsHeavyFootprintCtrl.def(
"setVarianceVal", &HeavyFootprintCtrl::setVarianceVal);
PYBIND11_PLUGIN(_footprintCtrl)
A base class for image defects.