2 #if !defined(LSST_AFW_MATH_APPROXIMATE_H)
3 #define LSST_AFW_MATH_APPROXIMATE_H
34 template<
typename PixelT>
class Image;
35 template<
typename PixelT,
typename U,
typename V>
class MaskedImage;
83 template<
typename PixelT>
86 image::MaskedImage<
PixelT> const& im, geom::Box2I const& bbox,
99 makeApproximate<>(std::vector<
double> const &x, std::vector<
double> const &y,
100 image::MaskedImage<
PixelT> const& im, geom::Box2I const& bbox,
103 virtual ~Approximate() {}
106 return doGetImage(orderX, orderY);
110 return doGetMaskedImage(orderX, orderY);
117 std::vector<double>
const &y,
120 ) : _xVec(x), _yVec(y),
_bbox(bbox), _ctrl(ctrl) {}
127 Approximate(Approximate
const&);
128 Approximate& operator=(Approximate
const&);
130 virtual
PTR(
image::MaskedImage<OutPixelT>) doGetMaskedImage(
int orderX,
int orderY) const = 0;
135 #endif // LSST_AFW_MATH_APPROXIMATE_H
void setWeighting(bool const weighting)
Set whether inverse variance weighting will be used in calculation.
Style getStyle() const
Return the Style.
std::vector< double > const _yVec
the y-values of points
void setOrderX(int const orderX)
Set the order of approximation to use in the x-direction.
Approximate values for a MaskedImage.
int getOrderY() const
Return the order of approximation to use in the y-direction.
An integer coordinate rectangle.
table::Key< table::Array< Kernel::Pixel > > image
Approximate(std::vector< double > const &x, std::vector< double > const &y, geom::Box2I const &bbox, ApproximateControl const &ctrl)
Base class ctor.
ApproximateControl(Style style, int orderX, int orderY=-1, bool weighting=true)
ctor
Use a 2-D Chebyshev polynomial.
Control how to make an approximation.
geom::Box2I const & _bbox
void setOrderY(int const orderY)
Set the order of approximation to use in the y-direction.
A class to manipulate images, masks, and variance as a single object.
Style
Choose the type of approximation to use.
float OutPixelT
The pixel type of returned images.
boost::shared_ptr< Approximate< PixelT > > makeApproximate(std::vector< double > const &x, std::vector< double > const &y, image::MaskedImage< PixelT > const &im, geom::Box2I const &bbox, ApproximateControl const &ctrl)
Construct a new Approximate object, inferring the type from the type of the given MaskedImage...
std::vector< double > const _xVec
the x-values of points
geom::Box2I const _bbox
Domain for approximation.
void setStyle(Style const style)
Set the Style.
int getOrderX() const
Return the order of approximation to use in the x-direction.
bool getWeighting() const
Return whether inverse variance weighting will be used in calculation.
ApproximateControl const _ctrl
desired approximation algorithm
A class to represent a 2-dimensional array of pixels.