LSST Applications  21.0.0-147-g0e635eb1+1acddb5be5,22.0.0+052faf71bd,22.0.0+1ea9a8b2b2,22.0.0+6312710a6c,22.0.0+729191ecac,22.0.0+7589c3a021,22.0.0+9f079a9461,22.0.1-1-g7d6de66+b8044ec9de,22.0.1-1-g87000a6+536b1ee016,22.0.1-1-g8e32f31+6312710a6c,22.0.1-10-gd060f87+016f7cdc03,22.0.1-12-g9c3108e+df145f6f68,22.0.1-16-g314fa6d+c825727ab8,22.0.1-19-g93a5c75+d23f2fb6d8,22.0.1-19-gb93eaa13+aab3ef7709,22.0.1-2-g8ef0a89+b8044ec9de,22.0.1-2-g92698f7+9f079a9461,22.0.1-2-ga9b0f51+052faf71bd,22.0.1-2-gac51dbf+052faf71bd,22.0.1-2-gb66926d+6312710a6c,22.0.1-2-gcb770ba+09e3807989,22.0.1-20-g32debb5+b8044ec9de,22.0.1-23-gc2439a9a+fb0756638e,22.0.1-3-g496fd5d+09117f784f,22.0.1-3-g59f966b+1e6ba2c031,22.0.1-3-g849a1b8+f8b568069f,22.0.1-3-gaaec9c0+c5c846a8b1,22.0.1-32-g5ddfab5d3+60ce4897b0,22.0.1-4-g037fbe1+64e601228d,22.0.1-4-g8623105+b8044ec9de,22.0.1-5-g096abc9+d18c45d440,22.0.1-5-g15c806e+57f5c03693,22.0.1-7-gba73697+57f5c03693,master-g6e05de7fdc+c1283a92b8,master-g72cdda8301+729191ecac,w.2021.39
LSST Data Management Base Package
Classes | Public Types | Public Member Functions | Private Member Functions | List of all members
lsst::afw::math::MaskedVector< EntryT > Class Template Reference

#include <MaskedVector.h>

Inheritance diagram for lsst::afw::math::MaskedVector< EntryT >:
lsst::afw::image::MaskedImage< EntryT >

Classes

class  iterator
 

Public Types

using Pixel = typename lsst::afw::image::MaskedImage< EntryT >::Pixel
 

Public Member Functions

 MaskedVector (int width=0)
 
 MaskedVector (MaskedVector const &)=default
 
 MaskedVector (MaskedVector &&)=default
 
MaskedVectoroperator= (MaskedVector const &)=default
 
MaskedVectoroperator= (MaskedVector &&)=default
 
 ~MaskedVector () override=default
 
std::shared_ptr< std::vector< EntryT > > getVector (bool const noThrow=false) const
 Return a (Ptr to) the MaskedImage's image. More...
 
Pixeloperator[] (int const i)
 
lsst::afw::image::MaskedImage< EntryT >::Image::Pixelvalue (int const i)
 
lsst::afw::image::MaskedImage< EntryT >::Mask::Pixelmask (int const i)
 
lsst::afw::image::MaskedImage< EntryT >::Variance::Pixelvariance (int const i)
 
lsst::afw::image::MaskedImage< EntryT >::ImagePtr getImage () const
 
lsst::afw::image::MaskedImage< EntryT >::MaskPtr getMask () const
 
lsst::afw::image::MaskedImage< EntryT >::VariancePtr getVariance () const
 
int size ()
 
bool empty ()
 
iterator begin ()
 
iterator end ()
 

Private Member Functions

MaskedImage operator[] (lsst::geom::Box2I const &bbox) const
 Return a subimage corresponding to the given box (interpreted as PARENT coordinates). More...
 
iterator begin () const
 Return an iterator to the start of the image. More...
 
fast_iterator begin (bool contiguous) const
 Fast iterators to contiguous images. More...
 
iterator end () const
 Return an iterator to the end of the image. More...
 
fast_iterator end (bool contiguous) const
 Return a fast iterator to the end of the image, which must be contiguous Note that the order in which pixels are visited is undefined. More...
 

Detailed Description

template<typename EntryT>
class lsst::afw::math::MaskedVector< EntryT >

Definition at line 37 of file MaskedVector.h.

Member Typedef Documentation

◆ Pixel

template<typename EntryT >
using lsst::afw::math::MaskedVector< EntryT >::Pixel = typename lsst::afw::image::MaskedImage<EntryT>::Pixel

Definition at line 41 of file MaskedVector.h.

Constructor & Destructor Documentation

◆ MaskedVector() [1/3]

template<typename EntryT >
lsst::afw::math::MaskedVector< EntryT >::MaskedVector ( int  width = 0)
inlineexplicit

Definition at line 43 of file MaskedVector.h.

44  : //, MaskPlaneDict const& planeDict=MaskPlaneDict()) :
45  lsst::afw::image::MaskedImage<EntryT>(lsst::geom::Extent2I(width, 1)) {} //, planeDict) {}

◆ MaskedVector() [2/3]

template<typename EntryT >
lsst::afw::math::MaskedVector< EntryT >::MaskedVector ( MaskedVector< EntryT > const &  )
default

◆ MaskedVector() [3/3]

template<typename EntryT >
lsst::afw::math::MaskedVector< EntryT >::MaskedVector ( MaskedVector< EntryT > &&  )
default

◆ ~MaskedVector()

