lsst.afw  13.0-73-gb2a4e38
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Classes | Public Member Functions | Protected Member Functions | List of all members
lsst::afw::detection::HeavyFootprint< ImagePixelT, MaskPixelT, VariancePixelT > Class Template Reference

A set of pixels in an Image, including those pixels' actual values. More...

#include <HeavyFootprint.h>

Inheritance diagram for lsst::afw::detection::HeavyFootprint< ImagePixelT, MaskPixelT, VariancePixelT >:
lsst::afw::table::io::PersistableFacade< HeavyFootprint< ImagePixelT, MaskPixelT, VariancePixelT > > lsst::afw::detection::Footprint lsst::afw::table::io::PersistableFacade< lsst::afw::detection::Footprint > lsst::afw::table::io::Persistable

Classes

class  Factory
 

Public Member Functions

 HeavyFootprint (Footprint const &foot, lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT > const &mimage, HeavyFootprintCtrl const *ctrl=NULL)
 Create a HeavyFootprint from a regular Footprint and the image that provides the pixel values. More...
 
 HeavyFootprint (Footprint const &foot, HeavyFootprintCtrl const *ctrl=NULL)
 Create a HeavyFootprint from a regular Footprint, allocating space to hold foot.getArea() pixels, but not initializing them. More...
 
 HeavyFootprint ()
 Default constructor for HeavyFootprint. More...
 
 HeavyFootprint (HeavyFootprint const &other)=default
 
 HeavyFootprint (HeavyFootprint &&other)=default
 
HeavyFootprint & operator= (HeavyFootprint const &)=default
 
HeavyFootprint & operator= (HeavyFootprint &&)=default
 
virtual bool isHeavy () const
 Is this a HeavyFootprint (yes!) More...
 
void insert (lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT > &mimage) const
 Replace all the pixels in the image with the values in the HeavyFootprint. More...
 
void insert (lsst::afw::image::Image< ImagePixelT > &image) const
 Replace all the pixels in the image with the values in the HeavyFootprint. More...
 
ndarray::Array< ImagePixelT, 1, 1 > getImageArray ()
 
ndarray::Array< MaskPixelT, 1, 1 > getMaskArray ()
 
ndarray::Array< VariancePixelT, 1, 1 > getVarianceArray ()
 
ndarray::Array< ImagePixelT
const, 1, 1 > 
getImageArray () const
 
ndarray::Array< MaskPixelT
const, 1, 1 > 
getMaskArray () const
 
ndarray::Array< VariancePixelT
const, 1, 1 > 
getVarianceArray () const
 
MaskPixelT getMaskBitsSet () const
 
double dot (HeavyFootprint< ImagePixelT, MaskPixelT, VariancePixelT > const &other) const
 Dot product between HeavyFootprints. More...
 
- Public Member Functions inherited from lsst::afw::detection::Footprint
 Footprint (std::shared_ptr< geom::SpanSet > inputSpans, geom::Box2I const &region=geom::Box2I())
 Constructor for Footprint object. More...
 
 Footprint (std::shared_ptr< geom::SpanSet > inputSpans, afw::table::Schema const &peakSchema, geom::Box2I const &region=geom::Box2I())
 Constructor for the Footprint object. More...
 
 Footprint ()
 Constructor of a empty Footprint object. More...
 
 Footprint (Footprint const &other)=default
 
 Footprint (Footprint &&)=default
 
Footprint & operator= (Footprint const &other)=default
 
Footprint & operator= (Footprint &&)=default
 
virtual ~Footprint ()
 
std::shared_ptr< geom::SpanSet > getSpans () const
 Return a shared pointer to the SpanSet. More...
 
void setSpans (std::shared_ptr< geom::SpanSet > otherSpanSet)
 Sets the shared pointer to the SpanSet in the Footprint. More...
 
PeakCatalog & getPeaks ()
 Return the Peaks contained in this Footprint. More...
 
const PeakCatalog & getPeaks () const
 
