lsst.afw  14.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
distortedTanWcs.cc
Go to the documentation of this file.
1 /*
2  * LSST Data Management System
3  * Copyright 2008-2017 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 
27 
28 namespace py = pybind11;
29 using namespace py::literals;
30 
31 namespace lsst {
32 namespace afw {
33 namespace image {
34 namespace {
35 
36 using PyDistortedTanWcs = py::class_<DistortedTanWcs, std::shared_ptr<DistortedTanWcs>, TanWcs>;
37 
38 PYBIND11_PLUGIN(distortedTanWcs) {
39  py::module mod("distortedTanWcs");
40 
41  py::module::import("lsst.afw.geom");
42  py::module::import("lsst.afw.image.tanWcs");
43 
44  /* Module level */
45  PyDistortedTanWcs cls(mod, "DistortedTanWcs");
46 
47  /* Constructors */
48  cls.def(py::init<TanWcs const &, geom::XYTransform const &>(), "tanWcs"_a, "pixelsToTanPixels"_a);
49 
50  /* Members */
51  cls.def("clone", &DistortedTanWcs::clone);
52  cls.def("flipImage", &DistortedTanWcs::flipImage, "flipLR"_a, "flipTB"_a, "dimensions"_a);
53  cls.def("rotateImageBy90", &DistortedTanWcs::rotateImageBy90, "nQuarter"_a, "dimensions"_a);
54  cls.def("shiftReferencePixel", &DistortedTanWcs::shiftReferencePixel, "dx"_a, "dy"_a);
55  cls.def("hasDistortion", &DistortedTanWcs::hasDistortion);
56  cls.def("getTanWcs", &DistortedTanWcs::getTanWcs);
57  cls.def("getPixelToTanPixel", &DistortedTanWcs::getPixelToTanPixel);
58 
59  return mod.ptr();
60 }
61 }
62 }
63 }
64 } // namespace lsst::afw::image::<anonymous>
std::shared_ptr< ImageT > flipImage(ImageT const &inImage, bool flipLR, bool flipTB)
Flip an image left–right and/or top–bottom.
Definition: rotateImage.cc:92
PYBIND11_PLUGIN(_cameraPoint)
Definition: cameraPoint.cc:35
std::shared_ptr< ImageT > rotateImageBy90(ImageT const &image, int nQuarter)
Rotate an image by an integral number of quarter turns.
Definition: rotateImage.cc:39
double const _a
Definition: RandomImage.cc:77
afw::table::Key< afw::table::Array< ImagePixelT > > image