lsst.afw
19.0.0-23-g9b026a6e0
|
Go to the documentation of this file.
38 namespace ex = pex::exceptions;
43 template <
typename ImageT>
45 : _imgBBox(img.getBBox()),
62 str(boost::format(
"Image %dx%d has more pixels than fit in an int (%d)") %
70 : _imgBBox(imageBBox),
87 str(boost::format(
"Image %dx%d has more pixels than fit in an int (%d)") %
94 void Background::_setCenOrigSize(
int const width,
int const height,
int const nxSample,
int const nySample) {
102 for (
int iX = 0; iX < nxSample; ++iX) {
103 const int endx =
std::min(((iX + 1) * width + nxSample / 2) / nxSample, width);
109 for (
int iY = 0; iY < nySample; ++iY) {
110 const int endy =
std::min(((iY + 1) * height + nySample / 2) / nySample, height);
119 if (undersampleStrings.
size() == 0) {
125 if (undersampleStrings.
find(style) == undersampleStrings.
end()) {
128 return undersampleStrings[style];
135 #define INSTANTIATE_BACKGROUND(TYPE) \
136 template Background::Background(image::Image<TYPE> const& img, BackgroundControl const& bgCtrl); \
137 template Background::Background(image::MaskedImage<TYPE> const& img, BackgroundControl const& bgCtrl); \
138 template std::shared_ptr<image::Image<TYPE>> Background::getImage<TYPE>(Interpolate::Style const, \
139 UndersampleStyle const) const;
141 INSTANTIATE_BACKGROUND(
float)
std::vector< int > _ysize
y size ...
int getHeight() const noexcept
Background(ImageT const &img, BackgroundControl const &bgCtrl)
Constructor for Background.
bool isEmpty() const noexcept
std::vector< int > _yorig
y origin ...
int getWidth() const noexcept
std::vector< double > _xcen
x center pix coords of sub images
Pass parameters to a Background object.
std::vector< int > _xsize
x size of sub images
A base class for image defects.
#define LSST_EXCEPT(type,...)
std::vector< int > _xorig
x origin pix coords of sub images
lsst::geom::Box2I _imgBBox
size and origin of input image
UndersampleStyle stringToUndersampleStyle(std::string const &style)
Conversion function to switch a string to an UndersampleStyle.
std::vector< double > _ycen
y center ...