LSSTApplications
19.0.0-14-gb0260a2+72efe9b372,20.0.0+7927753e06,20.0.0+8829bf0056,20.0.0+995114c5d2,20.0.0+b6f4b2abd1,20.0.0+bddc4f4cbe,20.0.0-1-g253301a+8829bf0056,20.0.0-1-g2b7511a+0d71a2d77f,20.0.0-1-g5b95a8c+7461dd0434,20.0.0-12-g321c96ea+23efe4bbff,20.0.0-16-gfab17e72e+fdf35455f6,20.0.0-2-g0070d88+ba3ffc8f0b,20.0.0-2-g4dae9ad+ee58a624b3,20.0.0-2-g61b8584+5d3db074ba,20.0.0-2-gb780d76+d529cf1a41,20.0.0-2-ged6426c+226a441f5f,20.0.0-2-gf072044+8829bf0056,20.0.0-2-gf1f7952+ee58a624b3,20.0.0-20-geae50cf+e37fec0aee,20.0.0-25-g3dcad98+544a109665,20.0.0-25-g5eafb0f+ee58a624b3,20.0.0-27-g64178ef+f1f297b00a,20.0.0-3-g4cc78c6+e0676b0dc8,20.0.0-3-g8f21e14+4fd2c12c9a,20.0.0-3-gbd60e8c+187b78b4b8,20.0.0-3-gbecbe05+48431fa087,20.0.0-38-ge4adf513+a12e1f8e37,20.0.0-4-g97dc21a+544a109665,20.0.0-4-gb4befbc+087873070b,20.0.0-4-gf910f65+5d3db074ba,20.0.0-5-gdfe0fee+199202a608,20.0.0-5-gfbfe500+d529cf1a41,20.0.0-6-g64f541c+d529cf1a41,20.0.0-6-g9a5b7a1+a1cd37312e,20.0.0-68-ga3f3dda+5fca18c6a4,20.0.0-9-g4aef684+e18322736b,w.2020.45
LSSTDataManagementBasePackage
|
Go to the documentation of this file.
29 #ifndef LSST_AFW_MATH_WARPEXPOSURE_H
30 #define LSST_AFW_MATH_WARPEXPOSURE_H
267 int interpLength = 0,
273 _maskWarpingKernelPtr(),
275 _interpLength(interpLength),
276 _growFullMask(growFullMask) {
315 _interpLength = interpLength;
373 _growFullMask = growFullMask;
399 template <
typename DestExposureT,
typename SrcExposureT>
401 DestExposureT &destExposure,
402 SrcExposureT
const &srcExposure,
405 WarpingControl
const &control,
406 typename DestExposureT::MaskedImageT::SinglePixel padValue =
407 lsst::afw::math::edgePixel<typename DestExposureT::MaskedImageT>(
409 typename DestExposureT::MaskedImageT>::image_category())
459 template <
typename DestImageT,
typename SrcImageT>
461 geom::SkyWcs
const &destWcs,
462 SrcImageT
const &srcImage,
463 geom::SkyWcs
const &srcWcs,
464 WarpingControl
const &control,
465 typename DestImageT::SinglePixel padValue = lsst::afw::math::edgePixel<DestImageT>(
484 template <
typename DestImageT,
typename SrcImageT>
485 int warpImage(DestImageT &destImage, SrcImageT
const &srcImage,
487 typename DestImageT::SinglePixel padValue = lsst::afw::math::edgePixel<DestImageT>(
495 template <
typename DestImageT,
typename SrcImageT>
497 DestImageT &destImage,
498 SrcImageT
const &srcImage,
501 WarpingControl
const &control,
502 typename DestImageT::SinglePixel padValue = lsst::afw::math::edgePixel<DestImageT>(
511 #endif // !defined(LSST_AFW_MATH_WARPEXPOSURE_H)
void setWarpingKernelName(std::string const &warpingKernelName)
set the warping kernel by name
Kernel::Pixel operator()(double x) const override
Solve bilinear equation.
Parameters to control convolution.
NearestWarpingKernel(const NearestWarpingKernel &)=delete
int getOrder() const
get the order of the kernel
NearestWarpingKernel(NearestWarpingKernel &&)=delete
BilinearFunction1(double fracPos)
Construct a Bilinear interpolation function.
~LanczosWarpingKernel() override=default
void setKernelParameter(unsigned int ind, double value) const override
Set one kernel parameter.
LanczosWarpingKernel(LanczosWarpingKernel &&)=delete
LanczosWarpingKernel(const LanczosWarpingKernel &)=delete
virtual ~WarpingControl()
std::shared_ptr< Kernel > clone() const override
Return a pointer to a deep copy of this kernel.
afw::table::Key< int > cacheSize
BilinearWarpingKernel(const BilinearWarpingKernel &)=delete
Nearest neighbor warping: fast; good for undersampled data.
~NearestWarpingKernel() override=default
std::shared_ptr< SeparableKernel > makeWarpingKernel(std::string name)
Return a warping kernel given its name.
Function1Ptr clone() const override
LanczosWarpingKernel & operator=(LanczosWarpingKernel &&)=delete
std::shared_ptr< SeparableKernel > getMaskWarpingKernel() const
get the mask warping kernel
void setKernelParameter(unsigned int ind, double value) const override
Set one kernel parameter.
ImageT::image_category image_category
afw::table::Key< std::string > warpingKernelName
lsst::afw::image::MaskPixel getGrowFullMask() const
get mask bits to grow to full width of image/variance kernel
NearestWarpingKernel & operator=(const NearestWarpingKernel &)=delete
1-dimensional nearest neighbor interpolation function.
std::shared_ptr< Function1< Kernel::Pixel > > Function1Ptr
bool hasMaskWarpingKernel() const
return true if there is a mask kernel
void setKernelParameter(unsigned int ind, double value) const override
Set one kernel parameter.
BilinearWarpingKernel(BilinearWarpingKernel &&)=delete
1-dimensional Lanczos function
std::string toString(std::string const &="") const override
Return string representation.
Transform< Point2Endpoint, Point2Endpoint > TransformPoint2ToPoint2
int warpExposure(DestExposureT &destExposure, SrcExposureT const &srcExposure, WarpingControl const &control, typename DestExposureT::MaskedImageT::SinglePixel padValue=lsst::afw::math::edgePixel< typename DestExposureT::MaskedImageT >(typename lsst::afw::image::detail::image_traits< typename DestExposureT::MaskedImageT >::image_category()))
Warp (remap) one exposure to another.
Kernel::Pixel operator()(double x) const override
Solve nearest neighbor equation.
Bilinear warping: fast; good for undersampled data.
Lanczos warping: accurate but slow and can introduce ringing artifacts.
A base class for image defects.
BilinearWarpingKernel & operator=(const BilinearWarpingKernel &)=delete
int warpImage(DestImageT &destImage, geom::SkyWcs const &destWcs, SrcImageT const &srcImage, geom::SkyWcs const &srcWcs, WarpingControl const &control, typename DestImageT::SinglePixel padValue=lsst::afw::math::edgePixel< DestImageT >(typename lsst::afw::image::detail::image_traits< DestImageT >::image_category()))
Warp an Image or MaskedImage to a new Wcs.
void setGrowFullMask(lsst::afw::image::MaskPixel growFullMask)
set mask bits to grow to full width of image/variance kernel
std::string toString(std::string const &="") const override
Return string representation.
std::vector< double > _params
WarpingControl(std::string const &warpingKernelName, std::string const &maskWarpingKernelName="", int cacheSize=0, int interpLength=0, lsst::afw::image::MaskPixel growFullMask=0)
Construct a WarpingControl object.
~BilinearFunction1() override
void setInterpLength(int interpLength)
set the interpolation length
1-dimensional bilinear interpolation function.
Function1Ptr clone() const override
void setMaskWarpingKernelName(std::string const &maskWarpingKernelName)
set or clear the mask warping kernel by name
std::shared_ptr< SeparableKernel > getWarpingKernel() const
get the warping kernel
~NearestFunction1() override
LanczosWarpingKernel(int order)
std::shared_ptr< Function1< Kernel::Pixel > > Function1Ptr
int getCacheSize() const
get the cache size for the interpolation kernel(s)
void setMaskWarpingKernel(SeparableKernel const &maskWarpingKernel)
set the mask warping kernel
void setCacheSize(int cacheSize)
set the cache size for the interpolation kernel(s)
Kernels are used for convolution with MaskedImages and (eventually) Images.
NearestWarpingKernel & operator=(NearestWarpingKernel &&)=delete
~BilinearWarpingKernel() override=default
LanczosWarpingKernel & operator=(const LanczosWarpingKernel &)=delete
std::shared_ptr< Kernel > clone() const override
Return a pointer to a deep copy of this kernel.
traits class for image categories
BilinearWarpingKernel & operator=(BilinearWarpingKernel &&)=delete
A Function taking one argument.
int getInterpLength() const
get the interpolation length (pixels)
void setWarpingKernel(SeparableKernel const &warpingKernel)
set the warping kernel
A kernel described by a pair of functions: func(x, y) = colFunc(x) * rowFunc(y)
NearestFunction1(double fracPos)
Construct a Nearest interpolation function.
std::shared_ptr< Kernel > clone() const override
Return a pointer to a deep copy of this kernel.
int warpCenteredImage(DestImageT &destImage, SrcImageT const &srcImage, lsst::geom::LinearTransform const &linearTransform, lsst::geom::Point2D const ¢erPosition, WarpingControl const &control, typename DestImageT::SinglePixel padValue=lsst::afw::math::edgePixel< DestImageT >(typename lsst::afw::image::detail::image_traits< DestImageT >::image_category()))
Warp an image with a LinearTranform about a specified point.