25 #ifndef LSST_MEAS_ALGORITHMS_BINNEDWCS_H
26 #define LSST_MEAS_ALGORITHMS_BINNEDWCS_H
30 #include "lsst/pex/exceptions.h"
31 #include "lsst/afw/image/Wcs.h"
32 #include "lsst/afw/geom/Point.h"
35 namespace lsst {
namespace meas {
namespace algorithms {
38 LSST_EXCEPTION_TYPE(NotImplementedException, lsst::pex::exceptions::RuntimeError,
41 class BinnedWcs :
public afw::image::Wcs,
public std::enable_shared_from_this<BinnedWcs> {
46 virtual PTR(afw::image::Wcs)
clone()
const {
47 return PTR(afw::image::Wcs)(std::make_shared<BinnedWcs>(_parent, _xBin, _yBin, _xy0));
49 PTR(afw::image::Wcs)
upcast() {
return shared_from_this(); }
51 PTR(afw::image::Wcs)
getParent()
const {
return _parent; }
52 unsigned int getXBin()
const {
return _xBin; }
53 unsigned int getYBin()
const {
return _yBin; }
67 return PTR(daf::base::PropertyList)();
74 virtual void pixelToSkyImpl(
double pixel1,
double pixel2, afw::geom::Angle skyTmp[2])
const;
75 virtual afw::geom::Point2D
skyToPixelImpl(afw::geom::Angle sky1, afw::geom::Angle sky2)
const;
78 void notImplemented()
const {
81 PTR(afw::image::Wcs) const _parent;
82 unsigned int const _xBin, _yBin;
84 afw::geom::AffineTransform const _binnedToOriginal, _originalToBinned;
89 #endif // LSST_MEAS_ALGORITHMS_BINNED_WCS_H
afw::geom::AffineTransform getBinnedToOriginal() const
unsigned int getXBin() const
virtual bool isPersistable() const
virtual boost::shared_ptr< daf::base::PropertyList > getFitsMetadata() const
virtual void pixelToSkyImpl(double pixel1, double pixel2, afw::geom::Angle skyTmp[2]) const
virtual bool hasDistortion() const
virtual void rotateImageBy90(int nQuarter, afw::geom::Extent2I dimensions) const
afw::table::PointKey< int > dimensions
An exception that indicates the feature has not been implemented.
boost::shared_ptr< afw::image::Wcs > upcast()
afw::geom::Point2I getXY0() const
BinnedWcs(boost::shared_ptr< afw::image::Wcs > parent, unsigned int xBin, unsigned int yBin, afw::geom::Point2I xy0)
virtual void flipImage(int flipLR, int flipTB, afw::geom::Extent2I dimensions) const
boost::shared_ptr< afw::image::Wcs > getParent() const
virtual boost::shared_ptr< afw::image::Wcs > clone() const
virtual afw::geom::Point2D skyToPixelImpl(afw::geom::Angle sky1, afw::geom::Angle sky2) const
unsigned int getYBin() const
afw::geom::AffineTransform getOriginalToBinned() const