std::shared_ptr< PeakRecord > addPeak (float fx, float fy, float value)
 Convenience function to add a peak. More...
 
void sortPeaks (afw::table::Key< float > const &key=afw::table::Key< float >())
 Sort Peaks from most positive value to most negative. More...
 
void setPeakSchema (afw::table::Schema const &peakSchema)
 Set the Schema used by the PeakCatalog (will throw if PeakCatalog is not empty). More...
 
void setPeakCatalog (PeakCatalog const &otherPeaks)
 Set the peakCatalog to a copy of the supplied catalog. More...
 
std::size_t getArea () const
 Return the number of pixels in this Footprint. More...
 
geom::Point2D getCentroid () const
 Return the Footprint's centroid. More...
 
geom::ellipses::Quadrupole getShape () const
 Return the Footprint's shape (interpreted as an ellipse) More...
 
void shift (int dx, int dy)
 Shift a Footprint by (dx, dy) More...
 
void shift (geom::ExtentI const &d)
 Shift a Footprint by a given extent. More...
 
geom::Box2I getBBox () const
 Return the Footprint's bounding box. More...
 
geom::Box2I getRegion () const
 Return the corners of the MaskedImage the footprints live in. More...
 
void setRegion (geom::Box2I const &region)
 Set the corners of the MaskedImage wherein the footprints dwell. More...
 
void clipTo (geom::Box2I const &bbox)
 Clip the Footprint such that all values lie inside the supplied Bounding Box. More...
 
bool contains (geom::Point2I const &pix) const
 Tests if a pixel postion falls inside the Footprint. More...
 
std::shared_ptr< Footprint > transform (std::shared_ptr< image::Wcs > source, std::shared_ptr< image::Wcs > target, geom::Box2I const &region, bool doClip=true) const
 Transform the footprint from one WCS to another. More...
 
std::shared_ptr< Footprint > transform (geom::LinearTransform const &t, geom::Box2I const &region, bool doClip=true) const
 Return a new Footprint who's pixels are the product of applying the specified transformation. More...
 
std::shared_ptr< Footprint > transform (geom::AffineTransform const &t, geom::Box2I const &region, bool doClip=true) const
 Return a new Footprint who's pixels are the product of applying the specified transformation. More...
 
std::shared_ptr< Footprint > transform (geom::XYTransform const &t, geom::Box2I const &region, bool doClip=true) const
 Return a new Footprint who's pixels are the product of applying the specified transformation. More...
 
bool isPersistable () const override
 Report if this object is persistable. More...
 
void dilate (int r, geom::Stencil s=geom::Stencil::CIRCLE)
 Dilate the Footprint with a defined kernel. More...
 
void dilate (geom::SpanSet const &other)
 Dilate the Footprint with a defined kernel. More...
 
void erode (int r, geom::Stencil s=geom::Stencil::CIRCLE)
 Erode the Footprint with a defined kernel. More...
 
void erode (geom::SpanSet const &other)
 Erode the Footprint with a defined kernel. More...
 
void removeOrphanPeaks ()
 Remove peaks from the PeakCatalog that fall outside the area of the Footprint. More...
 
bool isContiguous () const
 Reports if the Footprint is simply connected or has multiple components. More...
 
std::vector< std::shared_ptr
< Footprint > > 
split () const
 Split a multi-component Footprint into a vector of contiguous Footprints. More...
 
bool operator== (Footprint const &other) const
 equality operator More...
 
- Public Member Functions inherited from lsst::afw::table::io::Persistable
void writeFits (std::string const &fileName, std::string const &mode="w") const
 Write the object to a regular FITS file. More...
 
void writeFits (fits::MemFileManager &manager, std::string const &mode="w") const
 Write the object to a FITS image in memory. More...
 
void writeFits (fits::Fits &fitsfile) const
 Write the object to an already-open FITS object. More...
 
virtual ~Persistable ()
 

Protected Member Functions

virtual std::string getPersistenceName () const
 Return the name correspoinging ot the persistence type. More...
 
