38 namespace algorithms {
40 template <
typename ImageT>
46 typename Super::ImageList::const_iterator
iter = eImageList.begin(), end = eImageList.end();
47 for (
size_t i = 0; iter != end; ++i, ++
iter) {
58 double const extreme = (fabs(min) > max) ? min :max;
72 if (i > 0 && _border > 0) {
73 int const height = eImage->getHeight();
74 int const width = eImage->getWidth();
76 if (2*_border >= std::min(height, width)) {
87 int const nEdge = width*height - (width - 2*_border)*(height - 2*_border);
88 std::vector<double> edgePixels(nEdge);
90 std::vector<double>::iterator bi = edgePixels.begin();
94 for (; y != _border; ++
y) {
95 for (imIter ptr = eImageIm->row_begin(y),
96 end = eImageIm->row_end(y); ptr != end; ++ptr, ++bi) {
100 for (; y != height - _border; ++
y) {
101 for (imIter ptr = eImageIm->row_begin(y),
102 end = eImageIm->x_at(_border, y); ptr != end; ++ptr, ++bi) {
105 for (imIter ptr = eImageIm->x_at(width - _border, y),
106 end = eImageIm->row_end(y); ptr != end; ++ptr, ++bi) {
111 for (imIter ptr = eImageIm->row_begin(y),
112 end = eImageIm->row_end(y); ptr != end; ++ptr, ++bi) {
116 assert(std::distance(edgePixels.begin(), bi) == nEdge);
120 *eImage -= background;
125 #define INSTANTIATE_IMAGE(IMAGE) \
126 template class PsfImagePca<IMAGE >;
128 #define INSTANTIATE(TYPE) \
129 INSTANTIATE_IMAGE(afw::image::Image<TYPE>); \
130 INSTANTIATE_IMAGE(afw::image::MaskedImage<TYPE>);
Class for doing PCA on PSF stars.
This include file includes the header files for all of lsst::afw.
double getValue(Property const prop=NOTHING) const
Return the value of the desired property (if specified in the constructor)
void ImageT ImageT int float saturatedPixelValue int const width
std::vector< typename ImageT::Ptr > ImageList
void ImageT ImageT int float saturatedPixelValue int const height
#define INSTANTIATE(TYPE)
Statistics makeStatistics(afwImage::Mask< afwImage::MaskPixel > const &msk, int const flags, StatisticsControl const &sctrl)
Specialization to handle Masks.