LSST Applications  21.0.0-172-gfb10e10a+18fedfabac,22.0.0+297cba6710,22.0.0+80564b0ff1,22.0.0+8d77f4f51a,22.0.0+a28f4c53b1,22.0.0+dcf3732eb2,22.0.1-1-g7d6de66+2a20fdde0d,22.0.1-1-g8e32f31+297cba6710,22.0.1-1-geca5380+7fa3b7d9b6,22.0.1-12-g44dc1dc+2a20fdde0d,22.0.1-15-g6a90155+515f58c32b,22.0.1-16-g9282f48+790f5f2caa,22.0.1-2-g92698f7+dcf3732eb2,22.0.1-2-ga9b0f51+7fa3b7d9b6,22.0.1-2-gd1925c9+bf4f0e694f,22.0.1-24-g1ad7a390+a9625a72a8,22.0.1-25-g5bf6245+3ad8ecd50b,22.0.1-25-gb120d7b+8b5510f75f,22.0.1-27-g97737f7+2a20fdde0d,22.0.1-32-gf62ce7b1+aa4237961e,22.0.1-4-g0b3f228+2a20fdde0d,22.0.1-4-g243d05b+871c1b8305,22.0.1-4-g3a563be+32dcf1063f,22.0.1-4-g44f2e3d+9e4ab0f4fa,22.0.1-42-gca6935d93+ba5e5ca3eb,22.0.1-5-g15c806e+85460ae5f3,22.0.1-5-g58711c4+611d128589,22.0.1-5-g75bb458+99c117b92f,22.0.1-6-g1c63a23+7fa3b7d9b6,22.0.1-6-g50866e6+84ff5a128b,22.0.1-6-g8d3140d+720564cf76,22.0.1-6-gd805d02+cc5644f571,22.0.1-8-ge5750ce+85460ae5f3,master-g6e05de7fdc+babf819c66,master-g99da0e417a+8d77f4f51a,w.2021.48
LSST Data Management Base Package
Public Types | Public Member Functions | Protected Attributes | List of all members
lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::const_MaskedImageIterator< ImageIterator, MaskIterator, VarianceIterator > Class Template Reference

An const iterator to the MaskedImage. More...

#include <MaskedImage.h>

Inheritance diagram for lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::const_MaskedImageIterator< ImageIterator, MaskIterator, VarianceIterator >:
lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::MaskedImageIteratorBase< detail::const_iterator_type< ImageIterator >::type, detail::const_iterator_type< MaskIterator >::type, detail::const_iterator_type< VarianceIterator >::type, ConstReference >

Public Types

using IMV_tuple = typename boost::zip_iterator< IMV_iterator_tuple >::reference
 The underlying iterator tuple. More...
 
using type = Pixel
 Type pointed to by the iterator. More...
 

Public Member Functions

 const_MaskedImageIterator (MaskedImageIterator< ImageIterator, MaskIterator, VarianceIterator > const &iter)
 
const_MaskedImageIteratoroperator+ (std::ptrdiff_t delta)
 Return a const_MaskedImageIterator that's delta beyond this. More...
 
ConstReference< ImagePixelT >::type image ()
 Return (a reference to) the image part of the Pixel pointed at by the iterator. More...
 
ConstReference< MaskPixelT >::type mask ()
 Return (a reference to) the mask part of the Pixel pointed at by the iterator. More...
 
ConstReference< VariancePixelT >::type variance ()
 Return (a reference to) the variance part of the Pixel pointed at by the iterator. More...
 
const IMV_iterator_tuple get_iterator_tuple () const
 Return the underlying iterator tuple. More...
 
MaskedImageIteratorBaseoperator+= (std::ptrdiff_t delta)
 Increment the iterator by delta More...
 
MaskedImageIteratorBaseoperator-= (std::ptrdiff_t delta)
 Decrement the iterator by delta More...
 
MaskedImageIteratorBaseoperator++ ()
 Increment the iterator (prefix) More...
 
MaskedImageIteratorBase operator++ (int)
 Increment the iterator (postfix) More...
 
std::ptrdiff_t operator- (MaskedImageIteratorBase const &rhs)
 Return the distance between two iterators. More...
 