virtual void write (OutputArchiveHandle &handle) const
 Write an instance of a Footprint to an output Archive. More...
 
- Protected Member Functions inherited from lsst::afw::detection::Footprint
std::string getPythonModule () const override
 Return the python module the object will live in. More...
 
- Protected Member Functions inherited from lsst::afw::table::io::Persistable
 Persistable ()
 
 Persistable (Persistable const &other)
 
void operator= (Persistable const &other)
 

Additional Inherited Members

- Static Public Member Functions inherited from lsst::afw::table::io::PersistableFacade< HeavyFootprint< ImagePixelT, MaskPixelT, VariancePixelT > >
static std::shared_ptr
< HeavyFootprint< ImagePixelT,
MaskPixelT, VariancePixelT > > 
readFits (fits::Fits &fitsfile)
 Read an object from an already open FITS object. More...
 
static std::shared_ptr
< HeavyFootprint< ImagePixelT,
MaskPixelT, VariancePixelT > > 
readFits (std::string const &fileName, int hdu=INT_MIN)
 Read an object from a regular FITS file. More...
 
static std::shared_ptr
< HeavyFootprint< ImagePixelT,
MaskPixelT, VariancePixelT > > 
readFits (fits::MemFileManager &manager, int hdu=INT_MIN)
 Read an object from a FITS file in memory. More...
 
- Static Public Member Functions inherited from lsst::afw::table::io::PersistableFacade< lsst::afw::detection::Footprint >
static std::shared_ptr
< lsst::afw::detection::Footprint > 
readFits (fits::Fits &fitsfile)
 Read an object from an already open FITS object. More...
 
static std::shared_ptr
< lsst::afw::detection::Footprint > 
readFits (std::string const &fileName, int hdu=INT_MIN)
 Read an object from a regular FITS file. More...
 
static std::shared_ptr
< lsst::afw::detection::Footprint > 
readFits (fits::MemFileManager &manager, int hdu=INT_MIN)
 Read an object from a FITS file in memory. More...
 
- Protected Types inherited from lsst::afw::table::io::Persistable
typedef io::OutputArchiveHandle OutputArchiveHandle
 
- Static Protected Member Functions inherited from lsst::afw::detection::Footprint
static std::unique_ptr< Footprint > readSpanSet (afw::table::BaseCatalog const &, afw::table::io::InputArchive const &)
 Static method used to unpersist the SpanSet member of the Footprint class. More...
 
static void readPeaks (afw::table::BaseCatalog const &, Footprint &)
 Static method used to unpersist the PeakCatalog member of the Footprint class. More...
 

Detailed Description

template<typename ImagePixelT, typename MaskPixelT = lsst::afw::image::MaskPixel, typename VariancePixelT = lsst::afw::image::VariancePixel>
class lsst::afw::detection::HeavyFootprint< ImagePixelT, MaskPixelT, VariancePixelT >

A set of pixels in an Image, including those pixels' actual values.

Definition at line 47 of file HeavyFootprint.h.

Constructor & Destructor Documentation

template<typename ImagePixelT , typename MaskPixelT , typename VariancePixelT >
lsst::afw::detection::HeavyFootprint< ImagePixelT, MaskPixelT, VariancePixelT >::HeavyFootprint ( Footprint const &  foot,
lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT > const &  mimage,
HeavyFootprintCtrl const *  ctrl = NULL 
)
explicit

Create a HeavyFootprint from a regular Footprint and the image that provides the pixel values.

Parameters
footThe Footprint defining the pixels to set
mimageThe pixel values
ctrlControl how we manipulate HeavyFootprints
Note
the HeavyFootprintCtrl is passed by const* not const& so that we needn't provide a definition in the header.

Definition at line 74 of file HeavyFootprint.cc.

template<typename ImagePixelT , typename MaskPixelT , typename VariancePixelT >
lsst::afw::detection::HeavyFootprint< ImagePixelT, MaskPixelT, VariancePixelT >::HeavyFootprint ( Footprint const &  foot,
HeavyFootprintCtrl const *  ctrl = NULL 
)
explicit

