LSST Applications g1653933729+a8ce1bb630,g171997e3ee+76e92115be,g1a997c3884+a8ce1bb630,g28da252d5a+4013ff5194,g2bbee38e9b+d6d0f9f6ae,g2bc492864f+d6d0f9f6ae,g2cdde0e794+ccb74358b7,g3156d2b45e+07302053f8,g347aa1857d+d6d0f9f6ae,g35bb328faa+a8ce1bb630,g3a166c0a6a+d6d0f9f6ae,g3e281a1b8c+130fae20e3,g4005a62e65+17cd334064,g414038480c+c9f68e2a12,g41af890bb2+3e1f62f438,g4e1a3235cc+9db7d56ad0,g7b55021d1b+7b623691d5,g80478fca09+334cc8d2bd,g82479be7b0+b568f6b267,g858d7b2824+37b39d8760,g9125e01d80+a8ce1bb630,ga5288a1d22+11cb34fefe,gae0086650b+a8ce1bb630,gb4ec7eb0ab+37b39d8760,gb58c049af0+d64f4d3760,gc081298178+284e133171,gc28159a63d+d6d0f9f6ae,gcf0d15dbbd+00fe2e0b07,gd6b7c0dfd1+8b62435e69,gda3e153d99+37b39d8760,gda6a2b7d83+00fe2e0b07,gdaeeff99f8+1711a396fd,gdd5a9049c5+23f3b3239a,ge2409df99d+5d9f551a54,ge33fd446bb+37b39d8760,ge79ae78c31+d6d0f9f6ae,gf0baf85859+2dea8344a2,gf5289d68f6+3777f3df5e,w.2024.41
LSST Data Management Base Package
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Protected Attributes | List of all members
lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::MaskedImageIterator< ImageIterator, MaskIterator, VarianceIterator > Class Template Reference

An iterator to the MaskedImage. More...

#include <MaskedImage.h>

Inheritance diagram for lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::MaskedImageIterator< ImageIterator, MaskIterator, VarianceIterator >:
lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::MaskedImageIteratorBase< ImageIterator, MaskIterator, VarianceIterator, Ref > lsst::afw::math::MaskedVector< EntryT >::iterator

Public Types

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

Public Member Functions

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

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 >::MaskedImageIterator< ImageIterator, MaskIterator, VarianceIterator >

An iterator to the MaskedImage.

An iterator for a MaskedImage.

Definition at line 209 of file MaskedImage.h.

Member Typedef Documentation

◆ IMV_tuple

template<typename ImagePixelT , typename MaskPixelT = lsst::afw::image::MaskPixel, typename VariancePixelT = lsst::afw::image::VariancePixel>
template<typename ImageIterator , typename MaskIterator , typename VarianceIterator , template< typename > class Ref = Reference>
using lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::MaskedImageIteratorBase< ImageIterator, MaskIterator, VarianceIterator, Ref >::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 126 of file MaskedImage.h.

◆ type

template<typename ImagePixelT , typename MaskPixelT = lsst::afw::image::MaskPixel, typename VariancePixelT = lsst::afw::image::VariancePixel>
template<typename ImageIterator , typename MaskIterator , typename VarianceIterator , template< typename > class Ref = Reference>
using lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::MaskedImageIteratorBase< ImageIterator, MaskIterator, VarianceIterator, Ref >::type = Pixel
inherited

Type pointed to by the iterator.

Definition at line 133 of file MaskedImage.h.

Constructor & Destructor Documentation

◆ 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 >::MaskedImageIterator< ImageIterator, MaskIterator, VarianceIterator >::MaskedImageIterator ( ImageIterator & img,
MaskIterator & msk,
VarianceIterator & var )
inline

Definition at line 214 of file MaskedImage.h.

215 : MaskedImageIteratorBase_t(img, msk, var) {}

Member Function Documentation

◆ get_iterator_tuple()

template<typename ImagePixelT , typename MaskPixelT = lsst::afw::image::MaskPixel, typename VariancePixelT = lsst::afw::image::VariancePixel>
template<typename ImageIterator , typename MaskIterator , typename VarianceIterator , template< typename > class Ref = Reference>
const IMV_iterator_tuple lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::MaskedImageIteratorBase< ImageIterator, MaskIterator, VarianceIterator, Ref >::get_iterator_tuple ( ) const
inlineinherited

Return the underlying iterator tuple.

Note
not really for public consumption; could be made protected

Definition at line 151 of file MaskedImage.h.

151{ return _iter.get_iterator_tuple(); }
boost::zip_iterator< IMV_iterator_tuple > _iter

◆ image()

template<typename ImagePixelT , typename MaskPixelT = lsst::afw::image::MaskPixel, typename VariancePixelT = lsst::afw::image::VariancePixel>
template<typename ImageIterator , typename MaskIterator , typename VarianceIterator , template< typename > class Ref = Reference>
Ref< ImagePixelT >::type lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::MaskedImageIteratorBase< ImageIterator, MaskIterator, VarianceIterator, Ref >::image ( )
inlineinherited

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

