LSSTApplications  18.0.0+106,18.0.0+50,19.0.0,19.0.0+1,19.0.0+10,19.0.0+11,19.0.0+13,19.0.0+17,19.0.0+2,19.0.0-1-g20d9b18+6,19.0.0-1-g425ff20,19.0.0-1-g5549ca4,19.0.0-1-g580fafe+6,19.0.0-1-g6fe20d0+1,19.0.0-1-g7011481+9,19.0.0-1-g8c57eb9+6,19.0.0-1-gb5175dc+11,19.0.0-1-gdc0e4a7+9,19.0.0-1-ge272bc4+6,19.0.0-1-ge3aa853,19.0.0-10-g448f008b,19.0.0-12-g6990b2c,19.0.0-2-g0d9f9cd+11,19.0.0-2-g3d9e4fb2+11,19.0.0-2-g5037de4,19.0.0-2-gb96a1c4+3,19.0.0-2-gd955cfd+15,19.0.0-3-g2d13df8,19.0.0-3-g6f3c7dc,19.0.0-4-g725f80e+11,19.0.0-4-ga671dab3b+1,19.0.0-4-gad373c5+3,19.0.0-5-ga2acb9c+2,19.0.0-5-gfe96e6c+2,w.2020.01
LSSTDataManagementBasePackage
Public Types | Public Member Functions | Protected Attributes | List of all members
lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::MaskedImageLocator< ImageLocator, MaskLocator, VarianceLocator > Class Template Reference

A locator for the MaskedImage. More...

#include <MaskedImage.h>

Inheritance diagram for lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::MaskedImageLocator< ImageLocator, MaskLocator, VarianceLocator >:
lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::MaskedImageLocatorBase< ImageLocator, MaskLocator, VarianceLocator >

Public Types

typedef boost::tuple< typename ImageLocator::cached_location_t, typename MaskLocator::cached_location_t, typename VarianceLocator::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

 MaskedImageLocator (ImageLocator &img, MaskLocator &msk, VarianceLocator &var)
 
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...
 
Reference< typename boost::mpl::at< PixelTVec, N >::type >::type apply_IMV (cached_location_t const &cached_loc)
 
Reference< typename boost::mpl::at< PixelTVec, N >::type >::type apply_IMV ()
 
Reference< typename boost::mpl::at< PixelTVec, N >::type >::type apply_IMV (int x, int y)
 
Reference< 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...
 
Reference< ImagePixelT >::type image ()
 Return a reference to the image at the current position of the locator. More...
 
Reference< 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...
 
Reference< 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...
 
Reference< MaskPixelT >::type mask ()
 Return a reference to the mask at the current position of the locator. More...
 
Reference< 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...
 
Reference< 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...
 
Reference< VariancePixelT >::type variance ()
 Return a reference to the variance at the current position of the locator. More...
 
Reference< 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 >::MaskedImageLocator< ImageLocator, MaskLocator, VarianceLocator >

A locator for the MaskedImage.

A locator for a MaskedImage.

Definition at line 105 of file MaskedImage.h.

Member Typedef Documentation

◆ IMVCachedLocation

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

Definition at line 353 of file MaskedImage.h.

◆ PixelTVec

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

Definition at line 420 of file MaskedImage.h.

◆ x_iterator

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

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

Definition at line 355 of file MaskedImage.h.

◆ y_iterator

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

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

Definition at line 357 of file MaskedImage.h.

Constructor & Destructor Documentation

◆ 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 >::MaskedImageLocator< ImageLocator, MaskLocator, VarianceLocator >::MaskedImageLocator ( ImageLocator &  img,
MaskLocator &  msk,
VarianceLocator &  var 
)
inline

Definition at line 508 of file MaskedImage.h.

509  : MaskedImageLocatorBase_t(img, msk, var) {}

Member Function Documentation

◆ apply_IMV() [1/3]

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

Definition at line 423 of file MaskedImage.h.

424  {
425  return _loc.template get<N::value>()[cached_loc._imv.template get<N::value>()][0];
426  }

◆ apply_IMV() [2/3]

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

Definition at line 429 of file MaskedImage.h.

429  {
430  return _loc.template get<N::value>()[0][0];
431  }

◆ apply_IMV() [3/3]

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

Definition at line 434 of file MaskedImage.h.

434  {
435  return _loc.template get<N::value>()(x, y)[0];
436  }
y_iterator y()
Return an iterator that can be used to move (or dereference) a locator.
Definition: MaskedImage.h:411
x_iterator x()
Return an iterator that can be used to move (or dereference) a locator.
Definition: MaskedImage.h:405

◆ cache_location()

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

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

Definition at line 414 of file MaskedImage.h.

414 { return cached_location_t(_loc, x, y); }
y_iterator y()
Return an iterator that can be used to move (or dereference) a locator.
Definition: MaskedImage.h:411
x_iterator x()
Return an iterator that can be used to move (or dereference) a locator.
Definition: MaskedImage.h:405

◆ getLoc()

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

◆ image() [1/3]

Reference <ImagePixelT>::type lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::MaskedImageLocatorBase< ImageLocator, MaskLocator, VarianceLocator, Reference >::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 441 of file MaskedImage.h.

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

◆ image() [2/3]

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

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

Definition at line 445 of file MaskedImage.h.

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

◆ image() [3/3]

