LSSTApplications  10.0+286,10.0+36,10.0+46,10.0-2-g4f67435,10.1+152,10.1+37,11.0,11.0+1,11.0-1-g47edd16,11.0-1-g60db491,11.0-1-g7418c06,11.0-2-g04d2804,11.0-2-g68503cd,11.0-2-g818369d,11.0-2-gb8b8ce7
LSSTDataManagementBasePackage
Public Types | Public Member Functions | Private Attributes | List of all members
lsst::afw::math::detail::WcsPositionFunctor Class Reference

Derived functor class to transform pixel position for a destination image to its position in the source image. The transform is from one WCS to another. More...

#include <PositionFunctor.h>

Inheritance diagram for lsst::afw::math::detail::WcsPositionFunctor:
lsst::afw::math::detail::PositionFunctor

Public Types

typedef boost::shared_ptr
< WcsPositionFunctor
Ptr
 
- Public Types inherited from lsst::afw::math::detail::PositionFunctor
typedef boost::shared_ptr
< PositionFunctor
Ptr
 

Public Member Functions

 WcsPositionFunctor (lsst::afw::geom::Point2D const &destXY0, lsst::afw::image::Wcs const &destWcs, lsst::afw::image::Wcs const &srcWcs)
 
virtual ~WcsPositionFunctor ()
 
virtual lsst::afw::geom::Point2D operator() (int destCol, int destRow) const
 
- Public Member Functions inherited from lsst::afw::math::detail::PositionFunctor
 PositionFunctor ()
 
virtual ~PositionFunctor ()
 

Private Attributes

lsst::afw::geom::Point2D const & _destXY0
 
lsst::afw::image::Wcs const & _destWcs
 
lsst::afw::image::Wcs const & _srcWcs
 

Detailed Description

Derived functor class to transform pixel position for a destination image to its position in the source image. The transform is from one WCS to another.

Definition at line 73 of file PositionFunctor.h.

Member Typedef Documentation

Definition at line 75 of file PositionFunctor.h.

Constructor & Destructor Documentation

lsst::afw::math::detail::WcsPositionFunctor::WcsPositionFunctor ( lsst::afw::geom::Point2D const &  destXY0,
lsst::afw::image::Wcs const &  destWcs,
lsst::afw::image::Wcs const &  srcWcs 
)
inlineexplicit
Parameters
destXY0xy0 of destination image
destWcsWCS of remapped image
srcWcsWCS of source image

Definition at line 77 of file PositionFunctor.h.

81  :
83  _destXY0(destXY0),
84  _destWcs(destWcs),
85  _srcWcs(srcWcs)
86  {}
lsst::afw::image::Wcs const & _srcWcs
lsst::afw::geom::Point2D const & _destXY0
lsst::afw::image::Wcs const & _destWcs
virtual lsst::afw::math::detail::WcsPositionFunctor::~WcsPositionFunctor ( )
inlinevirtual

Definition at line 88 of file PositionFunctor.h.

88 {};

Member Function Documentation

virtual lsst::afw::geom::Point2D lsst::afw::math::detail::WcsPositionFunctor::operator() ( int  destCol,
int  destRow 
) const
inlinevirtual

Implements lsst::afw::math::detail::PositionFunctor.

Definition at line 90 of file PositionFunctor.h.

90  {
91  double const col = lsst::afw::image::indexToPosition(destCol + _destXY0[0]);
92  double const row = lsst::afw::image::indexToPosition(destRow + _destXY0[1]);
93  lsst::afw::geom::Angle sky1, sky2;
94  _destWcs.pixelToSky(col, row, sky1, sky2);
95  return _srcWcs.skyToPixel(sky1, sky2);
96  }
double indexToPosition(double ind)
Convert image index to image position.
Definition: ImageUtils.h:54
lsst::afw::image::Wcs const & _srcWcs
geom::Point2D skyToPixel(geom::Angle sky1, geom::Angle sky2) const
Convert from sky coordinates (e.g. RA/dec) to pixel positions.
Definition: Wcs.cc:782
lsst::afw::geom::Point2D const & _destXY0
boost::shared_ptr< coord::Coord > pixelToSky(double pix1, double pix2) const
Convert from pixel position to sky coordinates (e.g. RA/dec)
Definition: Wcs.cc:858
int row
Definition: CR.cc:153
int col
Definition: CR.cc:152
lsst::afw::image::Wcs const & _destWcs

Member Data Documentation

lsst::afw::image::Wcs const& lsst::afw::math::detail::WcsPositionFunctor::_destWcs
private

Definition at line 100 of file PositionFunctor.h.

lsst::afw::geom::Point2D const& lsst::afw::math::detail::WcsPositionFunctor::_destXY0
private

Definition at line 99 of file PositionFunctor.h.

lsst::afw::image::Wcs const& lsst::afw::math::detail::WcsPositionFunctor::_srcWcs
private

Definition at line 101 of file PositionFunctor.h.


The documentation for this class was generated from the following file: