lsst.afw  15.0-25-gacd707fca
Public Types | Public Member Functions | Friends | List of all members
lsst::afw::geom::Span Class Reference

A range of pixels within one row of an Image. More...

#include <Span.h>

Public Types

typedef SpanPixelIterator Iterator
 An iterator over points in the Span. More...
 

Public Member Functions

 Span (int y, int x0, int x1)
 
 Span ()
 Construct an empty Span with zero width at the origin. More...
 
 Span (Span const &)=default
 
 Span (Span &&)=default
 
Span & operator= (Span const &)=default
 
Span & operator= (Span &&)=default
 
 ~Span ()=default
 
Iterator begin () const
 Return an iterator to the first pixel in the Span. More...
 
Iterator end () const
 Return an iterator to one past the last pixel in the Span. More...
 
int getX0 () const
 Return the starting x-value. More...
 
int & getX0 ()
 Return the starting x-value. More...
 
int getX1 () const
 Return the ending x-value. More...
 
int & getX1 ()
 Return the ending x-value. More...
 
int getY () const
 Return the y-value. More...
 
int & getY ()
 Return the y-value. More...
 
int getWidth () const
 Return the number of pixels. More...
 
int getMinX () const
 Minimum x-value. More...
 
int getMaxX () const
 Maximum x-value. More...
 
int getBeginX () const
 Begin (inclusive) x-value. More...
 
int getEndX () const
 End (exclusive) x-value. More...
 
Point2I const getMin () const
 Point corresponding to minimum x. More...
 
Point2I const getMax () const
 Point corresponding to maximum x. More...
 
bool contains (int x) const
 
bool contains (int x, int y) const
 
bool contains (Point2I const &point) const
 
bool isEmpty () const
 Return true if the span contains no pixels. More...
 
std::string toString () const
 Return a string-representation of a Span. More...
 
void shift (int dx, int dy)
 
bool operator== (Span const &other) const
 
bool operator!= (Span const &other) const
 
bool operator< (const Span &b) const
 

Friends

class detection::Footprint
 
class boost::serialization::access
 
std::ostream & operator<< (std::ostream &os, Span const &span)
 Stream output; delegates to toString(). More...
 

Detailed Description

A range of pixels within one row of an Image.

Definition at line 55 of file Span.h.

Member Typedef Documentation

◆ Iterator

An iterator over points in the Span.

Definition at line 58 of file Span.h.

Constructor & Destructor Documentation

◆ Span() [1/4]

lsst::afw::geom::Span::Span ( int  y,
int  x0,
int  x1 
)
inline
Parameters
yRow that Span's in
x0Starting column (inclusive)
x1Ending column (inclusive)

Definition at line 60 of file Span.h.

◆ Span() [2/4]

lsst::afw::geom::Span::Span ( )
inline

Construct an empty Span with zero width at the origin.

Definition at line 68 of file Span.h.

◆ Span() [3/4]

lsst::afw::geom::Span::Span ( Span const &  )
default

◆ Span() [4/4]

lsst::afw::geom::Span::Span ( Span &&  )
default

◆ ~Span()

lsst::afw::geom::Span::~Span ( )
default

Member Function Documentation

◆ begin()

Iterator lsst::afw::geom::Span::begin ( void  ) const
inline

Return an iterator to the first pixel in the Span.

Definition at line 77 of file Span.h.

◆ contains() [1/3]

bool lsst::afw::geom::Span::contains ( int  x) const
inline

Definition at line 96 of file Span.h.

◆ contains() [2/3]

bool lsst::afw::geom::Span::contains ( int  x,
int  y 
) const
inline

Definition at line 97 of file Span.h.

◆ contains() [3/3]

bool lsst::afw::geom::Span::contains ( Point2I const &  point) const
inline

Definition at line 98 of file Span.h.

◆ end()

Iterator lsst::afw::geom::Span::end ( void  ) const
inline

Return an iterator to one past the last pixel in the Span.

Definition at line 80 of file Span.h.

◆ getBeginX()

int lsst::afw::geom::Span::getBeginX ( ) const
inline

Begin (inclusive) x-value.

Definition at line 91 of file Span.h.

◆ getEndX()

int lsst::afw::geom::Span::getEndX ( ) const
inline

End (exclusive) x-value.

Definition at line 92 of file Span.h.

◆ getMax()

Point2I const lsst::afw::geom::Span::getMax ( ) const
inline

Point corresponding to maximum x.

Definition at line 94 of file Span.h.

◆ getMaxX()

int lsst::afw::geom::Span::getMaxX ( ) const
inline

Maximum x-value.

Definition at line 90 of file Span.h.

◆ getMin()

Point2I const lsst::afw::geom::Span::getMin ( ) const
inline

Point corresponding to minimum x.

Definition at line 93 of file Span.h.

◆ getMinX()

int lsst::afw::geom::Span::getMinX ( ) const
inline

Minimum x-value.

Definition at line 89 of file Span.h.

◆ getWidth()

int lsst::afw::geom::Span::getWidth ( ) const
inline

Return the number of pixels.

Definition at line 88 of file Span.h.

◆ getX0() [1/2]

int lsst::afw::geom::Span::getX0 ( ) const
inline

Return the starting x-value.

Definition at line 82 of file Span.h.

◆ getX0() [2/2]

int& lsst::afw::geom::Span::getX0 ( )
inline

Return the starting x-value.

Definition at line 83 of file Span.h.

◆ getX1() [1/2]

int lsst::afw::geom::Span::getX1 ( ) const
inline

Return the ending x-value.

Definition at line 84 of file Span.h.

◆ getX1() [2/2]

int& lsst::afw::geom::Span::getX1 ( )
inline

Return the ending x-value.

Definition at line 85 of file Span.h.

◆ getY() [1/2]

int lsst::afw::geom::Span::getY ( ) const
inline

Return the y-value.

Definition at line 86 of file Span.h.

◆ getY() [2/2]

int& lsst::afw::geom::Span::getY ( )
inline

Return the y-value.

Definition at line 87 of file Span.h.

◆ isEmpty()

bool lsst::afw::geom::Span::isEmpty ( ) const
inline

Return true if the span contains no pixels.

Definition at line 101 of file Span.h.

◆ operator!=()

bool lsst::afw::geom::Span::operator!= ( Span const &  other) const
inline

Definition at line 118 of file Span.h.

◆ operator<()

bool lsst::afw::geom::Span::operator< ( const Span &  b) const

Definition at line 32 of file Span.cc.

◆ operator=() [1/2]

Span& lsst::afw::geom::Span::operator= ( Span const &  )
default

◆ operator=() [2/2]

Span& lsst::afw::geom::Span::operator= ( Span &&  )
default

◆ operator==()

bool lsst::afw::geom::Span::operator== ( Span const &  other) const
inline

Definition at line 115 of file Span.h.

◆ shift()

void lsst::afw::geom::Span::shift ( int  dx,
int  dy 
)
inline

Definition at line 106 of file Span.h.

◆ toString()

std::string lsst::afw::geom::Span::toString ( void  ) const

Return a string-representation of a Span.

Definition at line 43 of file Span.cc.

Friends And Related Function Documentation

◆ boost::serialization::access

friend class boost::serialization::access
friend

Definition at line 129 of file Span.h.

◆ detection::Footprint

friend class detection::Footprint
friend

Definition at line 126 of file Span.h.

◆ operator<<

std::ostream& operator<< ( std::ostream &  os,
Span const &  span 
)
friend

Stream output; delegates to toString().

Definition at line 113 of file Span.h.


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