Skip to content

Commit

Permalink
Add wrapper for Ellipse::transform.
Browse files Browse the repository at this point in the history
  • Loading branch information
TallJimbo authored and Pim Schellart committed Mar 1, 2017
1 parent 99df6c0 commit 117fb96
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion python/lsst/afw/geom/ellipses/ellipse.cc
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
#include "lsst/afw/geom/Point.h"
#include "lsst/afw/geom/ellipses/GridTransform.h"
#include "lsst/afw/geom/ellipses/Ellipse.h"
#include "lsst/afw/geom/ellipses/Transformer.h"

namespace py = pybind11;
using namespace pybind11::literals;
Expand Down Expand Up @@ -85,7 +86,13 @@ PYBIND11_PLUGIN(_ellipse) {
clsEllipse.def("shift", &Ellipse::shift);
clsEllipse.def("getParameterVector", &Ellipse::getParameterVector);
clsEllipse.def("setParameterVector", &Ellipse::setParameterVector);
// clsEllipse.def("transform", (Transformer const (Ellipse::*)(AffineTransform const &) const) &Ellipse::transform);
clsEllipse.def(
"transform",
[](Ellipse const & self, AffineTransform const & t) -> Ellipse {
return self.transform(t);
},
"transform"_a
);
// clsEllipse.def("convolve", (Convolution const (Ellipse::*)(Ellipse const &) const) &Ellipse::convolve);
clsEllipse.def("getGridTransform", [](Ellipse & self) -> AffineTransform {
return self.getGridTransform(); // delibarate conversion to AffineTransform
Expand Down

0 comments on commit 117fb96

Please sign in to comment.