Template Class MaskedImage::MaskedImageLocatorBase

Class Documentation

template<typename ImageLocator, typename MaskLocator, typename VarianceLocator, template<typename> class Ref = Reference>
class MaskedImageLocatorBase

The base class for MaskedImageLocators (const and non-const)

Public Types

template<>
typedef boost::tuple<typename ImageLocator::cached_location_t, typename MaskLocator::cached_location_t, typename VarianceLocator::cached_location_t> IMVCachedLocation
template<>
typedef _x_or_y_iterator<apply_x> x_iterator

An x_iterator that provides a view of the xy_locator (i.e. advancing one advances the other)

template<>
typedef _x_or_y_iterator<apply_y> y_iterator

A y_iterator that provides a view of the xy_locator (i.e. advancing one advances the other)

template<>
typedef boost::mpl::vector<ImagePixelT, MaskPixelT, VariancePixelT> PixelTVec

Public Functions

template<>
MaskedImageLocatorBase(ImageLocator const &img, MaskLocator const &msk, VarianceLocator const &var)

Construct a MaskedImageLocator from image/mask/variance locators.

template<>
Pixel operator*()

Dereference a locator, returning a Pixel.

template<>
Pixel operator()(int x, int y)

Dereference a locator, returning a Pixel offset by (x, y) from the locator.

template<>
Pixel operator[](cached_location_t const &cached_loc)

Dereference a locator, returning a Pixel offset by the amount set when we created the cached_location_t

template<>
x_iterator x()

Return an iterator that can be used to move (or dereference) a locator

Note

this x_locator is xy_locator::x_locator, not MaskedImage::x_locator

template<>
y_iterator y()

Return an iterator that can be used to move (or dereference) a locator

Note

this y_locator is xy_locator::y_locator, not MaskedImage::y_locator

template<>
cached_location_t cache_location(int x, int y) const

Create a cached_location_t offset by (x, y) from locator.

template<typename N>
Ref<typename boost::mpl::at<PixelTVec, N>::type>::type apply_IMV(cached_location_t const &cached_loc)
template<typename N>
Ref<typename boost::mpl::at<PixelTVec, N>::type>::type apply_IMV()
template<typename N>
Ref<typename boost::mpl::at<PixelTVec, N>::type>::type apply_IMV(int x, int y)
template<>
Ref<ImagePixelT>::type image(cached_location_t const &cached_loc)

Return a reference to the image at the offset set when we created the cached_location_t

template<>
Ref<ImagePixelT>::type image()

Return a reference to the image at the current position of the locator.

template<>
Ref<ImagePixelT>::type image(int x, int y)

Return a reference to the image offset by (x, y) from the current position of the locator.

template<>
Ref<MaskPixelT>::type mask(cached_location_t const &cached_loc)

Return a reference to the mask at the offset set when we created the cached_location_t

template<>
Ref<MaskPixelT>::type mask()

Return a reference to the mask at the current position of the locator.

template<>
Ref<MaskPixelT>::type mask(int x, int y)

Return a reference to the mask offset by (x, y) from the current position of the locator.

template<>
Ref<VariancePixelT>::type variance(cached_location_t const &cached_loc)

Return a reference to the variance at the offset set when we created the cached_location_t

template<>
Ref<VariancePixelT>::type variance()

Return a reference to the variance at the current position of the locator.

template<>
Ref<VariancePixelT>::type variance(int x, int y)

Return a reference to the variance offset by (x, y) from the current position of the locator.

template<>
bool operator==(MaskedImageLocatorBase const &rhs)

Return true iff two locators are equal.

template<>
bool operator!=(MaskedImageLocatorBase const &rhs)

Return true iff two locators are not equal.

template<>
bool operator<(MaskedImageLocatorBase const &rhs)

Return true iff lhs is less than rhs.

template<>
MaskedImageLocatorBase &operator+=(pair2I const &p)

Increment the locator’s x and y positions by p

template<>
MaskedImageLocatorBase &operator+=(detail::difference_type p)

Increment the locator’s x and y positions by p

template<>
IMVLocator const &getLoc() const

Protected Attributes

template<>
IMVLocator _loc
class cached_location_t

A saved relative position, providing efficient access to neighbouring pixels.

Public Functions

template<>
template<>
cached_location_t(IMVLocator const &loc, int x, int y)

Create a cached_location_t that can be used to access pixels (x, y) away from loc

Public Members

template<>
template<>
IMVCachedLocation _imv

Friends

friend lsst::afw::image::MaskedImage::MaskedImageLocatorBase::const_MaskedImageLocator