25 #ifndef LSST_AFW_MATH_BoundedField_h_INCLUDED 26 #define LSST_AFW_MATH_BoundedField_h_INCLUDED 87 virtual ndarray::Array<double, 1, 1>
evaluate(ndarray::Array<double const, 1>
const& x,
88 ndarray::Array<double const, 1>
const& y)
const;
102 virtual double mean()
const;
128 template <
typename T>
130 int xStep = 1,
int yStep = 1)
const;
147 template <
typename T>
149 int xStep = 1,
int yStep = 1)
const;
165 template <
typename T>
167 int xStep = 1,
int yStep = 1)
const;
183 template <
typename T>
185 int xStep = 1,
int yStep = 1)
const;
207 {
return os << bf.toString() <<
" on " << bf.
getBBox(); }
224 #endif // !LSST_AFW_MATH_BoundedField_h_INCLUDED
virtual double integrate() const
Compute the integral of this function over its bounding-box.
virtual double evaluate(geom::Point2D const &position) const =0
Evaluate the field at the given point.
virtual std::shared_ptr< BoundedField > operator*(double const scale) const =0
Return a scaled BoundedField.
def scale(algorithm, min, max=None, frame=None)
An integer coordinate rectangle.
A base class for objects that can be persisted via afw::table::io Archive classes.
BoundedField & operator=(BoundedField const &)=delete
geom::Box2I getBBox() const
Return the bounding box that defines the region where the field is valid.
void addToImage(image::Image< T > &image, double scaleBy=1.0, bool overlapOnly=false, int xStep=1, int yStep=1) const
Add the field or a constant multiple of it to an image in-place.
BoundedField(BoundedField const &)=default
virtual double mean() const
Compute the mean of this function over its bounding-box.
A base class for image defects.
virtual ~BoundedField()=default
BoundedField(geom::Box2I const &bbox)
void multiplyImage(image::Image< T > &image, bool overlapOnly=false, int xStep=1, int yStep=1) const
Multiply an image by the field in-place.
virtual bool operator==(BoundedField const &rhs) const =0
BoundedFields (of the same sublcass) are equal if their bounding boxes and parameters are equal...
double evaluate(double x, double y) const
Evaluate the field at the given point.
void divideImage(image::Image< T > &image, bool overlapOnly=false, int xStep=1, int yStep=1) const
Divide an image by the field in-place.
friend std::ostream & operator<<(std::ostream &os, BoundedField const &bf)
An abstract base class for 2-d functions defined on an integer bounding boxes.
void fillImage(image::Image< T > &image, bool overlapOnly=false, int xStep=1, int yStep=1) const
Assign the field to an image, overwriting values already present.
A CRTP facade class for subclasses of Persistable.
A class to represent a 2-dimensional array of pixels.
std::shared_ptr< BoundedField > operator/(double scale) const
bool operator!=(BoundedField const &rhs) const
BoundedFields (of the same sublcass) are equal if their bounding boxes and parameters are equal...