2#if !defined(LSST_AFW_MATH_APPROXIMATE_H)
3#define LSST_AFW_MATH_APPROXIMATE_H
32template <
typename PixelT>
34template <
typename PixelT,
typename U,
typename V>
76 void setOrderY(
int const orderY) { _orderY = orderY; }
80 void setWeighting(
bool const weighting) { _weighting = weighting; }
98template <
typename PixelT>
103 ApproximateControl
const& ctrl);
108template <
typename PixelT>
A class to manipulate images, masks, and variance as a single object.
Control how to make an approximation.
void setWeighting(bool const weighting)
Set whether inverse variance weighting will be used in calculation.
int getOrderX() const
Return the order of approximation to use in the x-direction.
void setStyle(Style const style)
Set the Style.
bool getWeighting() const
Return whether inverse variance weighting will be used in calculation.
void setOrderX(int const orderX)
Set the order of approximation to use in the x-direction.
void setOrderY(int const orderY)
Set the order of approximation to use in the y-direction.
Style getStyle() const
Return the Style.
Style
Choose the type of approximation to use.
@ CHEBYSHEV
Use a 2-D Chebyshev polynomial.
int getOrderY() const
Return the order of approximation to use in the y-direction.
Approximate values for a MaskedImage.
ApproximateControl const _ctrl
desired approximation algorithm
std::shared_ptr< image::Image< OutPixelT > > getImage(int orderX=-1, int orderY=-1) const
Return the approximate image as a Image.
float OutPixelT
The pixel type of returned images.
virtual std::shared_ptr< image::Image< OutPixelT > > doGetImage(int orderX, int orderY) const =0
virtual ~Approximate()=default
dtor
Approximate & operator=(Approximate const &)=delete
Approximate(Approximate &&)=delete
lsst::geom::Box2I const _bbox
Domain for approximation.
Approximate(Approximate const &)=delete
std::vector< double > const _xVec
the x-values of points
virtual std::shared_ptr< image::MaskedImage< OutPixelT > > doGetMaskedImage(int orderX, int orderY) const =0
Approximate & operator=(Approximate &&)=delete
Approximate(std::vector< double > const &x, std::vector< double > const &y, lsst::geom::Box2I const &bbox, ApproximateControl const &ctrl)
Base class ctor.
std::vector< double > const _yVec
the y-values of points
std::shared_ptr< image::MaskedImage< OutPixelT > > getMaskedImage(int orderX=-1, int orderY=-1) const
Return the approximate image as a MaskedImage.
std::shared_ptr< Approximate< PixelT > > makeApproximate(std::vector< double > const &x, std::vector< double > const &y, image::MaskedImage< PixelT > const &im, lsst::geom::Box2I const &bbox, ApproximateControl const &ctrl)
Construct a new Approximate object, inferring the type from the type of the given MaskedImage.