LSSTApplications
10.0+286,10.0+36,10.0+46,10.0-2-g4f67435,10.1+152,10.1+37,11.0,11.0+1,11.0-1-g47edd16,11.0-1-g60db491,11.0-1-g7418c06,11.0-2-g04d2804,11.0-2-g68503cd,11.0-2-g818369d,11.0-2-gb8b8ce7
LSSTDataManagementBasePackage
|
A class to evaluate image background levels. More...
#include <Background.h>
Public Member Functions | |
template<typename ImageT > | |
BackgroundMI (ImageT const &img, BackgroundControl const &bgCtrl) | |
Constructor for BackgroundMI. More... | |
BackgroundMI (geom::Box2I const imageDimensions, image::MaskedImage< InternalPixelT > const &statsImage) | |
virtual void | operator+= (float const delta) |
Add a scalar to the Background (equivalent to adding a constant to the original image) More... | |
virtual void | operator-= (float const delta) |
Subtract a scalar from the Background (equivalent to subtracting a constant from the original image) More... | |
double | getPixel (Interpolate::Style const style, int const x, int const y) const |
Method to retrieve the background level at a pixel coord. More... | |
double | getPixel (int const x, int const y) const |
Return the background value at a point. More... | |
lsst::afw::image::MaskedImage < InternalPixelT > | getStatsImage () const |
Return the image of statistical quantities extracted from the image. More... | |
Public Member Functions inherited from lsst::afw::math::Background | |
template<typename PixelT > | |
boost::shared_ptr < lsst::afw::image::Image < PixelT > > | getImage (Interpolate::Style const interpStyle, UndersampleStyle const undersampleStyle=THROW_EXCEPTION) const |
Method to interpolate and return the background for entire image. More... | |
template<typename PixelT > | |
boost::shared_ptr < lsst::afw::image::Image < PixelT > > | getImage (std::string const &interpStyle, std::string const &undersampleStyle="THROW_EXCEPTION") const |
Method to interpolate and return the background for entire image. More... | |
template<typename PixelT > | |
boost::shared_ptr < lsst::afw::image::Image < PixelT > > | getImage (lsst::afw::geom::Box2I const &bbox, Interpolate::Style const interpStyle, UndersampleStyle const undersampleStyle=THROW_EXCEPTION) const |
template<typename PixelT > | |
boost::shared_ptr < lsst::afw::image::Image < PixelT > > | getImage (lsst::afw::geom::Box2I const &bbox, std::string const &interpStyle, std::string const &undersampleStyle="THROW_EXCEPTION") const |
template<typename PixelT > | |
boost::shared_ptr < lsst::afw::image::Image < PixelT > > | getImage () const |
Method to interpolate and return the background for entire image. More... | |
Interpolate::Style | getAsUsedInterpStyle () const |
UndersampleStyle | getAsUsedUndersampleStyle () const |
boost::shared_ptr < math::Approximate < InternalPixelT > > | getApproximate (ApproximateControl const &actrl, UndersampleStyle const undersampleStyle=THROW_EXCEPTION) const |
Method to return an approximation to the background. More... | |
geom::Box2I | getImageBBox () const |
boost::shared_ptr < BackgroundControl > | getBackgroundControl () |
boost::shared_ptr < BackgroundControl const > | getBackgroundControl () const |
Public Member Functions inherited from lsst::daf::base::Citizen | |
Citizen (const std::type_info &) | |
Citizen (Citizen const &) | |
~Citizen () | |
Citizen & | operator= (Citizen const &) |
std::string | repr () const |
Return a string representation of a Citizen. More... | |
void | markPersistent (void) |
Mark a Citizen as persistent and not destroyed until process end. More... | |
memId | getId () const |
Return the Citizen's ID. More... | |
Private Member Functions | |
void | _setGridColumns (Interpolate::Style const interpStyle, UndersampleStyle const undersampleStyle, int const iX, std::vector< int > const &ypix) const |
template<typename PixelT > | |
boost::shared_ptr < image::Image< PixelT > > | doGetImage (geom::Box2I const &bbox, Interpolate::Style const interpStyle_, UndersampleStyle const undersampleStyle) const |
template<typename PixelT > | |
boost::shared_ptr< Approximate < PixelT > > | doGetApproximate (ApproximateControl const &actrl, UndersampleStyle const undersampleStyle) const |
Private Attributes | |
lsst::afw::image::MaskedImage < InternalPixelT > | _statsImage |
std::vector< std::vector < double > > | _gridColumns |
Additional Inherited Members | |
Public Types inherited from lsst::afw::math::Background | |
typedef float | InternalPixelT |
type used for any internal images, and returned by getApproximate More... | |
Public Types inherited from lsst::daf::base::Citizen | |
enum | { magicSentinel = 0xdeadbeef } |
typedef unsigned long | memId |
Type of the block's ID. More... | |
typedef memId(* | memNewCallback )(const memId cid) |
A function used to register a callback. More... | |
typedef memId(* | memCallback )(const Citizen *ptr) |
Static Public Member Functions inherited from lsst::daf::base::Citizen | |
static bool | hasBeenCorrupted () |
Check all allocated blocks for corruption. More... | |
static memId | getNextMemId () |
Return the memId of the next object to be allocated. More... | |
static int | init () |
Called once when the memory system is being initialised. More... | |
static int | census (int, memId startingMemId=0) |
How many active Citizens are there? More... | |
static void | census (std::ostream &stream, memId startingMemId=0) |
Print a list of all active Citizens to stream, sorted by ID. More... | |
static const std::vector < const Citizen * > * | census () |
Return a (newly allocated) std::vector of active Citizens sorted by ID. More... | |
static memId | setNewCallbackId (memId id) |
Call the NewCallback when block is allocated. More... | |
static memId | setDeleteCallbackId (memId id) |
Call the current DeleteCallback when block is deleted. More... | |
static memNewCallback | setNewCallback (memNewCallback func) |
Set the NewCallback function. More... | |
static memCallback | setDeleteCallback (memCallback func) |
Set the DeleteCallback function. More... | |
static memCallback | setCorruptionCallback (memCallback func) |
Set the CorruptionCallback function. More... | |
Protected Member Functions inherited from lsst::afw::math::Background | |
template<typename ImageT > | |
Background (ImageT const &img, BackgroundControl const &bgCtrl) | |
Constructor for Background. More... | |
Background (geom::Box2I const imageBBox, int const nx, int const ny) | |
virtual | ~Background () |
dtor More... | |
Protected Attributes inherited from lsst::afw::math::Background | |
geom::Box2I | _imgBBox |
size and origin of input image More... | |
boost::shared_ptr < BackgroundControl > | _bctrl |
control info set by user. More... | |
Interpolate::Style | _asUsedInterpStyle |
the style we actually used More... | |
UndersampleStyle | _asUsedUndersampleStyle |
the undersampleStyle we actually used More... | |
std::vector< double > | _xcen |
x center pix coords of sub images More... | |
std::vector< double > | _ycen |
y center ... More... | |
std::vector< int > | _xorig |
x origin pix coords of sub images More... | |
std::vector< int > | _yorig |
y origin ... More... | |
std::vector< int > | _xsize |
x size of sub images More... | |
std::vector< int > | _ysize |
y size ... More... | |
A class to evaluate image background levels.
Break an image up into nx*ny sub-images and use a statistical to estimate the background levels in each square. Then use a user-specified or algorithm to estimate background at a given pixel coordinate.
Methods are available to return the background at a point (inefficiently), or an entire background image. BackgroundControl contains a public StatisticsControl member to allow user control of how the backgrounds are computed.
Definition at line 403 of file Background.h.
|
explicit |
Constructor for BackgroundMI.
Estimate the statistical properties of the Image in a grid of cells; we'll later call getImage() to interpolate those values, creating an image the same size as the original
img | ImageT (or MaskedImage) whose properties we want |
bgCtrl | Control how the BackgroundMI is estimated |
Definition at line 109 of file BackgroundMI.cc.
|
explicit |
Recreate a BackgroundMI from the statsImage and the original Image's BBox
imageBBox | unbinned Image's BBox |
statsImage | Internal stats image |
Definition at line 139 of file BackgroundMI.cc.
|
private |
Definition at line 147 of file BackgroundMI.cc.
|
private |
Definition at line 418 of file BackgroundMI.cc.
|
private |
Definition at line 259 of file BackgroundMI.cc.
double lsst::afw::math::BackgroundMI::getPixel | ( | Interpolate::Style const | interpStyle, |
int const | x, | ||
int const | y | ||
) | const |
Method to retrieve the background level at a pixel coord.
interpStyle | How to interpolate |
x | x-pixel coordinate (column) |
y | y-pixel coordinate (row) |
Definition at line 231 of file BackgroundMI.cc.
|
inline |
Return the background value at a point.
Definition at line 423 of file Background.h.
|
inline |
Return the image of statistical quantities extracted from the image.
Definition at line 429 of file Background.h.
|
virtual |
Add a scalar to the Background (equivalent to adding a constant to the original image)
delta | Value to add |
Implements lsst::afw::math::Background.
Definition at line 208 of file BackgroundMI.cc.
|
virtual |
Subtract a scalar from the Background (equivalent to subtracting a constant from the original image)
delta | Value to subtract |
Implements lsst::afw::math::Background.
Definition at line 217 of file BackgroundMI.cc.
|
mutableprivate |
Definition at line 435 of file Background.h.
|
private |
Definition at line 434 of file Background.h.