LSSTApplications  17.0+124,17.0+14,17.0+73,18.0.0+37,18.0.0+80,18.0.0-4-g68ffd23+4,18.1.0-1-g0001055+12,18.1.0-1-g03d53ef+5,18.1.0-1-g1349e88+55,18.1.0-1-g2505f39+44,18.1.0-1-g5315e5e+4,18.1.0-1-g5e4b7ea+14,18.1.0-1-g7e8fceb+4,18.1.0-1-g85f8cd4+48,18.1.0-1-g8ff0b9f+4,18.1.0-1-ga2c679d+1,18.1.0-1-gd55f500+35,18.1.0-10-gb58edde+2,18.1.0-11-g0997b02+4,18.1.0-13-gfe4edf0b+12,18.1.0-14-g259bd21+21,18.1.0-19-gdb69f3f+2,18.1.0-2-g5f9922c+24,18.1.0-2-gd3b74e5+11,18.1.0-2-gfbf3545+32,18.1.0-26-g728bddb4+5,18.1.0-27-g6ff7ca9+2,18.1.0-3-g52aa583+25,18.1.0-3-g8ea57af+9,18.1.0-3-gb69f684+42,18.1.0-3-gfcaddf3+6,18.1.0-32-gd8786685a,18.1.0-4-gf3f9b77+6,18.1.0-5-g1dd662b+2,18.1.0-5-g6dbcb01+41,18.1.0-6-gae77429+3,18.1.0-7-g9d75d83+9,18.1.0-7-gae09a6d+30,18.1.0-9-gc381ef5+4,w.2019.45
LSSTDataManagementBasePackage
Public Types | Public Member Functions | List of all members
lsst::ip::isr::CountMaskedPixels< ImageT, MaskT > Class Template Reference

#include <isr.h>

Public Types

typedef lsst::afw::image::MaskedImage< ImageT >::x_iterator x_iterator
 

Public Member Functions

 CountMaskedPixels ()
 
virtual ~CountMaskedPixels ()
 
void reset ()
 
void apply (lsst::afw::image::MaskedImage< ImageT > const &image, MaskT bitmask)
 
int getCount () const
 

Detailed Description

template<typename ImageT, typename MaskT = lsst::afw::image::MaskPixel>
class lsst::ip::isr::CountMaskedPixels< ImageT, MaskT >

Definition at line 56 of file isr.h.

Member Typedef Documentation

◆ x_iterator

template<typename ImageT , typename MaskT = lsst::afw::image::MaskPixel>
typedef lsst::afw::image::MaskedImage<ImageT>::x_iterator lsst::ip::isr::CountMaskedPixels< ImageT, MaskT >::x_iterator

Definition at line 58 of file isr.h.

Constructor & Destructor Documentation

◆ CountMaskedPixels()

template<typename ImageT , typename MaskT = lsst::afw::image::MaskPixel>
lsst::ip::isr::CountMaskedPixels< ImageT, MaskT >::CountMaskedPixels ( )
inline

Definition at line 59 of file isr.h.

59  :
60  _count(0) {} ;

◆ ~CountMaskedPixels()

template<typename ImageT , typename MaskT = lsst::afw::image::MaskPixel>
virtual lsst::ip::isr::CountMaskedPixels< ImageT, MaskT >::~CountMaskedPixels ( )
inlinevirtual

Definition at line 61 of file isr.h.

61 {};

Member Function Documentation

◆ apply()

template<typename ImageT , typename MaskT = lsst::afw::image::MaskPixel>
void lsst::ip::isr::CountMaskedPixels< ImageT, MaskT >::apply ( lsst::afw::image::MaskedImage< ImageT > const &  image,
MaskT  bitmask 
)
inline

Definition at line 67 of file isr.h.

68  {
69  reset();
70  for (int y = 0; y != image.getHeight(); ++y) {
71  for (x_iterator ptr = image.row_begin(y); ptr != image.row_end(y); ++ptr) {
72  if ( ((*ptr).mask() & bitmask) == bitmask ) {
73  _count += 1;
74  }
75  }
76  }
77  }
uint64_t * ptr
Definition: RangeSet.cc:88
int y
Definition: SpanSet.cc:49
lsst::afw::image::MaskedImage< ImageT >::x_iterator x_iterator
Definition: isr.h:58
int getHeight() const
Return the number of rows in the image.
Definition: MaskedImage.h:1093
x_iterator row_begin(int y) const
Return an x_iterator to the start of the image.
Definition: MaskedImage.cc:612
x_iterator row_end(int y) const
Return an x_iterator to the end of the image.
Definition: MaskedImage.cc:622

◆ getCount()

template<typename ImageT , typename MaskT = lsst::afw::image::MaskPixel>
int lsst::ip::isr::CountMaskedPixels< ImageT, MaskT >::getCount ( ) const
inline

Definition at line 80 of file isr.h.

80 { return _count; }

◆ reset()

template<typename ImageT , typename MaskT = lsst::afw::image::MaskPixel>
void lsst::ip::isr::CountMaskedPixels< ImageT, MaskT >::reset ( )
inline

Definition at line 64 of file isr.h.

64 { _count = 0; }

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