29 #ifndef LSST_AFW_MATH_WARPEXPOSURE_H 30 #define LSST_AFW_MATH_WARPEXPOSURE_H 87 void setKernelParameter(
unsigned int ind,
double value)
const override;
129 this->_params[0] = fracPos;
151 void setKernelParameter(
unsigned int ind,
double value)
const override;
192 this->_params[0] = fracPos;
214 void setKernelParameter(
unsigned int ind,
double value)
const override;
267 int interpLength = 0,
272 : _warpingKernelPtr(makeWarpingKernel(warpingKernelName)),
273 _maskWarpingKernelPtr(),
275 _interpLength(interpLength),
276 _growFullMask(growFullMask) {
277 setMaskWarpingKernelName(maskWarpingKernelName);
315 _interpLength = interpLength;
350 void setMaskWarpingKernelName(
std::string const &maskWarpingKernelName
373 _growFullMask = growFullMask;
399 template <
typename DestExposureT,
typename SrcExposureT>
401 DestExposureT &destExposure,
402 SrcExposureT
const &srcExposure,
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>
462 SrcImageT
const &srcImage,
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,
502 typename DestImageT::SinglePixel padValue = lsst::afw::math::edgePixel<DestImageT>(
511 #endif // !defined(LSST_AFW_MATH_WARPEXPOSURE_H) lsst::afw::image::MaskPixel getGrowFullMask() const
get mask bits to grow to full width of image/variance kernel
A 2-dimensional celestial WCS that transform pixels to ICRS RA/Dec, using the LSST standard for pixel...
afw::table::Key< int > cacheSize
1-dimensional Lanczos function
afw::table::Key< std::string > warpingKernelName
int warpImage(DestImageT &destImage, SrcImageT const &srcImage, geom::TransformPoint2ToPoint2 const &srcToDest, WarpingControl const &control, typename DestImageT::SinglePixel padValue=lsst::afw::math::edgePixel< DestImageT >(typename lsst::afw::image::detail::image_traits< DestImageT >::image_category()))
A variant of warpImage that uses a Transform<Point2Endpoint, Point2Endpoint> instead of a pair of WCS...
Function1Ptr clone() const override
Return a pointer to a deep copy of this function.
A kernel described by a pair of functions: func(x, y) = colFunc(x) * rowFunc(y)
Parameters to control convolution.
LanczosWarpingKernel(int order)
void setCacheSize(int cacheSize)
set the cache size for the interpolation kernel(s)
std::shared_ptr< Function1< Kernel::Pixel > > Function1Ptr
std::shared_ptr< SeparableKernel > makeWarpingKernel(std::string name)
Return a warping kernel given its name.
~BilinearFunction1() override
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.
A base class for image defects.
virtual ~WarpingControl()
int getInterpLength() const
get the interpolation length (pixels)
void setInterpLength(int interpLength)
set the interpolation length
void setGrowFullMask(lsst::afw::image::MaskPixel growFullMask)
set mask bits to grow to full width of image/variance kernel
1-dimensional bilinear interpolation function.
int getCacheSize() const
get the cache size for the interpolation kernel(s)
A Function taking one argument.
traits class for image categories
~NearestFunction1() override
Bilinear warping: fast; good for undersampled data.
Function1Ptr clone() const override
Return a pointer to a deep copy of this function.
std::shared_ptr< Function1< Kernel::Pixel > > Function1Ptr
Nearest neighbor warping: fast; good for undersampled data.
NearestFunction1(double fracPos)
Construct a Nearest interpolation function.
BilinearFunction1(double fracPos)
Construct a Bilinear interpolation function.
Lanczos warping: accurate but slow and can introduce ringing artifacts.
ImageT::image_category image_category
bool hasMaskWarpingKernel() const
return true if there is a mask kernel
1-dimensional nearest neighbor interpolation function.
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.
Kernels are used for convolution with MaskedImages and (eventually) Images.
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.