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
geom::Box2I const _bbox
Domain for approximation.
std::vector< double > const _yVec
the y-values of points
Approximate(std::vector< double > const &x, std::vector< double > const &y, geom::Box2I const &bbox, ApproximateControl const &ctrl)
Base class ctor.
Use a 2-D Chebyshev polynomial.
void setOrderX(int const orderX)
Set the order of approximation to use in the x-direction.
float OutPixelT
The pixel type of returned images.
int getOrderY() const
Return the order of approximation to use in the y-direction.
std::vector< double > const _xVec
the x-values of points
void setWeighting(bool const weighting)
Set whether inverse variance weighting will be used in calculation.
Approximate values for a MaskedImage.
An integer coordinate rectangle.
table::Key< table::Array< Kernel::Pixel > > image
Control how to make an approximation.
Style getStyle() const
Return the Style.
geom::Box2I const & _bbox
void setStyle(Style const style)
Set the Style.
A class to manipulate images, masks, and variance as a single object.
Style
Choose the type of approximation to use.
ApproximateControl const _ctrl
desired approximation algorithm
ApproximateControl(Style style, int orderX, int orderY=-1, bool weighting=true)
ctor
void setOrderY(int const orderY)
Set the order of approximation to use in the y-direction.
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...
A class to represent a 2-dimensional array of pixels.
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.