Create a HeavyFootprint from a regular Footprint, allocating space to hold foot.getArea() pixels, but not initializing them.

This is used when unpersisting a HeavyFootprint.

Parameters
footThe Footprint defining the pixels to set
ctrlControl how we manipulate HeavyFootprints

Definition at line 110 of file HeavyFootprint.cc.

template<typename ImagePixelT, typename MaskPixelT = lsst::afw::image::MaskPixel, typename VariancePixelT = lsst::afw::image::VariancePixel>
lsst::afw::detection::HeavyFootprint< ImagePixelT, MaskPixelT, VariancePixelT >::HeavyFootprint ( )
inline

Default constructor for HeavyFootprint.

Most common use for this will be in combination with the assignment operator

Definition at line 81 of file HeavyFootprint.h.

template<typename ImagePixelT, typename MaskPixelT = lsst::afw::image::MaskPixel, typename VariancePixelT = lsst::afw::image::VariancePixel>
lsst::afw::detection::HeavyFootprint< ImagePixelT, MaskPixelT, VariancePixelT >::HeavyFootprint ( HeavyFootprint< ImagePixelT, MaskPixelT, VariancePixelT > const &  other)
default
template<typename ImagePixelT, typename MaskPixelT = lsst::afw::image::MaskPixel, typename VariancePixelT = lsst::afw::image::VariancePixel>
lsst::afw::detection::HeavyFootprint< ImagePixelT, MaskPixelT, VariancePixelT >::HeavyFootprint ( HeavyFootprint< ImagePixelT, MaskPixelT, VariancePixelT > &&  other)
default

Member Function Documentation

template<typename ImagePixelT , typename MaskPixelT , typename VariancePixelT >
double lsst::afw::detection::HeavyFootprint< ImagePixelT, MaskPixelT, VariancePixelT >::dot ( HeavyFootprint< ImagePixelT, MaskPixelT, VariancePixelT > const &  other) const

Dot product between HeavyFootprints.

The mask and variance planes are ignored.

Definition at line 154 of file HeavyFootprint.cc.

template<typename ImagePixelT, typename MaskPixelT = lsst::afw::image::MaskPixel, typename VariancePixelT = lsst::afw::image::VariancePixel>
ndarray::Array<ImagePixelT, 1, 1> lsst::afw::detection::HeavyFootprint< ImagePixelT, MaskPixelT, VariancePixelT >::getImageArray ( )
inline

Definition at line 106 of file HeavyFootprint.h.

template<typename ImagePixelT, typename MaskPixelT = lsst::afw::image::MaskPixel, typename VariancePixelT = lsst::afw::image::VariancePixel>
ndarray::Array<ImagePixelT const, 1, 1> lsst::afw::detection::HeavyFootprint< ImagePixelT, MaskPixelT, VariancePixelT >::getImageArray ( ) const
inline

Definition at line 110 of file HeavyFootprint.h.

template<typename ImagePixelT, typename MaskPixelT = lsst::afw::image::MaskPixel, typename VariancePixelT = lsst::afw::image::VariancePixel>
ndarray::Array<MaskPixelT, 1, 1> lsst::afw::detection::HeavyFootprint< ImagePixelT, MaskPixelT, VariancePixelT >::getMaskArray ( )
inline

Definition at line 107 of file HeavyFootprint.h.

template<typename ImagePixelT, typename MaskPixelT = lsst::afw::image::MaskPixel, typename VariancePixelT = lsst::afw::image::VariancePixel>
ndarray::Array<MaskPixelT const, 1, 1> lsst::afw::detection::HeavyFootprint< ImagePixelT, MaskPixelT, VariancePixelT >::getMaskArray ( ) const
inline

Definition at line 111 of file HeavyFootprint.h.

template<typename ImagePixelT, typename MaskPixelT = lsst::afw::image::MaskPixel, typename VariancePixelT = lsst::afw::image::VariancePixel>
MaskPixelT lsst::afw::detection::HeavyFootprint< ImagePixelT, MaskPixelT, VariancePixelT >::getMaskBitsSet ( ) const
inline