template<typename EntryT >
lsst::afw::math::MaskedVector< EntryT >::~MaskedVector ( )
overridedefault

Member Function Documentation

◆ begin()

template<typename EntryT >
iterator lsst::afw::math::MaskedVector< EntryT >::begin ( )
inline

Definition at line 123 of file MaskedVector.h.

123 { return this->row_begin(0); }
x_iterator row_begin(int y) const
Return an x_iterator to the start of the image.
Definition: MaskedImage.cc:621

◆ empty()

template<typename EntryT >
bool lsst::afw::math::MaskedVector< EntryT >::empty ( )
inline

Definition at line 104 of file MaskedVector.h.

104 { return this->getWidth(0) == 0; }
int getWidth() const
Return the number of columns in the image.
Definition: MaskedImage.h:1054

◆ end()

template<typename EntryT >
iterator lsst::afw::math::MaskedVector< EntryT >::end ( )
inline

Definition at line 124 of file MaskedVector.h.

124 { return this->row_end(0); }
x_iterator row_end(int y) const
Return an x_iterator to the end of the image.
Definition: MaskedImage.cc:631

◆ getImage()

template<typename EntryT >
lsst::afw::image::MaskedImage<EntryT>::ImagePtr lsst::afw::math::MaskedVector< EntryT >::getImage ( ) const
inline

Definition at line 88 of file MaskedVector.h.

88  {
90  }
ImagePtr getImage() const
Return a (shared_ptr to) the MaskedImage's image.
Definition: MaskedImage.h:1018

◆ getMask()

template<typename EntryT >
lsst::afw::image::MaskedImage<EntryT>::MaskPtr lsst::afw::math::MaskedVector< EntryT >::getMask ( ) const
inline

Definition at line 91 of file MaskedVector.h.

91  {
93  }
MaskPtr getMask() const
Return a (shared_ptr to) the MaskedImage's mask.
Definition: MaskedImage.h:1030

◆ getVariance()

template<typename EntryT >
lsst::afw::image::MaskedImage<EntryT>::VariancePtr lsst::afw::math::MaskedVector< EntryT >::getVariance ( ) const
inline

Definition at line 94 of file MaskedVector.h.

94  {
96  }
VariancePtr getVariance() const
Return a (shared_ptr to) the MaskedImage's variance.
Definition: MaskedImage.h:1051

◆ getVector()

template<typename EntryT >
std::shared_ptr<std::vector<EntryT> > lsst::afw::math::MaskedVector< EntryT >::getVector ( bool const  noThrow = false) const
inline

Return a (Ptr to) the MaskedImage's image.

Definition at line 55 of file MaskedVector.h.

55  {
56  if (!this->getImage() && !noThrow) {
57  throw LSST_EXCEPT(lsst::pex::exceptions::RuntimeError, "MaskedVector's Image is NULL");
58  }
59 
61  for (int i_y = 0; i_y < this->getImage()->getHeight(); ++i_y) {
63  ptr != this->getImage()->row_end(i_y); ++ptr) {
64  imgcp->push_back(*ptr);
65  }
66  }
67  return imgcp;
68  }
#define LSST_EXCEPT(type,...)
Create an exception with a given type.
Definition: Exception.h:48
uint64_t * ptr
Definition: RangeSet.cc:88
typename _view_t::x_iterator x_iterator
An iterator for traversing the pixels in a row.
Definition: ImageBase.h:133
int getHeight() const
Return the number of rows in the image.
Definition: MaskedImage.h:1056
lsst::afw::image::MaskedImage< EntryT >::ImagePtr getImage() const
Definition: MaskedVector.h:88
Reports errors that are due to events beyond the control of the program.
Definition: Runtime.h:104

◆ mask()

template<typename EntryT >
lsst::afw::image::MaskedImage<EntryT>::Mask::Pixel& lsst::afw::math::MaskedVector< EntryT >::mask ( int const  i)
inline

Definition at line 81 of file MaskedVector.h.

81  {
83  }

◆ operator=() [1/2]

template<typename EntryT >
MaskedVector& lsst::afw::math::MaskedVector< EntryT >::operator= ( MaskedVector< EntryT > &&  )
default

◆ operator=() [2/2]

template<typename EntryT >
MaskedVector& lsst::afw::math::MaskedVector< EntryT >::operator= ( MaskedVector< EntryT > const &  )
default

◆ operator[]()

template<typename EntryT >
Pixel& lsst::afw::math::MaskedVector< EntryT >::operator[] ( int const  i)
inline

Definition at line 72 of file MaskedVector.h.

72  {
76  }
typename lsst::afw::image::MaskedImage< EntryT >::Pixel Pixel
Definition: MaskedVector.h:41

◆ size()

template<typename EntryT >
int lsst::afw::math::MaskedVector< EntryT >::size ( )
inline

Definition at line 103 of file MaskedVector.h.

103 { return this->getWidth(0); }

◆ value()

template<typename EntryT >
lsst::afw::image::MaskedImage<EntryT>::Image::Pixel& lsst::afw::math::MaskedVector< EntryT >::value ( int const  i)
inline

Definition at line 78 of file MaskedVector.h.

78  {
80  }

◆ variance()

template<typename EntryT >
lsst::afw::image::MaskedImage<EntryT>::Variance::Pixel& lsst::afw::math::MaskedVector< EntryT >::variance ( int const  i)
inline

Definition at line 84 of file MaskedVector.h.

84  {
86  }

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