LSSTApplications
20.0.0
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.