lsst.afw  13.0-92-g8ecf155+1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
footprintCtrl.cc
Go to the documentation of this file.
1 /*
2  * LSST Data Management System
3  * Copyright 2008-2016 AURA/LSST.
4  *
5  * This product includes software developed by the
6  * LSST Project (http://www.lsst.org/).
7  *
8  * This program is free software: you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License as published by
10  * the Free Software Foundation, either version 3 of the License, or
11  * (at your option) any later version.
12  *
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the LSST License Statement and
19  * the GNU General Public License along with this program. If not,
20  * see <https://www.lsstcorp.org/LegalNotices/>.
21  */
22 
23 #include <pybind11/pybind11.h>
24 //#include <pybind11/operators.h>
25 #include <pybind11/stl.h>
26 
28 
29 namespace py = pybind11;
30 
31 using namespace py::literals;
32 
33 namespace lsst {
34 namespace afw {
35 namespace detection {
36 
37 PYBIND11_PLUGIN(_footprintCtrl) {
38  py::module mod("_footprintCtrl", "Python wrapper for afw _footprintCtrl library");
39 
40  py::class_<FootprintControl> clsFootprintControl(mod, "FootprintControl");
41 
42  /* Constructors */
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);
46 
47  /* Members */
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);
54 
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);
61 
62  py::class_<HeavyFootprintCtrl> clsHeavyFootprintCtrl(mod, "HeavyFootprintCtrl");
63 
64  py::enum_<HeavyFootprintCtrl::ModifySource>(clsHeavyFootprintCtrl, "ModifySource")
65  .value("NONE", HeavyFootprintCtrl::ModifySource::NONE)
66  .value("SET", HeavyFootprintCtrl::ModifySource::SET)
67  .export_values();
68 
69  clsHeavyFootprintCtrl.def(py::init<HeavyFootprintCtrl::ModifySource>(),
70  "modifySource"_a = HeavyFootprintCtrl::ModifySource::NONE);
71 
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);
80 
81  /* Module level */
82 
83  /* Member types and enums */
84 
85  return mod.ptr();
86 }
87 }
88 }
89 } // lsst::afw::detection
PYBIND11_PLUGIN(_cameraPoint)
Definition: cameraPoint.cc:35
double const _a
Definition: RandomImage.cc:77