Definition at line 115 of file HeavyFootprint.h.

template<typename ImagePixelT , typename MaskPixelT , typename VariancePixelT >
std::string lsst::afw::detection::HeavyFootprint< ImagePixelT, MaskPixelT, VariancePixelT >::getPersistenceName ( ) const
protectedvirtual

Return the name correspoinging ot the persistence type.

Reimplemented from lsst::afw::detection::Footprint.

Definition at line 264 of file HeavyFootprint.cc.

template<typename ImagePixelT, typename MaskPixelT = lsst::afw::image::MaskPixel, typename VariancePixelT = lsst::afw::image::VariancePixel>
ndarray::Array<VariancePixelT, 1, 1> lsst::afw::detection::HeavyFootprint< ImagePixelT, MaskPixelT, VariancePixelT >::getVarianceArray ( )
inline

Definition at line 108 of file HeavyFootprint.h.

template<typename ImagePixelT, typename MaskPixelT = lsst::afw::image::MaskPixel, typename VariancePixelT = lsst::afw::image::VariancePixel>
ndarray::Array<VariancePixelT const, 1, 1> lsst::afw::detection::HeavyFootprint< ImagePixelT, MaskPixelT, VariancePixelT >::getVarianceArray ( ) const
inline

Definition at line 112 of file HeavyFootprint.h.

template<typename ImagePixelT , typename MaskPixelT , typename VariancePixelT >
void lsst::afw::detection::HeavyFootprint< ImagePixelT, MaskPixelT, VariancePixelT >::insert ( lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT > &  mimage) const

Replace all the pixels in the image with the values in the HeavyFootprint.

Definition at line 118 of file HeavyFootprint.cc.

template<typename ImagePixelT , typename MaskPixelT , typename VariancePixelT >
void lsst::afw::detection::HeavyFootprint< ImagePixelT, MaskPixelT, VariancePixelT >::insert ( lsst::afw::image::Image< ImagePixelT > &  image) const

Replace all the pixels in the image with the values in the HeavyFootprint.

Parameters
[out]imageImage to set

Definition at line 126 of file HeavyFootprint.cc.

template<typename ImagePixelT, typename MaskPixelT = lsst::afw::image::MaskPixel, typename VariancePixelT = lsst::afw::image::VariancePixel>
virtual bool lsst::afw::detection::HeavyFootprint< ImagePixelT, MaskPixelT, VariancePixelT >::isHeavy ( ) const
inlinevirtual

Is this a HeavyFootprint (yes!)

Reimplemented from lsst::afw::detection::Footprint.

Definition at line 92 of file HeavyFootprint.h.

template<typename ImagePixelT, typename MaskPixelT = lsst::afw::image::MaskPixel, typename VariancePixelT = lsst::afw::image::VariancePixel>
HeavyFootprint& lsst::afw::detection::HeavyFootprint< ImagePixelT, MaskPixelT, VariancePixelT >::operator= ( HeavyFootprint< ImagePixelT, MaskPixelT, VariancePixelT > const &  )
default
template<typename ImagePixelT, typename MaskPixelT = lsst::afw::image::MaskPixel, typename VariancePixelT = lsst::afw::image::VariancePixel>
HeavyFootprint& lsst::afw::detection::HeavyFootprint< ImagePixelT, MaskPixelT, VariancePixelT >::operator= ( HeavyFootprint< ImagePixelT, MaskPixelT, VariancePixelT > &&  )
default
template<typename ImagePixelT , typename MaskPixelT , typename VariancePixelT >
void lsst::afw::detection::HeavyFootprint< ImagePixelT, MaskPixelT, VariancePixelT >::write ( OutputArchiveHandle &  handle) const
protectedvirtual

Write an instance of a Footprint to an output Archive.

Reimplemented from lsst::afw::detection::Footprint.

Definition at line 269 of file HeavyFootprint.cc.


The documentation for this class was generated from the following files: