Class Span

Class Documentation

class Span

A range of pixels within one row of an Image

Public Types

typedef SpanPixelIterator Iterator

An iterator over points in the Span.

Public Functions

Span(int y, int x0, int x1)

Parameters
  • y: Row that Span’s in

  • x0: Starting column (inclusive)

  • x1: Ending column (inclusive)

Span()

Construct an empty Span with zero width at the origin.

Span(Span const&)
Span(Span&&)
Span &operator=(Span const&)
Span &operator=(Span&&)
~Span()
Iterator begin() const

Return an iterator to the first pixel in the Span.

Iterator end() const

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

int getX0() const

Return the starting x-value.

int &getX0()

Return the starting x-value.

int getX1() const

Return the ending x-value.

int &getX1()

Return the ending x-value.

int getY() const

Return the y-value.

int &getY()

Return the y-value.

int getWidth() const

Return the number of pixels.

int getMinX() const

Minimum x-value.

int getMaxX() const

Maximum x-value.

int getBeginX() const

Begin (inclusive) x-value.

int getEndX() const

End (exclusive) x-value.

lsst::geom::Point2I const getMin() const

Point corresponding to minimum x.

lsst::geom::Point2I const getMax() const

Point corresponding to maximum x.

bool contains(int x) const
bool contains(int x, int y) const
bool contains(lsst::geom::Point2I const &point) const
bool isEmpty() const

Return true if the span contains no pixels.

std::string toString() const

Return a string-representation of a Span.

void shift(int dx, int dy)
bool operator==(Span const &other) const
bool operator!=(Span const &other) const
std::size_t hash_value() const

Return a hash of this object.

bool operator<(const Span &b) const

Friends

friend lsst::afw::geom::Span::detection::Footprint
std::ostream &operator<<(std::ostream &os, Span const &span)

Stream output; delegates to toString().