LSSTApplications  18.1.0
LSSTDataManagementBasePackage
Public Types | Public Member Functions | Protected Attributes | List of all members
lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::const_MaskedImageLocator< ImageLocator, MaskLocator, VarianceLocator > Class Template Reference

A const locator for the MaskedImage. More...

#include <MaskedImage.h>

Inheritance diagram for lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::const_MaskedImageLocator< ImageLocator, MaskLocator, VarianceLocator >:
lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::MaskedImageLocatorBase< detail::const_locator_type< ImageLocator >::type, detail::const_locator_type< MaskLocator >::type, detail::const_locator_type< VarianceLocator >::type, ConstReference >

Public Types

typedef boost::tuple< typename detail::const_locator_type< ImageLocator >::type ::cached_location_t, typename detail::const_locator_type< MaskLocator >::type ::cached_location_t, typename detail::const_locator_type< VarianceLocator >::type ::cached_location_t > IMVCachedLocation
 
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) More...
 
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) More...
 
typedef boost::mpl::vector< ImagePixelT, MaskPixelT, VariancePixelT > PixelTVec
 

Public Member Functions

 const_MaskedImageLocator (MaskedImageLocator< ImageLocator, MaskLocator, VarianceLocator > const &iter)
 
Pixel operator* ()
 Dereference a locator, returning a Pixel. More...
 
Pixel operator() (int x, int y)
 Dereference a locator, returning a Pixel offset by (x, y) from the locator. More...
 
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 More...
 
x_iterator x ()
 Return an iterator that can be used to move (or dereference) a locator. More...
 
y_iterator y ()
 Return an iterator that can be used to move (or dereference) a locator. More...
 
cached_location_t cache_location (int x, int y) const
 Create a cached_location_t offset by (x, y) from locator. More...
 
ConstReference< typename boost::mpl::at< PixelTVec, N >::type >::type apply_IMV (cached_location_t const &cached_loc)
 
ConstReference< typename boost::mpl::at< PixelTVec, N >::type >::type apply_IMV ()
 
ConstReference< typename boost::mpl::at< PixelTVec, N >::type >::type apply_IMV (int x, int y)
 
ConstReference< 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 More...
 
ConstReference< ImagePixelT >::type image ()
 Return a reference to the image at the current position of the locator. More...
 
ConstReference< ImagePixelT >::type image (int x, int y)
 Return a reference to the image offset by (x, y) from the current position of the locator. More...
 
ConstReference< 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 More...
 
ConstReference< MaskPixelT >::type mask ()
 Return a reference to the mask at the current position of the locator. More...
 
ConstReference< MaskPixelT >::type mask (int x, int y)
 Return a reference to the mask offset by (x, y) from the current position of the locator. More...
 
ConstReference< 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 More...
 
ConstReference< VariancePixelT >::type variance ()
 Return a reference to the variance at the current position of the locator. More...
 
ConstReference< VariancePixelT >::type variance (int x, int y)
 Return a reference to the variance offset by (x, y) from the current position of the locator. More...
 
bool operator== (MaskedImageLocatorBase const &rhs)
 Return true iff two locators are equal. More...
 
bool operator!= (MaskedImageLocatorBase const &rhs)
 Return true iff two locators are not equal. More...
 
bool operator< (MaskedImageLocatorBase const &rhs)
 Return true iff lhs is less than rhs. More...
 
MaskedImageLocatorBaseoperator+= (pair2I const &p)
 Increment the locator's x and y positions by p More...
 
MaskedImageLocatorBaseoperator+= (detail::difference_type p)
 Increment the locator's x and y positions by p More...
 
IMVLocator const & getLoc () const
 

Protected Attributes

IMVLocator _loc
 

Detailed Description

template<typename ImagePixelT, typename MaskPixelT = lsst::afw::image::MaskPixel, typename VariancePixelT = lsst::afw::image::VariancePixel>
template<typename ImageLocator, typename MaskLocator, typename VarianceLocator>
class lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::const_MaskedImageLocator< ImageLocator, MaskLocator, VarianceLocator >

A const locator for the MaskedImage.

A const locator for a MaskedImage.

Definition at line 109 of file MaskedImage.h.

Member Typedef Documentation

◆ IMVCachedLocation

