#include <cstdio>
namespace afwDetect = lsst::afw::detection;
namespace afwGeom = lsst::afw::geom;
namespace {
template <typename MaskT>
public:
FindSetBits(MaskT const& mask
void operator()(typename MaskT::xy_locator loc,
int,
int
) {
}
typename MaskT::Pixel getBits()
const {
return _bits; }
void reset() {
_bits = 0; }
private:
typename MaskT::Pixel
_bits;
};
}
FindSetBits<afwImage::Mask<afwImage::MaskPixel> > count(mask);
for (afwDetect::FootprintSet::FootprintList::const_iterator fiter = feet.begin();
fiter != feet.end(); ++fiter) {
count.apply(**fiter);
printf("0x%x\n", count.getBits());
}
}
(*mimage.getImage())(5, 6) = 100;
(*mimage.getImage())(5, 7) = 110;
*mimage.getMask() = 0x1;
(*mimage.getMask())(5, 6) |= 0x2;
(*mimage.getMask())(5, 7) |= 0x4;
printBits(*mimage.getMask(), *ds.getFootprints());
}