lsst.afw
20.0.0-2-gf99403173
|
Go to the documentation of this file.
26 #include "boost/optional.hpp"
66 _center(ellipse.getCenter()),
67 _p(0.0), _t(0.0), _r(0.0)
76 _r = q(0, 0) - q(0, 1)*_p;
81 boost::optional<std::pair<double, double>>
xAt(
double y)
const {
82 double yc =
y - _center.getY();
83 double xc = _p*yc + _center.getX();
84 double s = _r - _t*yc*yc;
101 : _bbox(ellipse.computeBBox(),
lsst::geom::Box2I::EXPAND)
118 int const yEnd = envelope.
getEndY();
120 auto x = intersection.
xAt(
y);
124 if (xMax < xMin)
continue;
125 _spans.emplace_back(
y, xMin, xMax);
136 "PixelRegion is empty."
142 (boost::format(
"No span at y=%s in pixel region with rows between y=%s and y=%s")
A range of pixels within one row of an Image.
lsst::geom::Box2D computeBBox() const
Return the bounding box of the ellipse.
bool isEmpty() const noexcept
int getEndY() const noexcept
Matrix const & getMatrix() const
Return a 2x2 symmetric matrix of the parameters.
boost::optional< std::pair< double, double > > xAt(double y) const
PixelRegion(Ellipse const &ellipse)
Construct a PixelRegion from an Ellipse.
int getBeginY() const noexcept
EllipseHorizontalLineIntersection(Ellipse const &ellipse)
void include(Point2I const &point)
A base class for image defects.
#define LSST_EXCEPT(type,...)
Span const getSpanAt(int y) const
Return the span at the given y coordinate value.
An ellipse defined by an arbitrary BaseCore and a center point.
An ellipse core with quadrupole moments as parameters.
int getMaxY() const noexcept
void normalize() override
Put the parameters into a "standard form", and throw InvalidParameterError if they cannot be normaliz...
BaseCore const & getCore() const
Return the ellipse core.
int getMinY() const noexcept