LSSTApplications  10.0+286,10.0+36,10.0+46,10.0-2-g4f67435,10.1+152,10.1+37,11.0,11.0+1,11.0-1-g47edd16,11.0-1-g60db491,11.0-1-g7418c06,11.0-2-g04d2804,11.0-2-g68503cd,11.0-2-g818369d,11.0-2-gb8b8ce7
LSSTDataManagementBasePackage
Public Types | Public Member Functions | Private Attributes | 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
 

Private Attributes

int _count
 

Detailed Description

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

Definition at line 163 of file isr.h.

Member Typedef Documentation

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 165 of file isr.h.

Constructor & Destructor Documentation

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

Definition at line 166 of file isr.h.

166  :
167  _count(0) {} ;
template<typename ImageT , typename MaskT = lsst::afw::image::MaskPixel>
virtual lsst::ip::isr::CountMaskedPixels< ImageT, MaskT >::~CountMaskedPixels ( )
inlinevirtual

Definition at line 168 of file isr.h.

168 {};

Member Function Documentation

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 174 of file isr.h.

175  {
176  reset();
177  for (int y = 0; y != image.getHeight(); ++y) {
178  for (x_iterator ptr = image.row_begin(y); ptr != image.row_end(y); ++ptr) {
179  if ( ((*ptr).mask() & bitmask) == bitmask ) {
180  _count += 1;
181  }
182  }
183  }
184  }
int y
x_iterator row_begin(int y) const
Return an x_iterator to the start of the image.
Definition: MaskedImage.cc:742
int getHeight() const
Return the number of rows in the image.
Definition: MaskedImage.h:903
x_iterator row_end(int y) const
Return an x_iterator to the end of the image.
Definition: MaskedImage.cc:752
lsst::afw::image::MaskedImage< ImageT >::x_iterator x_iterator
Definition: isr.h:165
template<typename ImageT , typename MaskT = lsst::afw::image::MaskPixel>
int lsst::ip::isr::CountMaskedPixels< ImageT, MaskT >::getCount ( ) const
inline

Definition at line 187 of file isr.h.

187 { return _count; }
template<typename ImageT , typename MaskT = lsst::afw::image::MaskPixel>
void lsst::ip::isr::CountMaskedPixels< ImageT, MaskT >::reset ( )
inline

Definition at line 171 of file isr.h.

171 { _count = 0; }

Member Data Documentation

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

Definition at line 190 of file isr.h.


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