Class PixelRegion

Class Documentation

class PixelRegion

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.

Unnamed Group

PixelRegion(PixelRegion const&)

PixelRegion is copy and move constructable and assignable.

PixelRegion(PixelRegion&&)
PixelRegion &operator=(PixelRegion const&)
PixelRegion &operator=(PixelRegion&&)
~PixelRegion()

Unnamed Group

Iterator begin() const

Iterator range over Spans whose pixels are within the Ellipse.

Iterator end() const

Public Types

using Iterator = std::vector<Span>::const_iterator

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

Public Functions

PixelRegion(Ellipse const &ellipse)

Construct a PixelRegion from an Ellipse.

lsst::geom::Box2I const &getBBox() const

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.

Span const getSpanAt(int y) const

Return the span at the given y coordinate value.

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