Definition at line 140 of file MaskedImage.h.

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

◆ mask()

template<typename ImagePixelT , typename MaskPixelT = lsst::afw::image::MaskPixel, typename VariancePixelT = lsst::afw::image::VariancePixel>
template<typename ImageIterator , typename MaskIterator , typename VarianceIterator , template< typename > class Ref = Reference>
Ref< MaskPixelT >::type lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::MaskedImageIteratorBase< ImageIterator, MaskIterator, VarianceIterator, Ref >::mask ( )
inlineinherited

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

Definition at line 143 of file MaskedImage.h.

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

◆ operator Pixel()

template<typename ImagePixelT , typename MaskPixelT = lsst::afw::image::MaskPixel, typename VariancePixelT = lsst::afw::image::VariancePixel>
template<typename ImageIterator , typename MaskIterator , typename VarianceIterator , template< typename > class Ref = Reference>
lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::MaskedImageIteratorBase< ImageIterator, MaskIterator, VarianceIterator, Ref >::operator Pixel ( ) const
inlineinherited

Convert an iterator to a Pixel.

Definition at line 193 of file MaskedImage.h.

193 {
194 return Pixel(_iter->template get<0>()[0], _iter->template get<1>()[0],
195 _iter->template get<2>()[0]);
196 }
lsst::afw::image::pixel::Pixel< ImagePixelT, MaskPixelT, VariancePixelT > Pixel
A Pixel in the MaskedImage.

◆ operator!=()

template<typename ImagePixelT , typename MaskPixelT = lsst::afw::image::MaskPixel, typename VariancePixelT = lsst::afw::image::VariancePixel>
template<typename ImageIterator , typename MaskIterator , typename VarianceIterator , template< typename > class Ref = Reference>
bool lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::MaskedImageIteratorBase< ImageIterator, MaskIterator, VarianceIterator, Ref >::operator!= ( MaskedImageIteratorBase< ImageIterator, MaskIterator, VarianceIterator, Ref > const & rhs)
inlineinherited

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

Definition at line 185 of file MaskedImage.h.

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

◆ operator*() [1/2]

template<typename ImagePixelT , typename MaskPixelT = lsst::afw::image::MaskPixel, typename VariancePixelT = lsst::afw::image::VariancePixel>
template<typename ImageIterator , typename MaskIterator , typename VarianceIterator , template< typename > class Ref = Reference>
Pixel lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::MaskedImageIteratorBase< ImageIterator, MaskIterator, VarianceIterator, Ref >::operator* ( )
inlineinherited

Dereference the iterator, returning a Pixel.

Definition at line 199 of file MaskedImage.h.

199{ return Pixel(image(), mask(), variance()); }
Ref< ImagePixelT >::type image()
Return (a reference to) the image part of the Pixel pointed at by the iterator.
Ref< MaskPixelT >::type mask()
Return (a reference to) the mask part of the Pixel pointed at by the iterator.
Ref< VariancePixelT >::type variance()
Return (a reference to) the variance part of the Pixel pointed at by the iterator.

◆ operator*() [2/2]

template<typename ImagePixelT , typename MaskPixelT = lsst::afw::image::MaskPixel, typename VariancePixelT = lsst::afw::image::VariancePixel>
template<typename ImageIterator , typename MaskIterator , typename VarianceIterator , template< typename > class Ref = Reference>
const Pixel lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::MaskedImageIteratorBase< ImageIterator, MaskIterator, VarianceIterator, Ref >::operator* ( ) const
inlineinherited

Dereference the iterator, returning a const Pixel.

Definition at line 201 of file MaskedImage.h.