bool operator== (MaskedImageIteratorBase const &rhs)
 Return true if the lhs equals the rhs. More...
 
bool operator!= (MaskedImageIteratorBase const &rhs)
 Return true if the lhs doesn't equal the rhs. More...
 
bool operator< (MaskedImageIteratorBase const &rhs)
 Return true if the lhs is less than the rhs. More...
 
 operator Pixel () const
 Convert an iterator to a Pixel. More...
 
Pixel operator* ()
 Dereference the iterator, returning a Pixel. More...
 
const Pixel operator* () const
 Dereference the iterator, returning a const Pixel. More...
 

Protected Attributes

boost::zip_iterator< IMV_iterator_tuple > _iter
 

Detailed Description

template<typename ImagePixelT, typename MaskPixelT = lsst::afw::image::MaskPixel, typename VariancePixelT = lsst::afw::image::VariancePixel>
template<typename ImageIterator, typename MaskIterator, typename VarianceIterator>
class lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::const_MaskedImageIterator< ImageIterator, MaskIterator, VarianceIterator >

An const iterator to the MaskedImage.

An const iterator for a MaskedImage.

Definition at line 226 of file MaskedImage.h.

Member Typedef Documentation

◆ IMV_tuple

using lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::MaskedImageIteratorBase< detail::const_iterator_type< ImageIterator >::type , detail::const_iterator_type< MaskIterator >::type , detail::const_iterator_type< VarianceIterator >::type , ConstReference >::IMV_tuple = typename boost::zip_iterator<IMV_iterator_tuple>::reference
inherited

The underlying iterator tuple.

Note
not really for public consumption; could be made protected

Definition at line 125 of file MaskedImage.h.

◆ type

using lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::MaskedImageIteratorBase< detail::const_iterator_type< ImageIterator >::type , detail::const_iterator_type< MaskIterator >::type , detail::const_iterator_type< VarianceIterator >::type , ConstReference >::type = Pixel
inherited

Type pointed to by the iterator.

Definition at line 132 of file MaskedImage.h.

Constructor & Destructor Documentation

◆ const_MaskedImageIterator()

template<typename ImagePixelT , typename MaskPixelT = lsst::afw::image::MaskPixel, typename VariancePixelT = lsst::afw::image::VariancePixel>
template<typename ImageIterator , typename MaskIterator , typename VarianceIterator >
lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::const_MaskedImageIterator< ImageIterator, MaskIterator, VarianceIterator >::const_MaskedImageIterator ( MaskedImageIterator< ImageIterator, MaskIterator, VarianceIterator > const &  iter)
inline

Definition at line 238 of file MaskedImage.h.

240  : MaskedImageIteratorBase_t(
241  const_ImageIterator(iter.get_iterator_tuple().template get<0>()),
242  const_MaskIterator(iter.get_iterator_tuple().template get<1>()),
243  const_VarianceIterator(iter.get_iterator_tuple().template get<2>())) {
244  ;
245  }

Member Function Documentation

◆ get_iterator_tuple()

const IMV_iterator_tuple lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::MaskedImageIteratorBase< detail::const_iterator_type< ImageIterator >::type , detail::const_iterator_type< MaskIterator >::type , detail::const_iterator_type< VarianceIterator >::type , ConstReference >::get_iterator_tuple ( ) const
inlineinherited

Return the underlying iterator tuple.

Note
not really for public consumption; could be made protected

Definition at line 150 of file MaskedImage.h.

◆ image()

ConstReference <ImagePixelT>::type lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::MaskedImageIteratorBase< detail::const_iterator_type< ImageIterator >::type , detail::const_iterator_type< MaskIterator >::type , detail::const_iterator_type< VarianceIterator >::type , ConstReference >::image ( )
inlineinherited

Return (a reference to) the image part of the Pixel pointed at by the iterator.

Definition at line 139 of file MaskedImage.h.

139 { return _iter->template get<0>()[0]; }

◆ mask()

ConstReference <MaskPixelT>::type lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::MaskedImageIteratorBase< detail::const_iterator_type< ImageIterator >::type , detail::const_iterator_type< MaskIterator >::type , detail::const_iterator_type< VarianceIterator >::type , ConstReference >::mask ( )
inlineinherited

