Class FootprintSet¶
Defined in File FootprintSet.h
Class Documentation¶
-
class
FootprintSet
¶ 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
-
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
-
typedef std::vector<std::shared_ptr<Footprint>>