25 #if !defined(LSST_AFW_IMAGE_SLICE_H)
26 #define LSST_AFW_IMAGE_SLICE_H
45 template <
typename PixelT>
72 template <
typename PixelT>
74 PixelT
operator()(PixelT
const imgPix, PixelT
const slcPix) {
return imgPix + slcPix; }
76 template <
typename PixelT>
78 PixelT
operator()(PixelT
const imgPix, PixelT
const slcPix) {
return imgPix - slcPix; }
80 template <
typename PixelT>
82 PixelT
operator()(PixelT
const imgPix, PixelT
const slcPix) {
return imgPix * slcPix; }
84 template <
typename PixelT>
86 PixelT
operator()(PixelT
const imgPix, PixelT
const slcPix) {
return imgPix / slcPix; }
93 template <
typename OperatorT,
typename PixelT>
102 pImg !=
end; ++pImg, ++pSlc) {
103 *pImg = op(*pImg, *pSlc);
110 pImg !=
end; ++pImg) {
111 *pImg = op(*pImg, *pSlc);
128 template <
typename PixelT>
139 template <
typename PixelT>
150 template <
typename PixelT>
151 void operator+=(Image<PixelT> &img, ImageSlice<PixelT>
const &slc);
163 template <
typename PixelT>
174 template <
typename PixelT>
175 void operator-=(Image<PixelT> &img, ImageSlice<PixelT>
const &slc);
187 template <
typename PixelT>
198 template <
typename PixelT>
209 template <
typename PixelT>
210 void operator*=(Image<PixelT> &img, ImageSlice<PixelT>
const &slc);
222 template <
typename PixelT>
233 template <
typename PixelT>
234 void operator/=(Image<PixelT> &img, ImageSlice<PixelT>
const &slc);
y_iterator col_begin(int x) const
Return an y_iterator to the start of the y'th row.
int getHeight() const
Return the number of rows in the image.
x_iterator row_begin(int y) const
Return an x_iterator to the start of the y'th row.
x_iterator row_end(int y) const
Return an x_iterator to the end of the y'th row.
_view_t::y_iterator y_iterator
An iterator for traversing the pixels in a column.
_view_t::x_iterator x_iterator
An iterator for traversing the pixels in a row.
A class to represent a 2-dimensional array of pixels.
A class to specify a slice of an image.
ImageSliceType getImageSliceType() const
ImageSlice(Image< PixelT > const &img)
Constructor for ImageSlice.
void operate(Image< PixelT > &img, ImageSlice< PixelT > const &slc, typename ImageSlice< PixelT >::ImageSliceType sliceType)
A function to loop over pixels and perform the requested operation.
Backwards-compatibility support for depersisting the old Calib (FluxMag0/FluxMag0Err) objects.
std::shared_ptr< Image< PixelT > > operator+(Image< PixelT > const &img, ImageSlice< PixelT > const &slc)
Overload operator+()
Image< LhsPixelT > & operator+=(Image< LhsPixelT > &lhs, Image< RhsPixelT > const &rhs)
Add lhs to Image rhs (i.e. pixel-by-pixel addition) where types are different.
Image< LhsPixelT > & operator-=(Image< LhsPixelT > &lhs, Image< RhsPixelT > const &rhs)
Subtract lhs from Image rhs (i.e. pixel-by-pixel subtraction) where types are different.
std::shared_ptr< Image< PixelT > > operator*(Image< PixelT > const &img, ImageSlice< PixelT > const &slc)
Overload operator*()
std::shared_ptr< Image< PixelT > > operator/(Image< PixelT > const &img, ImageSlice< PixelT > const &slc)
Overload operator/()
std::shared_ptr< Image< PixelT > > operator-(Image< PixelT > const &img, ImageSlice< PixelT > const &slc)
Overload operator-()
Image< LhsPixelT > & operator/=(Image< LhsPixelT > &lhs, Image< RhsPixelT > const &rhs)
Divide lhs by Image rhs (i.e. pixel-by-pixel division) where types are different.
Image< LhsPixelT > & operator*=(Image< LhsPixelT > &lhs, Image< RhsPixelT > const &rhs)
Multiply lhs by Image rhs (i.e. pixel-by-pixel multiplication) where types are different.
A base class for image defects.
PixelT operator()(PixelT const imgPix, PixelT const slcPix)
PixelT operator()(PixelT const imgPix, PixelT const slcPix)
PixelT operator()(PixelT const imgPix, PixelT const slcPix)
PixelT operator()(PixelT const imgPix, PixelT const slcPix)