Return (a reference to) the mask part of the Pixel pointed at by the iterator.

Definition at line 142 of file MaskedImage.h.

142 { return _iter->template get<1>()[0]; }

◆ operator Pixel()

lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::MaskedImageIteratorBase< detail::const_iterator_type< ImageIterator >::type , detail::const_iterator_type< MaskIterator >::type , detail::const_iterator_type< VarianceIterator >::type , ConstReference >::operator Pixel ( ) const
inlineinherited

Convert an iterator to a Pixel.

Definition at line 192 of file MaskedImage.h.

192  {
193  return Pixel(_iter->template get<0>()[0], _iter->template get<1>()[0],
194  _iter->template get<2>()[0]);
195  }
float Pixel
Typedefs to be used for pixel values.
Definition: common.h:37

◆ operator!=()

bool lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::MaskedImageIteratorBase< detail::const_iterator_type< ImageIterator >::type , detail::const_iterator_type< MaskIterator >::type , detail::const_iterator_type< VarianceIterator >::type , ConstReference >::operator!= ( MaskedImageIteratorBase< detail::const_iterator_type< ImageIterator >::type, detail::const_iterator_type< MaskIterator >::type, detail::const_iterator_type< VarianceIterator >::type, ConstReference > const &  rhs)
inlineinherited

Return true if the lhs doesn't equal the rhs.

Definition at line 184 of file MaskedImage.h.

184  {
185  return &this->_iter->template get<0>() != &rhs._iter->template get<0>();
186  }

◆ operator*() [1/2]

Pixel lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::MaskedImageIteratorBase< detail::const_iterator_type< ImageIterator >::type , detail::const_iterator_type< MaskIterator >::type , detail::const_iterator_type< VarianceIterator >::type , ConstReference >::operator* ( )
inlineinherited

◆ operator*() [2/2]

const Pixel lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::MaskedImageIteratorBase< detail::const_iterator_type< ImageIterator >::type , detail::const_iterator_type< MaskIterator >::type , detail::const_iterator_type< VarianceIterator >::type , ConstReference >::operator* ( ) const
inlineinherited

Dereference the iterator, returning a const Pixel.

Definition at line 200 of file MaskedImage.h.

200 { return Pixel(image(), mask(), variance()); }

◆ operator+()

template<typename ImagePixelT , typename MaskPixelT = lsst::afw::image::MaskPixel, typename VariancePixelT = lsst::afw::image::VariancePixel>
template<typename ImageIterator , typename MaskIterator , typename VarianceIterator >
const_MaskedImageIterator& lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::const_MaskedImageIterator< ImageIterator, MaskIterator, VarianceIterator >::operator+ ( std::ptrdiff_t  delta)
inline

Return a const_MaskedImageIterator that's delta beyond this.

Definition at line 247 of file MaskedImage.h.

◆ operator++() [1/2]

MaskedImageIteratorBase& lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::MaskedImageIteratorBase< detail::const_iterator_type< ImageIterator >::type , detail::const_iterator_type< MaskIterator >::type , detail::const_iterator_type< VarianceIterator >::type , ConstReference >::operator++ ( )
inlineinherited

Increment the iterator (prefix)

Definition at line 165 of file MaskedImage.h.

165  { // prefix
166  ++_iter;
167  return *this;
168  }

◆ operator++() [2/2]

MaskedImageIteratorBase lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::MaskedImageIteratorBase< detail::const_iterator_type< ImageIterator >::type , detail::const_iterator_type< MaskIterator >::type , detail::const_iterator_type< VarianceIterator >::type , ConstReference >::operator++ ( int  )
inlineinherited

Increment the iterator (postfix)

Definition at line 170 of file MaskedImage.h.

170  { // postfix
171  MaskedImageIteratorBase tmp(*this);
172  _iter++;
173  return tmp;
174  }
MaskedImageIteratorBase(detail::const_iterator_type< ImageIterator >::type const &img, detail::const_iterator_type< MaskIterator >::type const &msk, detail::const_iterator_type< VarianceIterator >::type const &var)
Construct a MaskedImageIteratorBase from the image/mask/variance iterators.
Definition: MaskedImage.h:135

