23 #if !defined(LSST_DETECTION_FOOTPRINT_H)
24 #define LSST_DETECTION_FOOTPRINT_H
36 #include <boost/cstdint.hpp>
37 #include <boost/shared_ptr.hpp>
49 namespace boost {
namespace serialization {
54 using boost::serialization::make_nvp;
57 namespace lsst {
namespace afw {
namespace detection {
75 typedef boost::shared_ptr<Footprint>
Ptr;
76 typedef boost::shared_ptr<const Footprint>
ConstPtr;
112 virtual bool isHeavy()
const {
return false; }
158 const Span&
addSpan(
const int y,
const int x0,
const int x1);
162 const Span&
addSpan(Span
const& span);
166 const Span&
addSpan(Span
const& span,
int dx,
int dy);
208 template<
typename PixelT>
230 template<
typename PixelT>
232 boost::uint64_t
const id,
249 template<
typename PixelT>
251 boost::uint64_t
const id,
252 bool const overwriteId,
long const idMask,
253 typename std::set<boost::uint64_t> *oldIds,
270 template <
typename MaskPixelT>
273 MaskPixelT bitmask=~0
x0
288 geom::Box2I const & region,
322 template <
typename Archive>
323 void serialize(Archive & ar,
const unsigned int version);
399 bool left,
bool right,
bool up,
bool down);
414 template<typename ImageT>
417 typename ImageT::Pixel const value);
424 template<typename ImageT>
427 typename ImageT::Pixel const value);
434 template<typename ImageT>
437 typename ImageT::Pixel const value);
444 template<typename MaskT>
447 MaskT const bitmask);
456 template<typename MaskT>
459 MaskT const bitmask);
468 template <typename ImageOrMaskedImageT>
470 PTR(ImageOrMaskedImageT) const input,
471 PTR(ImageOrMaskedImageT) output);
479 template<typename MaskT>
482 MaskT const bitmask);
489 template<typename MaskT>
492 MaskT const bitmask);
508 template<typename MaskT>
510 typename image::Mask<MaskT>::Ptr const& mask,
511 MaskT const bitmask);
An ellipse core with quadrupole moments as parameters.
void nearestFootprint(std::vector< boost::shared_ptr< Footprint >> const &foots, lsst::afw::image::Image< boost::uint16_t >::Ptr argmin, lsst::afw::image::Image< boost::uint16_t >::Ptr dist)
An include file to include the header files for lsst::afw::geom.
Public header class for ellipse library.
A custom container class for records, based on std::vector.
A range of pixels within one row of an Image.
boost::shared_ptr< Footprint > footprintAndMask(boost::shared_ptr< Footprint > const &foot, typename image::Mask< MaskT >::Ptr const &mask, MaskT const bitmask)
Return a Footprint that's the intersection of a Footprint with a Mask.
io::OutputArchiveHandle OutputArchiveHandle
Implementation of the WCS standard for a any projection.
boost::shared_ptr< Image< PixelT > > Ptr
An integer coordinate rectangle.
table::Key< table::Array< Kernel::Pixel > > image
A base class for objects that can be persisted via afw::table::io Archive classes.
boost::shared_ptr< Footprint > shrinkFootprint(Footprint const &foot, int nGrow, bool isotropic)
boost::shared_ptr< Footprint > growFootprint(Footprint const &foot, int nGrow, bool isotropic=true)
Represent a 2-dimensional array of bitmask pixels.
An ellipse defined by an arbitrary BaseCore and a center point.
MaskT clearMaskFromFootprint(lsst::afw::image::Mask< MaskT > *mask, Footprint const &footprint, MaskT const bitmask)
(AND ~bitmask) all the Mask's pixels that are in the Footprint; that is, set to zero in the Mask-inte...
ImageT::Pixel setImageFromFootprint(ImageT *image, Footprint const &footprint, typename ImageT::Pixel const value)
Set all image pixels in a Footprint to a given value.
Support for peaks in images.
std::vector< lsst::afw::geom::Box2I > footprintToBBoxList(Footprint const &foot)
MaskT setMaskFromFootprint(lsst::afw::image::Mask< MaskT > *mask, Footprint const &footprint, MaskT const bitmask)
OR bitmask into all the Mask's pixels that are in the Footprint.
Implementation of the Class MaskedImage.
Citizen is a class that should be among all LSST classes base classes, and handles basic memory manag...
boost::shared_ptr< Footprint > mergeFootprints(Footprint const &foot1, Footprint const &foot2)
A CRTP facade class for subclasses of Persistable.
void copyWithinFootprint(Footprint const &foot, boost::shared_ptr< ImageOrMaskedImageT > const input, boost::shared_ptr< ImageOrMaskedImageT > output)
ImageT::Pixel setImageFromFootprintList(ImageT *image, boost::shared_ptr< std::vector< boost::shared_ptr< Footprint >> const > footprints, typename ImageT::Pixel const value)
Set all image pixels in a set of Footprints to a given value.
MaskT setMaskFromFootprintList(lsst::afw::image::Mask< MaskT > *mask, std::vector< boost::shared_ptr< Footprint >> const &footprints, MaskT const bitmask)
OR bitmask into all the Mask's pixels which are in the set of Footprints.