23 #if !defined(LSST_DETECTION_FOOTPRINT_H)
24 #define LSST_DETECTION_FOOTPRINT_H
49 namespace lsst {
namespace afw {
namespace detection {
67 typedef std::shared_ptr<Footprint>
Ptr;
68 typedef std::shared_ptr<const Footprint>
ConstPtr;
106 virtual bool isHeavy()
const {
return false; }
140 pex::exceptions::LogicError,
141 "Cannot change the PeakCatalog schema unless it is empty"
173 const Span&
addSpan(
const int y,
const int x0,
const int x1);
177 const Span&
addSpan(Span
const& span);
181 const Span&
addSpan(Span
const& span,
int dx,
int dy);
202 void shift(
int dx,
int dy);
222 template<
typename PixelT>
241 template<
typename MaskT>
253 template<
typename PixelT>
255 std::uint64_t
const id,
272 template<
typename PixelT>
274 std::uint64_t
const id,
275 bool const overwriteId,
long const idMask,
276 typename std::set<std::uint64_t> *oldIds,
293 template <
typename MaskPixelT>
296 MaskPixelT bitmask=~0
x0
311 geom::Box2I const & region,
427 bool left,
bool right,
bool up,
bool down);
442 template<typename ImageT>
445 typename ImageT::Pixel const value);
452 template<typename ImageT>
455 typename ImageT::Pixel const value);
462 template<typename ImageT>
465 typename ImageT::Pixel const value);
472 template<typename MaskT>
475 MaskT const bitmask);
484 template<typename MaskT>
487 MaskT const bitmask);
502 template <typename ImageOrMaskedImageT>
504 PTR(ImageOrMaskedImageT) const
input,
505 PTR(ImageOrMaskedImageT) output);
513 template<typename MaskT>
516 MaskT const bitmask);
523 template<typename MaskT>
526 MaskT const bitmask);
542 template<typename MaskT>
544 typename image::Mask<MaskT>::Ptr const& mask,
545 MaskT const bitmask);
An ellipse core with quadrupole moments as parameters.
Defines the fields and offsets for a table.
An include file to include the header files for lsst::afw::geom.
Public header class for ellipse library.
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.
Forward declarations and typedefs for afw::table.
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)
Shrink a footprint isotropically by nGrow pixels, returning a new Footprint.
boost::shared_ptr< Footprint > growFootprint(Footprint const &foot, int nGrow, bool isotropic=true)
Grow a Footprint by nGrow pixels, returning a new Footprint.
afw::table::CatalogT< PeakRecord > PeakCatalog
std::map< Citizen const *, CitizenInfo > table
An ellipse defined by an arbitrary BaseCore and a center point.
std::shared_ptr< Image< PixelT > > Ptr
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.
#define LSST_EXCEPT(type,...)
Create an exception with a given type and message and optionally other arguments (dependent on the ty...
std::vector< lsst::afw::geom::Box2I > footprintToBBoxList(Footprint const &foot)
Return a list of BBoxs, whose union contains exactly the pixels in foot, neither more nor less...
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...
#define CONST_PTR(...)
A shared pointer to a const object.
boost::shared_ptr< Footprint > mergeFootprints(Footprint const &foot1, Footprint const &foot2)
Merges two Footprints – appends their peaks, and unions their spans, returning a new Footprint...
Record class that represents a peak in a Footprint.
void nearestFootprint(std::vector< boost::shared_ptr< Footprint >> const &foots, lsst::afw::image::Image< std::uint16_t >::Ptr argmin, lsst::afw::image::Image< std::uint16_t >::Ptr dist)
Given a vector of Footprints, fills the output "argmin" and "dist" images to contain the Manhattan di...
A CRTP facade class for subclasses of Persistable.
A class to represent a 2-dimensional array of pixels.
void copyWithinFootprint(Footprint const &foot, boost::shared_ptr< ImageOrMaskedImageT > const input, boost::shared_ptr< ImageOrMaskedImageT > output)
Copies pixels from input image to output image within the Footprint's area.
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.