LSSTApplications
20.0.0
LSSTDataManagementBasePackage
|
Go to the documentation of this file.
40 template <
typename ImageT>
42 std::string const& algorithmName,
unsigned int buffer
54 buffImage->assign(inImage, box);
56 buffImage = std::make_shared<ImageT>(inImage);
59 if (offsetKernel->
getWidth() > buffImage->getWidth() ||
60 offsetKernel->
getHeight() > buffImage->getHeight()) {
62 (
boost::format(
"Image of size %dx%d is too small to offset using a %s kernel"
64 buffImage->getWidth() % buffImage->getHeight() % algorithmName %
75 if (dx > -1 && dx < 1 && dy > -1 && dy < 1) {
81 dOrigX =
static_cast<int>(
std::floor(dx + 0.5));
82 dOrigY =
static_cast<int>(
std::floor(dy + 0.5));
88 double dKerX = -fracX;
89 double dKerY = -fracY;
105 convolve(*convImage, *buffImage, *offsetKernel,
true,
true);
113 outImage = convImage;
126 #define INSTANTIATE(TYPE) \
127 template std::shared_ptr<afwImage::Image<TYPE>> offsetImage(afwImage::Image<TYPE> const&, float, float, \
128 std::string const&, unsigned int); \
129 template std::shared_ptr<afwImage::MaskedImage<TYPE>> offsetImage( \
130 afwImage::MaskedImage<TYPE> const&, float, float, std::string const&, unsigned int);
Backwards-compatibility support for depersisting the old Calib (FluxMag0/FluxMag0Err) objects.
int getHeight() const
Return the Kernel's height.
def format(config, name=None, writeSourceLine=True, prefix="", verbose=False)
std::shared_ptr< SeparableKernel > makeWarpingKernel(std::string name)
Return a warping kernel given its name.
#define INSTANTIATE(FROMSYS, TOSYS)
lsst::geom::Point2I getCtr() const
Return index of kernel's center.
void setCtr(lsst::geom::Point2I ctr)
Set index of kernel's center.
Reports attempts to exceed implementation-defined length limits for some classes.
int getWidth() const
Return the Kernel's width.
A base class for image defects.
#define LSST_EXCEPT(type,...)
Create an exception with a given type.
void convolve(OutImageT &convolvedImage, InImageT const &inImage, KernelT const &kernel, ConvolutionControl const &convolutionControl=ConvolutionControl())
Convolve an Image or MaskedImage with a Kernel, setting pixels of an existing output image.
Extent< int, 2 > Extent2I
std::shared_ptr< ImageT > offsetImage(ImageT const &image, float dx, float dy, std::string const &algorithmName="lanczos5", unsigned int buffer=0)
Return an image offset by (dx, dy) using the specified algorithm.
An integer coordinate rectangle.
void setKernelParameters(std::vector< double > const ¶ms)
Set the kernel parameters of a spatially invariant kernel.