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);
Define a single column or row of an Image.
void operator/=(ExtentBase< int, N > &lhs, double rhs)
ImageSlice(Image< PixelT > const &img)
Constructor for ImageSlice.
Extent< double, N > & operator+=(Extent< double, N > &lhs, Extent< int, N > const &rhs)
Extent< double, N > & operator-=(Extent< double, N > &lhs, Extent< int, N > const &rhs)
std::complex< double > operator-(const std::complex< double > &z1, const Position &p2)
table::Key< table::Array< Kernel::Pixel > > image
const Angle operator+(Angle const a, Angle const d)
int getWidth() const
Return the number of columns in the image.
const Angle operator*(Angle const a, Angle const d)
void operator*=(ExtentBase< int, N > &lhs, double rhs)
std::complex< double > operator/(const Position &p1, double x)
#define LSST_EXCEPT(type,...)
ImageSliceType _sliceType
ImageSliceType getImageSliceType() const
int getHeight() const
Return the number of rows in the image.
A class to specify a slice of an image.
Include files required for standard LSST Exception handling.