typedef boost::tuple<typename detail::const_locator_type< ImageLocator >::type ::cached_location_t, typename detail::const_locator_type< MaskLocator >::type ::cached_location_t, typename detail::const_locator_type< VarianceLocator >::type ::cached_location_t> lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::MaskedImageLocatorBase< detail::const_locator_type< ImageLocator >::type , detail::const_locator_type< MaskLocator >::type , detail::const_locator_type< VarianceLocator >::type , ConstReference >::IMVCachedLocation
inherited

Definition at line 354 of file MaskedImage.h.

◆ PixelTVec

typedef boost::mpl::vector<ImagePixelT, MaskPixelT, VariancePixelT> lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::MaskedImageLocatorBase< detail::const_locator_type< ImageLocator >::type , detail::const_locator_type< MaskLocator >::type , detail::const_locator_type< VarianceLocator >::type , ConstReference >::PixelTVec
inherited

Definition at line 421 of file MaskedImage.h.

◆ x_iterator

typedef _x_or_y_iterator<apply_x> lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::MaskedImageLocatorBase< detail::const_locator_type< ImageLocator >::type , detail::const_locator_type< MaskLocator >::type , detail::const_locator_type< VarianceLocator >::type , ConstReference >::x_iterator
inherited

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

Definition at line 356 of file MaskedImage.h.

◆ y_iterator

typedef _x_or_y_iterator<apply_y> lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::MaskedImageLocatorBase< detail::const_locator_type< ImageLocator >::type , detail::const_locator_type< MaskLocator >::type , detail::const_locator_type< VarianceLocator >::type , ConstReference >::y_iterator
inherited

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

Definition at line 358 of file MaskedImage.h.

Constructor & Destructor Documentation

◆ const_MaskedImageLocator()

template<typename ImagePixelT, typename MaskPixelT = lsst::afw::image::MaskPixel, typename VariancePixelT = lsst::afw::image::VariancePixel>
template<typename ImageLocator , typename MaskLocator , typename VarianceLocator >
lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::const_MaskedImageLocator< ImageLocator, MaskLocator, VarianceLocator >::const_MaskedImageLocator ( MaskedImageLocator< ImageLocator, MaskLocator, VarianceLocator > const &  iter)
inline

Definition at line 529 of file MaskedImage.h.

530  : MaskedImageLocatorBase_t(const_ImageLocator(iter.getLoc().template get<0>()),
531  const_MaskLocator(iter.getLoc().template get<1>()),
532  const_VarianceLocator(iter.getLoc().template get<2>())) {
533  ;
534  }

Member Function Documentation

◆ apply_IMV() [1/3]

ConstReference <typename boost::mpl::at<PixelTVec, N>::type>::type lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::MaskedImageLocatorBase< detail::const_locator_type< ImageLocator >::type , detail::const_locator_type< MaskLocator >::type , detail::const_locator_type< VarianceLocator >::type , ConstReference >::apply_IMV ( cached_location_t const &  cached_loc)
inlineinherited

◆ apply_IMV() [2/3]

ConstReference <typename boost::mpl::at<PixelTVec, N>::type>::type lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::MaskedImageLocatorBase< detail::const_locator_type< ImageLocator >::type , detail::const_locator_type< MaskLocator >::type , detail::const_locator_type< VarianceLocator >::type , ConstReference >::apply_IMV ( )
inlineinherited

◆ apply_IMV() [3/3]

ConstReference <typename boost::mpl::at<PixelTVec, N>::type>::type lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::MaskedImageLocatorBase< detail::const_locator_type< ImageLocator >::type , detail::const_locator_type< MaskLocator >::type , detail::const_locator_type< VarianceLocator >::type , ConstReference >::apply_IMV ( int  x,
int  y 
)
inlineinherited

◆ cache_location()

cached_location_t lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::MaskedImageLocatorBase< detail::const_locator_type< ImageLocator >::type , detail::const_locator_type< MaskLocator >::type , detail::const_locator_type< VarianceLocator >::type , ConstReference >::cache_location ( int  x,
int  y 
) const
inlineinherited

◆ getLoc()

IMVLocator const& lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::MaskedImageLocatorBase< detail::const_locator_type< ImageLocator >::type , detail::const_locator_type< MaskLocator >::type , detail::const_locator_type< VarianceLocator >::type , ConstReference >::getLoc ( ) const
inlineinherited

◆ image() [1/3]

