| LSSTApplications
    20.0.0
    LSSTDataManagementBasePackage | 
 
 
 
Go to the documentation of this file.
   24 #ifndef LSST_AFW_GEOM_Span_h_INCLUDED 
   25 #define LSST_AFW_GEOM_Span_h_INCLUDED 
   55             : _y(
y), _x0(x0), _x1(x1) {}
 
   58     Span() noexcept : _y(0), _x0(0), _x1(-1) {}
 
   62     Span& operator=(
Span const&) noexcept = default;
 
   64     ~
Span() noexcept = default;
 
   72     int getX0() const noexcept { 
return _x0; }               
 
   73     int& 
getX0() noexcept { 
return _x0; }                    
 
   74     int getX1() const noexcept { 
return _x1; }               
 
   75     int& 
getX1() noexcept { 
return _x1; }                    
 
   76     int getY() const noexcept { 
return _y; }                 
 
   77     int& 
getY() noexcept { 
return _y; }                      
 
   78     int getWidth() const noexcept { 
return _x1 - _x0 + 1; }  
 
   79     int getMinX() const noexcept { 
return _x0; }             
 
   80     int getMaxX() const noexcept { 
return _x1; }             
 
   82     int getEndX() const noexcept { 
return _x1 + 1; }         
 
   90     bool contains(
int x) 
const noexcept { 
return (
x >= _x0) && (
x <= _x1); }
 
   91     bool contains(
int x, 
int y) 
const noexcept { 
return (
x >= _x0) && (
x <= _x1) && (
y == _y); }
 
   93         return contains(point.getX(), point.getY());
 
   97     bool isEmpty() const noexcept { 
return _x1 < _x0; }
 
  102     void shift(
int dx, 
int dy) noexcept {
 
  148 #endif  // LSST_AFW_GEOM_Span_h_INCLUDED 
  
SpanPixelIterator Iterator
An iterator over points in the Span.
A range of pixels within one row of an Image.
Span() noexcept
Construct an empty Span with zero width at the origin.
int getX1() const noexcept
Return the ending x-value.
int & getY() noexcept
Return the y-value.
int getWidth() const noexcept
Return the number of pixels.
result_type operator()(argument_type const &obj) const noexcept
An iterator that yields lsst::geom::Point2I and increases in the x direction.
std::size_t hash_value() const noexcept
Return a hash of this object.
Iterator begin() const noexcept
Return an iterator to the first pixel in the Span.
std::string toString() const
Return a string-representation of a Span.
int getY() const noexcept
Return the y-value.
int getEndX() const noexcept
End (exclusive) x-value.
Span(int y, int x0, int x1)
lsst::afw::detection::Footprint Footprint
ItemVariant const  * other
bool contains(int x) const noexcept
bool operator==(Span const &other) const noexcept
bool isEmpty() const noexcept
Return true if the span contains no pixels.
friend std::ostream & operator<<(std::ostream &os, Span const &span)
Stream output; delegates to toString().
int getMinX() const noexcept
Minimum x-value.
lsst::geom::Point2I const getMax() const noexcept
Point corresponding to maximum x.
int getMaxX() const noexcept
Maximum x-value.
A base class for image defects.
int getX0() const noexcept
Return the starting x-value.
Iterator end() const noexcept
Return an iterator to one past the last pixel in the Span.
std::size_t hashCombine(std::size_t seed) noexcept
Combine hashes.
bool operator<(const Span &b) const noexcept
Span(Span &&) noexcept=default
int getBeginX() const noexcept
Begin (inclusive) x-value.
void shift(int dx, int dy) noexcept
int & getX0() noexcept
Return the starting x-value.
bool contains(lsst::geom::Point2I const &point) const noexcept
Span(Span const &) noexcept=default
bool operator!=(Span const &other) const noexcept
int & getX1() noexcept
Return the ending x-value.
lsst::geom::Point2I const getMin() const noexcept
Point corresponding to minimum x.
bool contains(int x, int y) const noexcept