File FootprintSet.h¶
-
namespace
lsst
Class for a simple mapping implementing a generic AstrometryTransform.
Remove all non-astronomical counts from the Chunk Exposure’s pixels.
Forward declarations for lsst::utils::Cache
For details on the Cache class, see the Cache.h file.
It uses a template rather than a pointer so that the derived classes can use the specifics of the transform. The class simplePolyMapping overloads a few routines.
A base class for image defects
Numeric constants used by the Integrate.h integrator routines.
Compute Image Statistics
- Note
Gauss-Kronrod-Patterson quadrature coefficients for use in quadpack routine qng. These coefficients were calculated with 101 decimal digit arithmetic by L. W. Fullerton, Bell Labs, Nov 1981.
- Note
The Statistics class itself can only handle lsst::afw::image::MaskedImage() types. The philosophy has been to handle other types by making them look like lsst::afw::image::MaskedImage() and reusing that code. Users should have no need to instantiate a Statistics object directly, but should use the overloaded makeStatistics() factory functions.
-
namespace
afw
-
namespace
detection
Typedefs
-
typedef std::uint64_t
FootprintIdPixel
¶ Pixel type for FootprintSet::insertIntoImage()
This is independent of the template parameters for FootprintSet, and including it within FootprintSet makes it difficult for SWIG to interpret the type.
-
class
FootprintSet
- #include <FootprintSet.h>
A set of Footprints, associated with a MaskedImage
Public Types
-
typedef std::vector<std::shared_ptr<Footprint>>
FootprintList
The FootprintSet’s set of Footprints.
Public Functions
-
template<typename
ImagePixelT
>FootprintSet
(image::Image<ImagePixelT> const &img, Threshold const &threshold, int const npixMin = 1, bool const setPeaks = true) Find a FootprintSet given an Image and a threshold
- Parameters
img
: Image to search for objectsthreshold
: threshold to find objectsnpixMin
: minimum number of pixels in an objectsetPeaks
: should I set the Peaks list?
-
template<typename
MaskPixelT
>FootprintSet
(image::Mask<MaskPixelT> const &img, Threshold const &threshold, int const npixMin = 1) Find a FootprintSet given a Mask and a threshold
- Parameters
img
: Image to search for objectsthreshold
: threshold to find objectsnpixMin
: minimum number of pixels in an object
-
template<typename
ImagePixelT
, typenameMaskPixelT
>FootprintSet
(image::MaskedImage<ImagePixelT, MaskPixelT> const &img, Threshold const &threshold, std::string const &planeName = "", int const npixMin = 1, bool const setPeaks = true) Find a FootprintSet given a MaskedImage and a threshold
Go through an image, finding sets of connected pixels above threshold and assembling them into Footprints; the resulting set of objects is returned
If threshold.getPolarity() is true, pixels above the Threshold are assembled into Footprints; if it’s false, then pixels below Threshold are processed (Threshold will probably have to be below the background level for this to make sense, e.g. for difference imaging)
- Parameters
img
: MaskedImage to search for objectsthreshold
: threshold for footprints (controls size)planeName
: mask plane to set (if != “”)npixMin
: minimum number of pixels in an objectsetPeaks
: should I set the Peaks list?
-
FootprintSet
(lsst::geom::Box2I region) Construct an empty FootprintSet given a region that its footprints would have lived in
- Parameters
region
: the desired region
-
FootprintSet
(FootprintSet const &rhs) Copy constructor
- Parameters
rhs
: the input FootprintSet
-
FootprintSet
(FootprintSet const &set, int rGrow, FootprintControl const &ctrl)
-
FootprintSet
(FootprintSet &&rhs)
-
~FootprintSet
()
-
FootprintSet
(FootprintSet const &set, int rGrow, bool isotropic = true) Grow all the Footprints in the input FootprintSet, returning a new FootprintSet
The output FootprintSet may contain fewer Footprints, as some may well have been merged
- Note
Isotropic grows are significantly slower
- Parameters
set
: the input FootprintSetrGrow
: Grow Footprints by r pixelsisotropic
: Grow isotropically (as opposed to a Manhattan metric)
-
FootprintSet
(FootprintSet const &footprints1, FootprintSet const &footprints2, bool const includePeaks) Return the FootprintSet corresponding to the merge of two input FootprintSets
-
FootprintSet &
operator=
(FootprintSet const &rhs) Assignment operator.
-
FootprintSet &
operator=
(FootprintSet &&rhs)
-
void
swap
(FootprintSet &rhs)
-
void
swapFootprintList
(FootprintList &rhs)
-
std::shared_ptr<FootprintList>
getFootprints
() : Return the Footprints of detected objects
: Set the Footprints of detected objects
-
std::shared_ptr<FootprintList const> const
getFootprints
() const Retun the Footprints of detected objects
-
void
makeSources
(afw::table::SourceCatalog &catalog) const Add a new record corresponding to each footprint to a SourceCatalog.
The new sources will have their footprints set to point to the footprints in the footprint set; they will not be deep-copied.
- Parameters
[inout] catalog
: Catalog to append new sources to.
-
void
setRegion
(lsst::geom::Box2I const ®ion) Set the corners of the FootprintSet’s MaskedImage to region
- Note
updates all the Footprints’ regions too
- Parameters
region
: desired region
-
lsst::geom::Box2I const
getRegion
() const Return the corners of the MaskedImage
-
std::shared_ptr<image::Image<FootprintIdPixel>>
insertIntoImage
() const Return an Image with pixels set to the Footprints in the FootprintSet
- Return
an std::shared_ptr<image::Image>
-
template<typename
MaskPixelT
>
voidsetMask
(image::Mask<MaskPixelT> *mask, std::string const &planeName) - Parameters
mask
: Set bits in the maskplaneName
: Here’s the name of the mask plane to fit
- Parameters
mask
: Set bits in the maskplaneName
: Here’s the name of the mask plane to fit
-
void
merge
(FootprintSet const &rhs, int tGrow = 0, int rGrow = 0, bool isotropic = true) Merge a FootprintSet into *this
- Parameters
rhs
: the Footprints to mergetGrow
: No. of pixels to grow this FootprintsrGrow
: No. of pixels to grow rhs Footprintsisotropic
: Use (expensive) isotropic grow
-
template<typename
ImagePixelT
, typenameMaskPixelT
>
voidmakeHeavy
(image::MaskedImage<ImagePixelT, MaskPixelT> const &mimg, HeavyFootprintCtrl const *ctrl = NULL) Convert all the Footprints in the FootprintSet to be HeavyFootprints
- Parameters
mimg
: the image providing pixel valuesctrl
: Control how we manipulate HeavyFootprints
Private Members
-
std::shared_ptr<FootprintList>
_footprints
¶ the Footprints of detected objects
-
typedef std::vector<std::shared_ptr<Footprint>>
-
typedef std::uint64_t
-
namespace