ConstReference <ImagePixelT>::type lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::MaskedImageLocatorBase< detail::const_locator_type< ImageLocator >::type , detail::const_locator_type< MaskLocator >::type , detail::const_locator_type< VarianceLocator >::type , ConstReference >::image ( cached_location_t const &  cached_loc)
inlineinherited

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

Definition at line 442 of file MaskedImage.h.

442  {
443  return apply_IMV<boost::mpl::int_<0>>(cached_loc);
444  }

◆ image() [2/3]

ConstReference <ImagePixelT>::type lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::MaskedImageLocatorBase< detail::const_locator_type< ImageLocator >::type , detail::const_locator_type< MaskLocator >::type , detail::const_locator_type< VarianceLocator >::type , ConstReference >::image ( )
inlineinherited

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

Definition at line 446 of file MaskedImage.h.

446 { return apply_IMV<boost::mpl::int_<0>>(); }

◆ image() [3/3]

ConstReference <ImagePixelT>::type lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::MaskedImageLocatorBase< detail::const_locator_type< ImageLocator >::type , detail::const_locator_type< MaskLocator >::type , detail::const_locator_type< VarianceLocator >::type , ConstReference >::image ( int  x,
int  y 
)
inlineinherited

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

Definition at line 448 of file MaskedImage.h.

◆ mask() [1/3]

ConstReference <MaskPixelT>::type lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::MaskedImageLocatorBase< detail::const_locator_type< ImageLocator >::type , detail::const_locator_type< MaskLocator >::type , detail::const_locator_type< VarianceLocator >::type , ConstReference >::mask ( cached_location_t const &  cached_loc)
inlineinherited

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

Definition at line 451 of file MaskedImage.h.

451  {
452  return apply_IMV<boost::mpl::int_<1>>(cached_loc);
453  }

◆ mask() [2/3]

ConstReference <MaskPixelT>::type lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::MaskedImageLocatorBase< detail::const_locator_type< ImageLocator >::type , detail::const_locator_type< MaskLocator >::type , detail::const_locator_type< VarianceLocator >::type , ConstReference >::mask ( )
inlineinherited

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

Definition at line 455 of file MaskedImage.h.

455 { return apply_IMV<boost::mpl::int_<1>>(); }

◆ mask() [3/3]

ConstReference <MaskPixelT>::type lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::MaskedImageLocatorBase< detail::const_locator_type< ImageLocator >::type , detail::const_locator_type< MaskLocator >::type , detail::const_locator_type< VarianceLocator >::type , ConstReference >::mask ( int  x,
int  y 
)
inlineinherited

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

Definition at line 457 of file MaskedImage.h.

◆ operator!=()

bool lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::MaskedImageLocatorBase< detail::const_locator_type< ImageLocator >::type , detail::const_locator_type< MaskLocator >::type , detail::const_locator_type< VarianceLocator >::type , ConstReference >::operator!= ( MaskedImageLocatorBase< detail::const_locator_type< ImageLocator >::type, detail::const_locator_type< MaskLocator >::type, detail::const_locator_type< VarianceLocator >::type, ConstReference > const &  rhs)
inlineinherited

Return true iff two locators are not equal.

Definition at line 475 of file MaskedImage.h.

475 { return !(*this == rhs); }

◆ operator()()

Pixel lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::MaskedImageLocatorBase< detail::const_locator_type< ImageLocator >::type , detail::const_locator_type< MaskLocator >::type , detail::const_locator_type< VarianceLocator >::type , ConstReference >::operator() ( int  x,
int  y 
)
inlineinherited

◆ operator*()

Pixel lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::MaskedImageLocatorBase< detail::const_locator_type< ImageLocator >::type , detail::const_locator_type< MaskLocator >::type , detail::const_locator_type< VarianceLocator >::type , ConstReference >::operator* ( )
inlineinherited

Dereference a locator, returning a Pixel.

Definition at line 384 of file MaskedImage.h.

◆ operator+=() [1/2]

MaskedImageLocatorBase& lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::MaskedImageLocatorBase< detail::const_locator_type< ImageLocator >::type , detail::const_locator_type< MaskLocator >::type , detail::const_locator_type< VarianceLocator >::type , ConstReference >::operator+= ( pair2I const &  p)
inlineinherited

Increment the locator's x and y positions by p

Definition at line 482 of file MaskedImage.h.

482  {
483  return operator+=(detail::difference_type(p.first, p.second));
484  }

◆ operator+=() [2/2]

