43 m.doc() =
"Gauss2D Gaussian Python bindings";
48 auto _g = py::class_<gauss2d::GaussianIntegral, std::shared_ptr<gauss2d::GaussianIntegral>>(
49 m,
"GaussianIntegral");
52 .def(py::init<double>(),
"value"_a = 1)
53 .def_property(
"value", &gauss2d::GaussianIntegralValue::get_value,
54 &gauss2d::GaussianIntegralValue::set_value)
55 .def(py::self == py::self)
56 .def(py::self != py::self)
59 return self.repr(
true, self.PY_NAMESPACE_SEPARATOR);
61 .def(
"__str__", &gauss2d::GaussianIntegralValue::str);
63 py::class_<gauss2d::Gaussian, std::shared_ptr<gauss2d::Gaussian>>(
m,
"Gaussian")
66 "centroid"_a =
nullptr,
"ellipse"_a =
nullptr,
"integral"_a =
nullptr)
67 .def_property_readonly(
"centroid", &gauss2d::Gaussian::get_centroid)
68 .def_property_readonly(
"ellipse", &gauss2d::Gaussian::get_ellipse)
69 .def_property_readonly(
"integral", &gauss2d::Gaussian::get_integral)
70 .def_property(
"const_normal", &gauss2d::Gaussian::get_const_normal,
71 &gauss2d::Gaussian::set_const_normal)
72 .def_property(
"integral_value", &gauss2d::Gaussian::get_integral_value,
73 &gauss2d::Gaussian::set_integral_value)
74 .def(py::self == py::self)
75 .def(py::self != py::self)
77 [](
const gauss2d::Gaussian &self) {
return self.repr(
true, self.PY_NAMESPACE_SEPARATOR); })
78 .def(
"__str__", &gauss2d::Gaussian::str);
79 py::class_<gauss2d::Gaussians, std::shared_ptr<gauss2d::Gaussians>>(
m,
"Gaussians")
80 .def(py::init<std::optional<const gauss2d::Gaussians::Data>>(),
"gaussians"_a)
81 .def(
"at", &gauss2d::Gaussians::at, py::return_value_policy::copy)
82 .def_property_readonly(
"size", &gauss2d::Gaussians::size)
83 .def(
"__getitem__", &gauss2d::Gaussians::at_ptr, py::return_value_policy::copy)
84 .def(
"__len__", &gauss2d::Gaussians::size)
86 [](
const gauss2d::Gaussians &self) {
return self.repr(
true, self.PY_NAMESPACE_SEPARATOR); })
87 .def(
"__str__", &gauss2d::Gaussians::str);
88 py::class_<gauss2d::ConvolvedGaussian, std::shared_ptr<gauss2d::ConvolvedGaussian>>(
m,
91 "source"_a =
nullptr,
"kernel"_a =
nullptr)
92 .def_property_readonly(
"kernel", &gauss2d::ConvolvedGaussian::get_kernel)
93 .def_property_readonly(
"source", &gauss2d::ConvolvedGaussian::get_source)
94 .def(py::self == py::self)
95 .def(py::self != py::self)
98 return self.repr(
true, self.PY_NAMESPACE_SEPARATOR);
100 .def(
"__str__", &gauss2d::ConvolvedGaussian::str);
101 py::class_<gauss2d::ConvolvedGaussians, std::shared_ptr<gauss2d::ConvolvedGaussians>>(
102 m,
"ConvolvedGaussians")
103 .def(py::init<std::optional<const gauss2d::ConvolvedGaussians::Data>>(),
"convolvedbgaussians"_a)
104 .def(
"at", &gauss2d::ConvolvedGaussians::at_ptr, py::return_value_policy::copy)
105 .def_property_readonly(
"size", &gauss2d::ConvolvedGaussians::size)
106 .def(
"__getitem__", &gauss2d::ConvolvedGaussians::at_ptr, py::return_value_policy::copy)
107 .def(
"__len__", &gauss2d::ConvolvedGaussians::size)
110 return self.repr(
true, self.PY_NAMESPACE_SEPARATOR);
112 .def(
"__str__", &gauss2d::ConvolvedGaussians::str);