Reference <ImagePixelT>::type lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::MaskedImageLocatorBase< ImageLocator, MaskLocator, VarianceLocator, Reference >::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 447 of file MaskedImage.h.

447 { return apply_IMV<boost::mpl::int_<0>>(x, y); }
y_iterator y()
Return an iterator that can be used to move (or dereference) a locator.
Definition: MaskedImage.h:411
x_iterator x()
Return an iterator that can be used to move (or dereference) a locator.
Definition: MaskedImage.h:405

◆ mask() [1/3]

Reference <MaskPixelT>::type lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::MaskedImageLocatorBase< ImageLocator, MaskLocator, VarianceLocator, Reference >::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 450 of file MaskedImage.h.

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

◆ mask() [2/3]

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

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

Definition at line 454 of file MaskedImage.h.

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

◆ mask() [3/3]

Reference <MaskPixelT>::type lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::MaskedImageLocatorBase< ImageLocator, MaskLocator, VarianceLocator, Reference >::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 456 of file MaskedImage.h.

456 { return apply_IMV<boost::mpl::int_<1>>(x, y); }
y_iterator y()
Return an iterator that can be used to move (or dereference) a locator.
Definition: MaskedImage.h:411
x_iterator x()
Return an iterator that can be used to move (or dereference) a locator.
Definition: MaskedImage.h:405

◆ operator!=()

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

Return true iff two locators are not equal.

Definition at line 474 of file MaskedImage.h.

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

◆ operator()()

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

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

Definition at line 389 of file MaskedImage.h.

389  {
390  return Pixel(_loc.template get<0>()(x, y)[0], _loc.template get<1>()(x, y)[0],
391  _loc.template get<2>()(x, y)[0]);
392  }
y_iterator y()
Return an iterator that can be used to move (or dereference) a locator.
Definition: MaskedImage.h:411
float Pixel
Typedefs to be used for pixel values.
Definition: common.h:37
x_iterator x()
Return an iterator that can be used to move (or dereference) a locator.
Definition: MaskedImage.h:405

◆ operator*()

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

Dereference a locator, returning a Pixel.

Definition at line 383 of file MaskedImage.h.

383  {
384  return Pixel(_loc.template get<0>().x()[0][0], _loc.template get<1>().x()[0][0],
385  _loc.template get<2>().x()[0][0]);
386  }
float Pixel
Typedefs to be used for pixel values.
Definition: common.h:37
x_iterator x()
Return an iterator that can be used to move (or dereference) a locator.
Definition: MaskedImage.h:405

◆ operator+=() [1/2]

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

Increment the locator's x and y positions by p

Definition at line 481 of file MaskedImage.h.

481  {
482  return operator+=(detail::difference_type(p.first, p.second));
483  }
MaskedImageLocatorBase & operator+=(pair2I const &p)
Increment the locator&#39;s x and y positions by p
Definition: MaskedImage.h:481

◆ operator+=() [2/2]

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

Increment the locator's x and y positions by p

Definition at line 486 of file MaskedImage.h.

486  {
487  _loc.template get<0>() += p;
488  _loc.template get<1>() += p;
489  _loc.template get<2>() += p;
490 
491  return *this;
492  }

◆ operator<()

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

Return true iff lhs is less than rhs.

Definition at line 476 of file MaskedImage.h.

476  {
477  return _loc.template get<0>() < rhs._loc.template get<0>();
478  }

◆ operator==()

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

Return true iff two locators are equal.

Definition at line 470 of file MaskedImage.h.

470  {
471  return _loc.template get<0>() == rhs._loc.template get<0>();
472  }

◆ operator[]()

Pixel lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::MaskedImageLocatorBase< ImageLocator, MaskLocator, VarianceLocator, Reference >::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 396 of file MaskedImage.h.

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

◆ variance() [1/3]

Reference <VariancePixelT>::type lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::MaskedImageLocatorBase< ImageLocator, MaskLocator, VarianceLocator, Reference >::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 459 of file MaskedImage.h.

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

◆ variance() [2/3]

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

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

Definition at line 463 of file MaskedImage.h.

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

◆ variance() [3/3]

Reference <VariancePixelT>::type lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::MaskedImageLocatorBase< ImageLocator, MaskLocator, VarianceLocator, Reference >::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 465 of file MaskedImage.h.

465  {
466  return apply_IMV<boost::mpl::int_<2>>(x, y);
467  }
y_iterator y()
Return an iterator that can be used to move (or dereference) a locator.
Definition: MaskedImage.h:411
x_iterator x()
Return an iterator that can be used to move (or dereference) a locator.
Definition: MaskedImage.h:405

◆ x()

x_iterator lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::MaskedImageLocatorBase< ImageLocator, MaskLocator, VarianceLocator, Reference >::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 405 of file MaskedImage.h.

405 { return x_iterator(this); }
_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) ...
Definition: MaskedImage.h:355

◆ y()

y_iterator lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::MaskedImageLocatorBase< ImageLocator, MaskLocator, VarianceLocator, Reference >::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 411 of file MaskedImage.h.

411 { return y_iterator(this); }
_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) ...
Definition: MaskedImage.h:357

Member Data Documentation

◆ _loc

IMVLocator lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::MaskedImageLocatorBase< ImageLocator, MaskLocator, VarianceLocator, Reference >::_loc
protectedinherited

Definition at line 499 of file MaskedImage.h.


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