MaskedImageLocatorBase& lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::MaskedImageLocatorBase< detail::const_locator_type< ImageLocator >::type , detail::const_locator_type< MaskLocator >::type , detail::const_locator_type< VarianceLocator >::type , ConstReference >::operator+= ( detail::difference_type  p)
inlineinherited

Increment the locator's x and y positions by p

Definition at line 487 of file MaskedImage.h.

◆ operator<()

bool lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::MaskedImageLocatorBase< detail::const_locator_type< ImageLocator >::type , detail::const_locator_type< MaskLocator >::type , detail::const_locator_type< VarianceLocator >::type , ConstReference >::operator< ( MaskedImageLocatorBase< detail::const_locator_type< ImageLocator >::type, detail::const_locator_type< MaskLocator >::type, detail::const_locator_type< VarianceLocator >::type, ConstReference > const &  rhs)
inlineinherited

◆ operator==()

bool lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::MaskedImageLocatorBase< detail::const_locator_type< ImageLocator >::type , detail::const_locator_type< MaskLocator >::type , detail::const_locator_type< VarianceLocator >::type , ConstReference >::operator== ( MaskedImageLocatorBase< detail::const_locator_type< ImageLocator >::type, detail::const_locator_type< MaskLocator >::type, detail::const_locator_type< VarianceLocator >::type, ConstReference > const &  rhs)
inlineinherited

◆ operator[]()

Pixel lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::MaskedImageLocatorBase< detail::const_locator_type< ImageLocator >::type , detail::const_locator_type< MaskLocator >::type , detail::const_locator_type< VarianceLocator >::type , ConstReference >::operator[] ( cached_location_t const &  cached_loc)
inlineinherited

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

Definition at line 397 of file MaskedImage.h.

397  {
398  return Pixel(_loc.template get<0>()[cached_loc._imv.template get<0>()][0],
399  _loc.template get<1>()[cached_loc._imv.template get<1>()][0],
400  _loc.template get<2>()[cached_loc._imv.template get<2>()][0]);
401  }
float Pixel
Typedefs to be used for pixel values.
Definition: common.h:37

◆ variance() [1/3]

ConstReference <VariancePixelT>::type lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::MaskedImageLocatorBase< detail::const_locator_type< ImageLocator >::type , detail::const_locator_type< MaskLocator >::type , detail::const_locator_type< VarianceLocator >::type , ConstReference >::variance ( cached_location_t const &  cached_loc)
inlineinherited

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

Definition at line 460 of file MaskedImage.h.

460  {
461  return apply_IMV<boost::mpl::int_<2>>(cached_loc);
462  }

◆ variance() [2/3]

ConstReference <VariancePixelT>::type lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::MaskedImageLocatorBase< detail::const_locator_type< ImageLocator >::type , detail::const_locator_type< MaskLocator >::type , detail::const_locator_type< VarianceLocator >::type , ConstReference >::variance ( )
inlineinherited

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

Definition at line 464 of file MaskedImage.h.

464 { return apply_IMV<boost::mpl::int_<2>>(); }

◆ variance() [3/3]

ConstReference <VariancePixelT>::type lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::MaskedImageLocatorBase< detail::const_locator_type< ImageLocator >::type , detail::const_locator_type< MaskLocator >::type , detail::const_locator_type< VarianceLocator >::type , ConstReference >::variance ( int  x,
int  y 
)
inlineinherited

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

Definition at line 466 of file MaskedImage.h.

◆ x()

x_iterator lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::MaskedImageLocatorBase< detail::const_locator_type< ImageLocator >::type , detail::const_locator_type< MaskLocator >::type , detail::const_locator_type< VarianceLocator >::type , ConstReference >::x ( )
inlineinherited

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

Definition at line 406 of file MaskedImage.h.

◆ y()

y_iterator lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::MaskedImageLocatorBase< detail::const_locator_type< ImageLocator >::type , detail::const_locator_type< MaskLocator >::type , detail::const_locator_type< VarianceLocator >::type , ConstReference >::y ( )
inlineinherited

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

Definition at line 412 of file MaskedImage.h.

Member Data Documentation

◆ _loc

IMVLocator lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::MaskedImageLocatorBase< detail::const_locator_type< ImageLocator >::type , detail::const_locator_type< MaskLocator >::type , detail::const_locator_type< VarianceLocator >::type , ConstReference >::_loc
protectedinherited

Definition at line 500 of file MaskedImage.h.


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