31 #include "boost/shared_ptr.hpp"
37 namespace afwMath = lsst::afw::math;
38 namespace ex = lsst::pex::exceptions;
45 template<
typename PixelT>
55 throw LSST_EXCEPT(ex::OutOfRangeError,
"Input image must be a slice (width or height == 1)");
58 "1x1 image ambiguous (could be row or column). "
59 "Perhaps a constant would be better than a slice? ");
88 template<
typename PixelT>
105 template<
typename PixelT>
120 template<
typename PixelT>
125 afwImage::details::operate<afwImage::details::Plus<PixelT> >(img, slc, slc.
getImageSliceType());
140 template<
typename PixelT>
156 template<
typename PixelT>
174 template<
typename PixelT>
190 template<
typename PixelT>
203 template<
typename PixelT>
223 template<
typename PixelT>
239 template<
typename PixelT>
255 #define INSTANTIATE_SLICE_OP_SYM(TYPE, OP) \
256 template afwImage::Image<TYPE>::Ptr afwImage::operator OP(afwImage::Image<TYPE> const &img, \
257 afwImage::ImageSlice<TYPE> const &slc); \
258 template afwImage::Image<TYPE>::Ptr afwImage::operator OP(afwImage::ImageSlice<TYPE> const &slc, \
259 afwImage::Image<TYPE> const &img)
262 #define INSTANTIATE_SLICE_OP_ASYM(TYPE, OP) \
263 template afwImage::Image<TYPE>::Ptr afwImage::operator OP(afwImage::Image<TYPE> const &img, \
264 afwImage::ImageSlice<TYPE> const &slc)
267 #define INSTANTIATE_SLICE_OPEQ(TYPE, OP) \
268 template void afwImage::operator OP(afwImage::Image<TYPE> &img, \
269 afwImage::ImageSlice<TYPE> const &slc)
273 #define INSTANTIATE_SLICES(TYPE) \
274 template afwImage::ImageSlice<TYPE>::ImageSlice(afwImage::Image<TYPE> const &image); \
275 INSTANTIATE_SLICE_OP_SYM(TYPE, +); \
276 INSTANTIATE_SLICE_OP_ASYM(TYPE, -); \
277 INSTANTIATE_SLICE_OP_SYM(TYPE, *); \
278 INSTANTIATE_SLICE_OP_ASYM(TYPE, /); \
279 INSTANTIATE_SLICE_OPEQ(TYPE, +=); \
280 INSTANTIATE_SLICE_OPEQ(TYPE, -=); \
281 INSTANTIATE_SLICE_OPEQ(TYPE, *=); \
282 INSTANTIATE_SLICE_OPEQ(TYPE, /=)
285 INSTANTIATE_SLICES(
double);
286 INSTANTIATE_SLICES(
float);
const Angle operator/(Angle const a, int d)
ImageSlice(Image< PixelT > const &img)
Constructor for ImageSlice.
Define a single column or row of an Image.
void operator/=(ExtentBase< int, N > &lhs, double rhs)
Include files required for standard LSST Exception handling.
Extent< double, N > & operator+=(Extent< double, N > &lhs, Extent< int, N > const &rhs)
ImageSliceType getImageSliceType() const
Extent< double, N > & operator-=(Extent< double, N > &lhs, Extent< int, N > const &rhs)
ImageSliceType _sliceType
table::Key< table::Array< Kernel::Pixel > > image
const Angle operator+(Angle const a, Angle const d)
const Angle operator*(Angle const a, Angle const d)
void operator*=(ExtentBase< int, N > &lhs, double rhs)
int getHeight() const
Return the number of rows in the image.
#define LSST_EXCEPT(type,...)
int getWidth() const
Return the number of columns in the image.
A class to represent a 2-dimensional array of pixels.
const Angle operator-(Angle const a, Angle const d)
A class to specify a slice of an image.