LSSTApplications
20.0.0
LSSTDataManagementBasePackage
|
Go to the documentation of this file.
28 #ifndef LSST_AFW_IMAGE_IMAGE_ALGORITHM_H
29 #define LSST_AFW_IMAGE_IMAGE_ALGORITHM_H
37 #include "boost/mpl/bool.hpp"
51 template <
typename ValT>
60 template <
typename ValT>
69 template <
typename ValT>
78 template <
typename LhsT,
typename RhsT>
87 template <
typename LhsT,
typename RhsT>
90 virtual LhsT
operator()(
int x,
int y, LhsT lhs, RhsT rhs)
const = 0;
96 template <
typename LhsT>
102 lhsPtr != lhsEnd; ++lhsPtr) {
111 template <
typename LhsT>
117 lhsPtr != lhsEnd; ++lhsPtr) {
118 *lhsPtr = func(*lhsPtr);
128 template <
typename LhsT>
135 lhsPtr != lhsEnd; ++lhsPtr, ++
x) {
136 *lhsPtr = func(
x,
y + lhs.
getY0(), *lhsPtr);
144 template <
typename LhsT,
typename RhsT>
160 lhsPtr != lhsEnd; ++rhsPtr, ++lhsPtr) {
161 *lhsPtr = func(*rhsPtr);
169 template <
typename LhsT,
typename RhsT>
185 lhsPtr != lhsEnd; ++rhsPtr, ++lhsPtr) {
186 *lhsPtr = func(*lhsPtr, *rhsPtr);
195 template <
typename LhsT,
typename RhsT>
211 lhsPtr != lhsEnd; ++rhsPtr, ++lhsPtr, ++
x) {
212 *lhsPtr = func(
x,
y + lhs.
getY0(), *lhsPtr, *rhsPtr);
Backwards-compatibility support for depersisting the old Calib (FluxMag0/FluxMag0Err) objects.
def format(config, name=None, writeSourceLine=True, prefix="", verbose=False)
x_iterator row_begin(int y) const
Return an x_iterator to the start of the y'th row.
A functor class equivalent to std::function<LhsT (int, int, LhsT, RhsT)>, but with a virtual operator...
virtual ValT operator()(int x, int y, ValT lhs) const =0
int getHeight() const
Return the number of rows in the image.
A functor class equivalent to std::function<ValT ()>, but with a virtual operator()
x_iterator row_end(int y) const
Return an x_iterator to the end of the y'th row.
Reports attempts to exceed implementation-defined length limits for some classes.
A functor class equivalent to std::function<ValT (ValT)>, but with a virtual operator()
_view_t::x_iterator x_iterator
An iterator for traversing the pixels in a row.
A base class for image defects.
#define LSST_EXCEPT(type,...)
Create an exception with a given type.
void for_each_pixel(Image< LhsT > &lhs, pixelOp0< LhsT > const &func)
Set each pixel in an Image<LhsT> to func()
virtual ValT operator()(ValT lhs) const =0
virtual LhsT operator()(LhsT lhs, RhsT rhs) const =0
int getX0() const
Return the image's column-origin.
lsst::geom::Extent2I getDimensions() const
Return the image's size; useful for passing to constructors.
A functor class equivalent to std::function<LhsT (LhsT, RhsT)>, but with a virtual operator()
A functor class equivalent to std::function<ValT (int, int, ValT)>, but with a virtual operator()
virtual LhsT operator()(int x, int y, LhsT lhs, RhsT rhs) const =0
int getY0() const
Return the image's row-origin.
virtual ValT operator()() const =0
A class to represent a 2-dimensional array of pixels.
_const_view_t::x_iterator const_x_iterator
A const iterator for traversing the pixels in a row.
int getWidth() const
Return the number of columns in the image.