LSST Applications 27.0.0,g0265f82a02+469cd937ee,g02d81e74bb+21ad69e7e1,g1470d8bcf6+cbe83ee85a,g2079a07aa2+e67c6346a6,g212a7c68fe+04a9158687,g2305ad1205+94392ce272,g295015adf3+81dd352a9d,g2bbee38e9b+469cd937ee,g337abbeb29+469cd937ee,g3939d97d7f+72a9f7b576,g487adcacf7+71499e7cba,g50ff169b8f+5929b3527e,g52b1c1532d+a6fc98d2e7,g591dd9f2cf+df404f777f,g5a732f18d5+be83d3ecdb,g64a986408d+21ad69e7e1,g858d7b2824+21ad69e7e1,g8a8a8dda67+a6fc98d2e7,g99cad8db69+f62e5b0af5,g9ddcbc5298+d4bad12328,ga1e77700b3+9c366c4306,ga8c6da7877+71e4819109,gb0e22166c9+25ba2f69a1,gb6a65358fc+469cd937ee,gbb8dafda3b+69d3c0e320,gc07e1c2157+a98bf949bb,gc120e1dc64+615ec43309,gc28159a63d+469cd937ee,gcf0d15dbbd+72a9f7b576,gdaeeff99f8+a38ce5ea23,ge6526c86ff+3a7c1ac5f1,ge79ae78c31+469cd937ee,gee10cc3b42+a6fc98d2e7,gf1cff7945b+21ad69e7e1,gfbcc870c63+9a11dc8c8f
LSST Data Management Base Package
|
A collection of Kernel images for special locations on a rectangular region of an image. More...
#include <Convolve.h>
Public Types | |
enum | Location { BOTTOM_LEFT , BOTTOM_RIGHT , TOP_LEFT , TOP_RIGHT } |
locations of various points in the region More... | |
using | KernelConstPtr = std::shared_ptr<const lsst::afw::math::Kernel> |
using | Image = lsst::afw::image::Image<lsst::afw::math::Kernel::Pixel> |
using | ImagePtr = std::shared_ptr<Image> |
using | ImageConstPtr = std::shared_ptr<const Image> |
Public Member Functions | |
KernelImagesForRegion (KernelConstPtr kernelPtr, lsst::geom::Box2I const &bbox, lsst::geom::Point2I const &xy0, bool doNormalize) | |
Construct a KernelImagesForRegion. | |
KernelImagesForRegion (KernelConstPtr kernelPtr, lsst::geom::Box2I const &bbox, lsst::geom::Point2I const &xy0, bool doNormalize, ImagePtr bottomLeftImagePtr, ImagePtr bottomRightImagePtr, ImagePtr topLeftImagePtr, ImagePtr topRightImagePtr) | |
Construct a KernelImagesForRegion with some or all corner images. | |
lsst::geom::Box2I | getBBox () const |
Get the bounding box for the region. | |
lsst::geom::Point2I | getXY0 () const |
Get xy0 of the image. | |
bool | getDoNormalize () const |
Get the doNormalize parameter. | |
ImagePtr | getImage (Location location) const |
Return the image and sum at the specified location. | |
KernelConstPtr | getKernel () const |
Get the kernel (as a shared pointer to const) | |
lsst::geom::Point2I | getPixelIndex (Location location) const |
Compute pixel index of a given location, relative to the parent image (thus offset by bottom left corner of bounding box) | |
bool | computeNextRow (RowOfKernelImagesForRegion ®ionRow) const |
Compute next row of subregions. | |
Static Public Member Functions | |
static int | getMinInterpolationSize () |
Get the minInterpolationSize class constant. | |
A collection of Kernel images for special locations on a rectangular region of an image.
See the Location enum for a list of those special locations.
This is a low-level helper class for recursive convolving with interpolation. Many of these objects may be created during a convolution, and many will share kernel images. It uses shared pointers to kernels and kernel images for increased speed and decreased memory usage (at the expense of safety). Note that null pointers are NOT acceptable for the constructors!
Also note that it uses lazy evaluation: images are computed when they are wanted.
Definition at line 172 of file Convolve.h.
using lsst::afw::math::detail::KernelImagesForRegion::Image = lsst::afw::image::Image<lsst::afw::math::Kernel::Pixel> |
Definition at line 175 of file Convolve.h.
Definition at line 177 of file Convolve.h.
Definition at line 176 of file Convolve.h.
using lsst::afw::math::detail::KernelImagesForRegion::KernelConstPtr = std::shared_ptr<const lsst::afw::math::Kernel> |
Definition at line 174 of file Convolve.h.
locations of various points in the region
RIGHT and TOP are one column/row beyond the region's bounding box. Thus adjacent regions share corner images.
The posiitions are: BOTTOM_LEFT, BOTTOM_RIGHT, TOP_LEFT, TOP_RIGHT
These locations always refer to the center of a pixel. Thus if the region has an odd size along an axis (so that the span to the top and right, which are one beyond, is even), the middle pixel will be 1/2 pixel off from the true center along that axis (in an unspecified direction).
Enumerator | |
---|---|
BOTTOM_LEFT | |
BOTTOM_RIGHT | |
TOP_LEFT | |
TOP_RIGHT |
Definition at line 192 of file Convolve.h.
lsst::afw::math::detail::KernelImagesForRegion::KernelImagesForRegion | ( | KernelConstPtr | kernelPtr, |
lsst::geom::Box2I const & | bbox, | ||
lsst::geom::Point2I const & | xy0, | ||
bool | doNormalize ) |
Construct a KernelImagesForRegion.
kernelPtr | kernel |
bbox | bounding box of region of an image for which we want to compute kernel images (inclusive and relative to parent image) |
xy0 | xy0 of image for which we want to compute kernel images |
doNormalize | normalize the kernel images? |
lsst::pex::exceptions::InvalidParameterError | if kernelPtr is null |
Definition at line 45 of file KernelImagesForRegion.cc.
lsst::afw::math::detail::KernelImagesForRegion::KernelImagesForRegion | ( | KernelConstPtr | kernelPtr, |
lsst::geom::Box2I const & | bbox, | ||
lsst::geom::Point2I const & | xy0, | ||
bool | doNormalize, | ||
ImagePtr | bottomLeftImagePtr, | ||
ImagePtr | bottomRightImagePtr, | ||
ImagePtr | topLeftImagePtr, | ||
ImagePtr | topRightImagePtr ) |
Construct a KernelImagesForRegion with some or all corner images.
Null corner image pointers are ignored.
kernelPtr | kernel |
bbox | bounding box of region of an image for which we want to compute kernel images (inclusive and relative to parent image) |
xy0 | xy0 of image |
doNormalize | normalize the kernel images? |
bottomLeftImagePtr | kernel image and sum at bottom left of region |
bottomRightImagePtr | kernel image and sum at bottom right of region |
topLeftImagePtr | kernel image and sum at top left of region |
topRightImagePtr | kernel image and sum at top right of region |
lsst::pex::exceptions::InvalidParameterError | if kernelPtr is null |
lsst::pex::exceptions::InvalidParameterError | if an image has the wrong dimensions |
Definition at line 58 of file KernelImagesForRegion.cc.
bool lsst::afw::math::detail::KernelImagesForRegion::computeNextRow | ( | RowOfKernelImagesForRegion & | regionRow | ) | const |
Compute next row of subregions.
For the first row call with a new RowOfKernelImagesForRegion (with the desired number of columns and rows). Every subequent call updates the data in the RowOfKernelImagesForRegion.
[in,out] | regionRow | RowOfKernelImagesForRegion object |
Definition at line 110 of file KernelImagesForRegion.cc.
|
inline |
Get the bounding box for the region.
Definition at line 234 of file Convolve.h.
|
inline |
Get the doNormalize parameter.
Definition at line 242 of file Convolve.h.
KernelImagesForRegion::ImagePtr lsst::afw::math::detail::KernelImagesForRegion::getImage | ( | Location | location | ) | const |
Return the image and sum at the specified location.
If the image has not yet been computed, it is computed at this time.
location | location of image |
Definition at line 77 of file KernelImagesForRegion.cc.
|
inline |
Get the kernel (as a shared pointer to const)
Definition at line 254 of file Convolve.h.
|
inlinestatic |
Get the minInterpolationSize class constant.
Definition at line 278 of file Convolve.h.
lsst::geom::Point2I lsst::afw::math::detail::KernelImagesForRegion::getPixelIndex | ( | Location | location | ) | const |
Compute pixel index of a given location, relative to the parent image (thus offset by bottom left corner of bounding box)
location | location for which to return pixel index |
Definition at line 88 of file KernelImagesForRegion.cc.
|
inline |