201{ 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 >
MaskedImageIterator lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::MaskedImageIterator< ImageIterator, MaskIterator, VarianceIterator >::operator+ ( std::ptrdiff_t delta)
inline

Return a MaskedImageIterator that's delta beyond this.

Definition at line 217 of file MaskedImage.h.

217 {
218 MaskedImageIterator lhs = *this;
219 lhs += delta;
220
221 return lhs;
222 }
MaskedImageIterator(ImageIterator &img, MaskIterator &msk, VarianceIterator &var)

◆ operator++() [1/2]

template<typename ImagePixelT , typename MaskPixelT = lsst::afw::image::MaskPixel, typename VariancePixelT = lsst::afw::image::VariancePixel>
template<typename ImageIterator , typename MaskIterator , typename VarianceIterator , template< typename > class Ref = Reference>
MaskedImageIteratorBase & lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::MaskedImageIteratorBase< ImageIterator, MaskIterator, VarianceIterator, Ref >::operator++ ( )
inlineinherited

Increment the iterator (prefix)

Definition at line 166 of file MaskedImage.h.

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

◆ operator++() [2/2]

template<typename ImagePixelT , typename MaskPixelT = lsst::afw::image::MaskPixel, typename VariancePixelT = lsst::afw::image::VariancePixel>
template<typename ImageIterator , typename MaskIterator , typename VarianceIterator , template< typename > class Ref = Reference>
MaskedImageIteratorBase lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::MaskedImageIteratorBase< ImageIterator, MaskIterator, VarianceIterator, Ref >::operator++ ( int )
inlineinherited

Increment the iterator (postfix)

Definition at line 171 of file MaskedImage.h.

171 { // postfix
172 MaskedImageIteratorBase tmp(*this);
173 _iter++;
174 return tmp;
175 }
MaskedImageIteratorBase(ImageIterator const &img, MaskIterator const &msk, VarianceIterator const &var)
Construct a MaskedImageIteratorBase from the image/mask/variance iterators.

◆ operator+=()

template<typename ImagePixelT , typename MaskPixelT = lsst::afw::image::MaskPixel, typename VariancePixelT = lsst::afw::image::VariancePixel>
template<typename ImageIterator , typename MaskIterator , typename VarianceIterator , template< typename > class Ref = Reference>
MaskedImageIteratorBase & lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::MaskedImageIteratorBase< ImageIterator, MaskIterator, VarianceIterator, Ref >::operator+= ( std::ptrdiff_t delta)
inlineinherited

Increment the iterator by delta

Parameters
deltahow far to move the iterator

Definition at line 154 of file MaskedImage.h.

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

◆ operator-()

template<typename ImagePixelT , typename MaskPixelT = lsst::afw::image::MaskPixel, typename VariancePixelT = lsst::afw::image::VariancePixel>
template<typename ImageIterator , typename MaskIterator , typename VarianceIterator , template< typename > class Ref = Reference>
std::ptrdiff_t lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::MaskedImageIteratorBase< ImageIterator, MaskIterator, VarianceIterator, Ref >::operator- ( MaskedImageIteratorBase< ImageIterator, MaskIterator, VarianceIterator, Ref > const & rhs)
inlineinherited

Return the distance between two iterators.

Definition at line 177 of file MaskedImage.h.

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

◆ operator-=()

template<typename ImagePixelT , typename MaskPixelT = lsst::afw::image::MaskPixel, typename VariancePixelT = lsst::afw::image::VariancePixel>
template<typename ImageIterator , typename MaskIterator , typename VarianceIterator , template< typename > class Ref = Reference>
MaskedImageIteratorBase & lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::MaskedImageIteratorBase< ImageIterator, MaskIterator, VarianceIterator, Ref >::operator-= ( std::ptrdiff_t delta)
inlineinherited

Decrement the iterator by delta

Parameters
deltahow far to move the iterator

Definition at line 160 of file MaskedImage.h.

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

◆ operator<()

template<typename ImagePixelT , typename MaskPixelT = lsst::afw::image::MaskPixel, typename VariancePixelT = lsst::afw::image::VariancePixel>
template<typename ImageIterator , typename MaskIterator , typename VarianceIterator , template< typename > class Ref = Reference>
bool lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::MaskedImageIteratorBase< ImageIterator, MaskIterator, VarianceIterator, Ref >::operator< ( MaskedImageIteratorBase< ImageIterator, MaskIterator, VarianceIterator, Ref > const & rhs)
inlineinherited

Return true if the lhs is less than the rhs.

Definition at line 189 of file MaskedImage.h.

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

◆ operator==()

template<typename ImagePixelT , typename MaskPixelT = lsst::afw::image::MaskPixel, typename VariancePixelT = lsst::afw::image::VariancePixel>
template<typename ImageIterator , typename MaskIterator , typename VarianceIterator , template< typename > class Ref = Reference>
bool lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::MaskedImageIteratorBase< ImageIterator, MaskIterator, VarianceIterator, Ref >::operator== ( MaskedImageIteratorBase< ImageIterator, MaskIterator, VarianceIterator, Ref > const & rhs)
inlineinherited

Return true if the lhs equals the rhs.

Definition at line 181 of file MaskedImage.h.

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

◆ variance()

template<typename ImagePixelT , typename MaskPixelT = lsst::afw::image::MaskPixel, typename VariancePixelT = lsst::afw::image::VariancePixel>
template<typename ImageIterator , typename MaskIterator , typename VarianceIterator , template< typename > class Ref = Reference>
Ref< VariancePixelT >::type lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::MaskedImageIteratorBase< ImageIterator, MaskIterator, VarianceIterator, Ref >::variance ( )
inlineinherited

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

Definition at line 146 of file MaskedImage.h.

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

Member Data Documentation

◆ _iter

template<typename ImagePixelT , typename MaskPixelT = lsst::afw::image::MaskPixel, typename VariancePixelT = lsst::afw::image::VariancePixel>
template<typename ImageIterator , typename MaskIterator , typename VarianceIterator , template< typename > class Ref = Reference>
boost::zip_iterator<IMV_iterator_tuple> lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::MaskedImageIteratorBase< ImageIterator, MaskIterator, VarianceIterator, Ref >::_iter
protectedinherited

Definition at line 204 of file MaskedImage.h.


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