#include <string>
#include "testSpatialCell.h"
typedef float PixelT;
readImage();
void SpatialCellSetDemo() {
boost::tie(im, fs) = readImage();
for (afwDetect::FootprintSet::FootprintList::iterator ptr = fs->getFootprints()->begin(),
end = fs->getFootprints()->end();
cellSet.insertCandidate(tc);
}
ExampleCandidateVisitor visitor;
cellSet.visitCandidates(&visitor);
std::cout <<
boost::format(
"There are %d candidates\n") % visitor.getN();
for (unsigned int i = 0; i != cellSet.getCellList().size(); ++i) {
candidate != candidateEnd; ++candidate) {
lsst::geom::Box2I box =
dynamic_cast<ExampleCandidate *
>((*candidate).get())->getBBox();
#if 0
std::cout << boost::format(
"%d %5.2f %5.2f %d\n")
% i % (*candidate)->getXCenter() % (*candidate)->getYCenter() % (w*h);
#endif
}
}
}
for (unsigned int i = 0; i != cellSet.getCellList().size(); ++i) {
cell->visitCandidates(&visitor);
cell->setIgnoreBad(false);
std::cout << boost::format(
"%s nobj=%d N_good=%d NPix_good=%d\n") % cell->getLabel() % cell->size() %
visitor.getN() % visitor.getNPix();
}
cellSet.setIgnoreBad(true);
cellSet.visitCandidates(&visitor);
std::cout << boost::format(
"There are %d good candidates\n") % visitor.getN();
}
readImage() {
try {
std::string filename = dataDir +
"/CFHT/D4/cal-53535-i-797722_1.fits";
}
bctrl.setNxSample(mi->getWidth() / 256 + 1);
bctrl.setNySample(mi->getHeight() / 256 + 1);
bctrl.getStatisticsControl()->setNumSigmaClip(3.0);
bctrl.getStatisticsControl()->setNumIter(2);
try {
}
int npixMin = 5;
new afwDetect::FootprintSet(*mi,
threshold,
"DETECTED", npixMin));
int const grow = 1;
bool const isotropic = false;
grownFs->setMask(mi->getMask(), "DETECTED");
}
int main() {
readImage();
assert(data.first != NULL);
SpatialCellSetDemo();
}