◆ operator+=()

MaskedImageIteratorBase& lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::MaskedImageIteratorBase< detail::const_iterator_type< ImageIterator >::type , detail::const_iterator_type< MaskIterator >::type , detail::const_iterator_type< VarianceIterator >::type , ConstReference >::operator+= ( std::ptrdiff_t  delta)
inlineinherited

Increment the iterator by delta

Parameters
deltahow far to move the iterator

Definition at line 153 of file MaskedImage.h.

154  {
155  _iter += delta;
156  return *this;
157  }

◆ operator-()

std::ptrdiff_t lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::MaskedImageIteratorBase< detail::const_iterator_type< ImageIterator >::type , detail::const_iterator_type< MaskIterator >::type , detail::const_iterator_type< VarianceIterator >::type , ConstReference >::operator- ( MaskedImageIteratorBase< detail::const_iterator_type< ImageIterator >::type, detail::const_iterator_type< MaskIterator >::type, detail::const_iterator_type< VarianceIterator >::type, ConstReference > const &  rhs)
inlineinherited

Return the distance between two iterators.

Definition at line 176 of file MaskedImage.h.

176  {
177  return &this->_iter->template get<0>() - &rhs._iter->template get<0>();
178  }

◆ operator-=()

MaskedImageIteratorBase& lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::MaskedImageIteratorBase< detail::const_iterator_type< ImageIterator >::type , detail::const_iterator_type< MaskIterator >::type , detail::const_iterator_type< VarianceIterator >::type , ConstReference >::operator-= ( std::ptrdiff_t  delta)
inlineinherited

Decrement the iterator by delta

Parameters
deltahow far to move the iterator

Definition at line 159 of file MaskedImage.h.

160  {
161  _iter -= delta;
162  return *this;
163  }

◆ operator<()

bool lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::MaskedImageIteratorBase< detail::const_iterator_type< ImageIterator >::type , detail::const_iterator_type< MaskIterator >::type , detail::const_iterator_type< VarianceIterator >::type , ConstReference >::operator< ( MaskedImageIteratorBase< detail::const_iterator_type< ImageIterator >::type, detail::const_iterator_type< MaskIterator >::type, detail::const_iterator_type< VarianceIterator >::type, ConstReference > const &  rhs)
inlineinherited

Return true if the lhs is less than the rhs.

Definition at line 188 of file MaskedImage.h.

188  {
189  return &this->_iter->template get<0>() < &rhs._iter->template get<0>();
190  }

◆ operator==()

bool lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::MaskedImageIteratorBase< detail::const_iterator_type< ImageIterator >::type , detail::const_iterator_type< MaskIterator >::type , detail::const_iterator_type< VarianceIterator >::type , ConstReference >::operator== ( MaskedImageIteratorBase< detail::const_iterator_type< ImageIterator >::type, detail::const_iterator_type< MaskIterator >::type, detail::const_iterator_type< VarianceIterator >::type, ConstReference > const &  rhs)
inlineinherited

Return true if the lhs equals the rhs.

Definition at line 180 of file MaskedImage.h.

180  {
181  return &this->_iter->template get<0>() == &rhs._iter->template get<0>();
182  }

◆ variance()

ConstReference <VariancePixelT>::type lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::MaskedImageIteratorBase< detail::const_iterator_type< ImageIterator >::type , detail::const_iterator_type< MaskIterator >::type , detail::const_iterator_type< VarianceIterator >::type , ConstReference >::variance ( )
inlineinherited

Return (a reference to) the variance part of the Pixel pointed at by the iterator.

Definition at line 145 of file MaskedImage.h.

145 { return _iter->template get<2>()[0]; }

Member Data Documentation

◆ _iter

boost::zip_iterator<IMV_iterator_tuple> lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::MaskedImageIteratorBase< detail::const_iterator_type< ImageIterator >::type , detail::const_iterator_type< MaskIterator >::type , detail::const_iterator_type< VarianceIterator >::type , ConstReference >::_iter
protectedinherited

Definition at line 203 of file MaskedImage.h.


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