24 #ifndef LSST_AFW_GEOM_Span_h_INCLUDED
25 #define LSST_AFW_GEOM_Span_h_INCLUDED
30 #include "boost/serialization/nvp.hpp"
38 namespace serialization{
57 typedef boost::shared_ptr<Span>
Ptr;
58 typedef boost::shared_ptr<Span const>
ConstPtr;
121 template <
typename Archive>
122 void serialize(Archive & ar,
const unsigned int version) {
123 ar & boost::serialization::make_nvp(
"y",
_y)
124 & boost::serialization::make_nvp(
"x0",
_x0)
125 & boost::serialization::make_nvp(
"x1",
_x1);
135 #endif // LSST_AFW_GEOM_Span_h_INCLUDED
int getEndX() const
End (exclusive) x-value.
An iterator that yields Point2I and increases in the x direction.
int getMaxX() const
Maximum x-value.
int _x0
Starting column (inclusive)
A coordinate class intended to represent absolute positions.
int getWidth() const
Return the number of pixels.
int getX0() const
Return the starting x-value.
std::string toString() const
Return a string-representation of a Span.
friend std::ostream & operator<<(std::ostream &os, Span const &span)
Stream output; delegates to toString().
A range of pixels within one row of an Image.
bool operator!=(Span const &other) const
boost::shared_ptr< Span const > ConstPtr
int getMinX() const
Minimum x-value.
int & getX1()
Return the ending x-value.
bool operator==(Span const &other) const
Iterator begin() const
Return an iterator to the first pixel in the Span.
int _x1
Ending column (inclusive)
int getY() const
Return the y-value.
int & getY()
Return the y-value.
void shift(int dx, int dy)
int _y
Row that Span's in.
bool isEmpty() const
Return true if the span contains no pixels.
bool contains(int x, int y) const
boost::shared_ptr< Span > Ptr
int getBeginX() const
Begin (inclusive) x-value.
int & getX0()
Return the starting x-value.
friend class boost::serialization::access
lsst::afw::detection::Footprint Footprint
bool contains(Point2I const &point) const
afw::table::Key< double > b
Span()
Construct an empty Span with zero width at the origin.
Point2I const getMax() const
Point corresponding to maximum x.
int getX1() const
Return the ending x-value.
SpanPixelIterator Iterator
An iterator over points in the Span.
A coordinate class intended to represent offsets and dimensions.
void serialize(Archive &ar, const unsigned int version)
Span(int y, int x0, int x1)
Iterator end() const
Return an iterator to one past the last pixel in the Span.
bool contains(int x) const
bool operator<(const Span &b) const
Point2I const getMin() const
Point corresponding to minimum x.