40 template <
typename PixelT>
47 "1x1 image ambiguous (could be row or column). " 48 "Perhaps a constant would be better than a slice? ");
68 template <
typename PixelT>
75 template <
typename PixelT>
80 template <
typename PixelT>
88 template <
typename PixelT>
95 template <
typename PixelT>
103 template <
typename PixelT>
110 template <
typename PixelT>
115 template <
typename PixelT>
122 template <
typename PixelT>
129 template <
typename PixelT>
139 #define INSTANTIATE_SLICE_OP_SYM(TYPE, OP) \ 140 template std::shared_ptr<Image<TYPE>> operator OP(Image<TYPE> const &img, ImageSlice<TYPE> const &slc); \ 141 template std::shared_ptr<Image<TYPE>> operator OP(ImageSlice<TYPE> const &slc, Image<TYPE> const &img) 143 #define INSTANTIATE_SLICE_OP_ASYM(TYPE, OP) \ 144 template std::shared_ptr<Image<TYPE>> operator OP(Image<TYPE> const &img, ImageSlice<TYPE> const &slc) 146 #define INSTANTIATE_SLICE_OPEQ(TYPE, OP) \ 147 template void operator OP(Image<TYPE> &img, ImageSlice<TYPE> const &slc) 149 #define INSTANTIATE_SLICES(TYPE) \ 150 template ImageSlice<TYPE>::ImageSlice(Image<TYPE> const &image); \ 151 INSTANTIATE_SLICE_OP_SYM(TYPE, +); \ 152 INSTANTIATE_SLICE_OP_ASYM(TYPE, -); \ 153 INSTANTIATE_SLICE_OP_SYM(TYPE, *); \ 154 INSTANTIATE_SLICE_OP_ASYM(TYPE, /); \ 155 INSTANTIATE_SLICE_OPEQ(TYPE, +=); \ 156 INSTANTIATE_SLICE_OPEQ(TYPE, -=); \ 157 INSTANTIATE_SLICE_OPEQ(TYPE, *=); \ 158 INSTANTIATE_SLICE_OPEQ(TYPE, /=) 160 INSTANTIATE_SLICES(
double);
161 INSTANTIATE_SLICES(
float);
std::shared_ptr< Image< PixelT > > operator/(Image< PixelT > const &img, ImageSlice< PixelT > const &slc)
Overload operator/()
Image & operator*=(PixelT const rhs)
Multiply lhs by scalar rhs.
ImageSliceType getImageSliceType() const
ImageSlice(Image< PixelT > const &img)
Constructor for ImageSlice.
int getHeight() const
Return the number of rows in the image.
std::shared_ptr< Image< PixelT > > operator*(Image< PixelT > const &img, ImageSlice< PixelT > const &slc)
Overload operator*()
Image & operator/=(PixelT const rhs)
Divide lhs by scalar rhs.
std::shared_ptr< Image< PixelT > > operator+(Image< PixelT > const &img, ImageSlice< PixelT > const &slc)
Overload operator+()
Image & operator-=(PixelT const rhs)
Subtract scalar rhs from lhs.
A base class for image defects.
Image & operator+=(PixelT const rhs)
Add scalar rhs to lhs.
std::shared_ptr< Image< PixelT > > operator-(Image< PixelT > const &img, ImageSlice< PixelT > const &slc)
Overload operator-()
#define LSST_EXCEPT(type,...)
Create an exception with a given type.
Reports attempts to access elements outside a valid range of indices.
int getWidth() const
Return the number of columns in the image.
Reports invalid arguments.
Backwards-compatibility support for depersisting the old Calib (FluxMag0/FluxMag0Err) objects...
A class to represent a 2-dimensional array of pixels.
A class to specify a slice of an image.