Class Background¶
Defined in File Background.h
Inheritance Relationships¶
Derived Type¶
public lsst::afw::math::BackgroundMI
(Class BackgroundMI)
Class Documentation¶
-
class
Background
¶ A virtual base class to evaluate image background levels
Subclassed by lsst::afw::math::BackgroundMI
Public Types
-
typedef float
InternalPixelT
¶ type used for any internal images, and returned by getApproximate
Public Functions
-
Background
(Background const&)¶
-
Background
(Background&&)¶
-
Background &
operator=
(Background const&)¶
-
Background &
operator=
(Background&&)¶
-
virtual Background &
operator+=
(float const delta) = 0¶ Add a constant level to a background.
-
virtual Background &
operator-=
(float const delta) = 0¶ Subtract a constant level from a background.
Method to interpolate and return the background for entire image
- Return
A boost shared-pointer to an image containing the estimated background
- Parameters
interpStyle
: Style of the interpolationundersampleStyle
: Behaviour if there are too few points
Method to interpolate and return the background for entire image
- Return
A boost shared-pointer to an image containing the estimated background
- Parameters
interpStyle
: Style of the interpolationundersampleStyle
: Behaviour if there are too few points
- Parameters
bbox
: Bounding box for sub-imageinterpStyle
: Style of the interpolationundersampleStyle
: Behaviour if there are too few points
- Parameters
bbox
: Bounding box for sub-imageinterpStyle
: Style of the interpolationundersampleStyle
: Behaviour if there are too few points
Method to interpolate and return the background for entire image
-
Interpolate::Style
getAsUsedInterpStyle
() const¶ Return the Interpolate::Style that we actually used in the last call to getImage()
N.b. Interpolate can fallback to a lower order if there aren’t enough samples
-
UndersampleStyle
getAsUsedUndersampleStyle
() const¶ Return the UndersampleStyle that we actually used in the last call to getImage()
-
std::shared_ptr<math::Approximate<InternalPixelT>>
getApproximate
(ApproximateControl const &actrl, UndersampleStyle const undersampleStyle = THROW_EXCEPTION) const¶ Method to return an approximation to the background
- Parameters
actrl
: Approximation styleundersampleStyle
: Behaviour if there are too few points
-
std::shared_ptr<BackgroundControl>
getBackgroundControl
()¶
-
std::shared_ptr<BackgroundControl const>
getBackgroundControl
() const¶
Protected Functions
-
template<typename
ImageT
>Background
(ImageT const &img, BackgroundControl const &bgCtrl)¶ Constructor for Background
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
- Note
The old and deprecated API specified the interpolation style as part of the BackgroundControl object passed to this ctor. This is still supported, but the work isn’t done until the getImage() method is called
- Parameters
img
: ImageT (or MaskedImage) whose properties we wantbgCtrl
: Control how the Background is estimated
-
Background
(lsst::geom::Box2I const imageBBox, int const nx, int const ny)¶ Create a Background without any values in it
- Note
This ctor is mostly used to create a Background given its sample values, and that (in turn) is mostly used to implement persistence.
- Parameters
imageBBox
: Bounding box for image to be created by getImage()nx
: Number of samples in x-directionny
: Number of samples in y-direction
-
virtual
~Background
()¶ dtor
-
lsst::afw::math::Background::BOOST_PP_SEQ_FOR_EACH(LSST_makeBackground_getImage, ( Background::InternalPixelT ))
Protected Attributes
-
std::shared_ptr<BackgroundControl>
_bctrl
¶ control info set by user.
-
Interpolate::Style
_asUsedInterpStyle
¶ the style we actually used
-
UndersampleStyle
_asUsedUndersampleStyle
¶ the undersampleStyle we actually used
-
std::vector<double>
_xcen
¶ x center pix coords of sub images
-
std::vector<double>
_ycen
¶ y center …
-
std::vector<int>
_xorig
¶ x origin pix coords of sub images
-
std::vector<int>
_yorig
¶ y origin …
-
std::vector<int>
_xsize
¶ x size of sub images
-
std::vector<int>
_ysize
¶ y size …
-
typedef float