Template Function lsst::afw::math::offsetImage

Function Documentation

template<typename ImageT>
std::shared_ptr<ImageT> lsst::afw::math::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

Note

The image pixels are always offset by a fraction of a pixel and the image origin (XY0) picks is modified to handle the integer portion of the offset. In the special case that the offset in both x and y lies in the range (-1, 1) the origin is not changed. Otherwise the pixels are shifted by (-0.5, 0.5] pixels and the origin shifted accordingly.

Parameters
  • image: The image to offset

  • dx: move the image this far in the column direction

  • dy: move the image this far in the row direction

  • algorithmName: Type of resampling Kernel to use

  • buffer: Width of buffer (border) around kernel image to allow for warping edge effects (pixels). Values < 0 are treated as 0. This is only used during computation; the final image has the same dimensions as the kernel.

Exceptions
  • lsst::pex::exceptions::InvalidParameterError: if the algorithm is invalid