LSSTApplications  20.0.0
LSSTDataManagementBasePackage
Functions
pixelRegion.cc File Reference
#include "pybind11/pybind11.h"
#include "lsst/afw/geom/ellipses/PixelRegion.h"

Go to the source code of this file.

Functions

 PYBIND11_MODULE (pixelRegion, mod)
 

Function Documentation

◆ PYBIND11_MODULE()

PYBIND11_MODULE ( pixelRegion  ,
mod   
)

Definition at line 31 of file pixelRegion.cc.

31  {
32  py::class_<PixelRegion> clsPixelRegion(mod, "PixelRegion");
33 
34  /* Constructors */
35  clsPixelRegion.def(py::init<Ellipse const &>());
36 
37  /* Members */
38  clsPixelRegion.def("getBBox", &PixelRegion::getBBox, py::return_value_policy::copy);
39  clsPixelRegion.def("getSpanAt", &PixelRegion::getSpanAt);
40  clsPixelRegion.def("__iter__",
41  [](const PixelRegion &self) { return py::make_iterator(self.begin(), self.end()); },
42  py::keep_alive<0, 1>() /* Essential: keep object alive while iterator exists */);
43 }
end
int end
Definition: BoundedField.cc:105
lsst::afw::geom::ellipses::PixelRegion
A pixelized region containing all pixels whose centers are within an Ellipse.
Definition: PixelRegion.h:46
std::begin
T begin(T... args)