lsst.afw  22.0.1-27-ga185acb71+cd0c1e0a06
Public Types | Public Member Functions | List of all members
lsst::afw::geom::ellipses::PixelRegion Class Referencefinal

A pixelized region containing all pixels whose centers are within an Ellipse. More...

#include <PixelRegion.h>

Public Types

using Iterator = std::vector< Span >::const_iterator
 Iterator type used by begin() and end(). More...
 

Public Member Functions

 PixelRegion (Ellipse const &ellipse)
 Construct a PixelRegion from an Ellipse. More...
 
 PixelRegion (PixelRegion const &)=default
 PixelRegion is copy and move constructable and assignable. More...
 
 PixelRegion (PixelRegion &&)=default
 
PixelRegionoperator= (PixelRegion const &)=default
 
PixelRegionoperator= (PixelRegion &&)=default
 
 ~PixelRegion ()=default
 
Iterator begin () const
 Iterator range over Spans whose pixels are within the Ellipse. More...
 
Iterator end () const
 
lsst::geom::Box2I const & getBBox () const
 Return the bounding box of the pixel region. More...
 
Span const getSpanAt (int y) const
 Return the span at the given y coordinate value. More...
 

Detailed Description

A pixelized region containing all pixels whose centers are within an Ellipse.

The pixel region for an ellipse may be larger or smaller in area than the ellipse itself, depending on the details of where pixel centers land, and it may be empty even if the area of the ellipse is nonzero.

Definition at line 46 of file PixelRegion.h.

Member Typedef Documentation

◆ Iterator

Iterator type used by begin() and end().

Definition at line 50 of file PixelRegion.h.

Constructor & Destructor Documentation

◆ PixelRegion() [1/3]

lsst::afw::geom::ellipses::PixelRegion::PixelRegion ( Ellipse const &  ellipse)
explicit

Construct a PixelRegion from an Ellipse.

Definition at line 100 of file PixelRegion.cc.

◆ PixelRegion() [2/3]

lsst::afw::geom::ellipses::PixelRegion::PixelRegion ( PixelRegion const &  )
default

PixelRegion is copy and move constructable and assignable.

◆ PixelRegion() [3/3]

lsst::afw::geom::ellipses::PixelRegion::PixelRegion ( PixelRegion &&  )
default

◆ ~PixelRegion()

lsst::afw::geom::ellipses::PixelRegion::~PixelRegion ( )
default

Member Function Documentation

◆ begin()

Iterator lsst::afw::geom::ellipses::PixelRegion::begin ( ) const
inline

Iterator range over Spans whose pixels are within the Ellipse.

Definition at line 68 of file PixelRegion.h.

◆ end()

Iterator lsst::afw::geom::ellipses::PixelRegion::end ( ) const
inline

Definition at line 69 of file PixelRegion.h.

◆ getBBox()

lsst::geom::Box2I const& lsst::afw::geom::ellipses::PixelRegion::getBBox ( ) const
inline

Return the bounding box of the pixel region.

This is guaranteed to be the smallest box that includes all Spans. It has no guaranteed relationship with the Ellipse's direct (floating-point) bounding box as computed by Ellipse::computeBBox(), and may be empty even if the Ellipse's bounding box is not.

Definition at line 80 of file PixelRegion.h.

◆ getSpanAt()

Span const lsst::afw::geom::ellipses::PixelRegion::getSpanAt ( int  y) const

Return the span at the given y coordinate value.

Exceptions
lsst::pex::exceptions::OutOfRangeErrorThrown if y is not within the y bounds of getBBox().

Definition at line 132 of file PixelRegion.cc.

◆ operator=() [1/2]

PixelRegion& lsst::afw::geom::ellipses::PixelRegion::operator= ( PixelRegion &&  )
default

◆ operator=() [2/2]

PixelRegion& lsst::afw::geom::ellipses::PixelRegion::operator= ( PixelRegion const &  )
default

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