LSSTApplications  20.0.0
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  }

◆ 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:
y
int y
Definition: SpanSet.cc:49
lsst::afw::image
Backwards-compatibility support for depersisting the old Calib (FluxMag0/FluxMag0Err) objects.
Definition: imageAlgorithm.dox:1
lsst::ip::isr::CountMaskedPixels::reset
void reset()
Definition: isr.h:64
lsst::ip::isr::CountMaskedPixels::x_iterator
lsst::afw::image::MaskedImage< ImageT >::x_iterator x_iterator
Definition: isr.h:58
ptr
uint64_t * ptr
Definition: RangeSet.cc:88