23 #include "pybind11/pybind11.h"
31 namespace py = pybind11;
32 using namespace pybind11::literals;
50 template <
typename PixelT>
51 void declareSinglePixel(py::module& mod, std::string
const&
name) {
52 mod.def(
"makeSinglePixel", &makeSinglePixel<PixelT, MaskPixel, VariancePixel>,
"x"_a,
"m"_a,
"v"_a);
54 py::class_<SinglePixel<PixelT, MaskPixel, VariancePixel>>
cls(mod, name.c_str());
56 cls.def(py::init<PixelT, MaskPixel, VariancePixel>(),
"image"_a,
"mask"_a = 0,
"variance"_a = 0);
62 py::module mod(
"pixel");
64 declareSinglePixel<float>(mod,
"SinglePixelF");
65 declareSinglePixel<double>(mod,
"SinglePixelD");
66 declareSinglePixel<int>(mod,
"SinglePixelI");
67 declareSinglePixel<std::uint16_t>(mod,
"SinglePixelU");
68 declareSinglePixel<std::uint64_t>(mod,
"SinglePixelL");
PYBIND11_PLUGIN(_cameraPoint)
table::Key< std::string > name
table::PointKey< int > pixel