File Pixel.h¶
-
template<typename
ImagePixelT, typenameMaskPixelT, typenameVariancePixelT>
structhash<lsst::afw::image::pixel::Pixel<ImagePixelT, MaskPixelT, VariancePixelT>>¶ Public Types
-
template<>
usingargument_type= lsst::afw::image::pixel::Pixel<ImagePixelT, MaskPixelT, VariancePixelT>¶
-
template<>
usingresult_type= size_t¶
Public Functions
-
size_t
operator()(argument_type const &obj) const
-
template<>
-
template<typename
ImagePixelT, typenameMaskPixelT, typenameVariancePixelT>
structhash<lsst::afw::image::pixel::SinglePixel<ImagePixelT, MaskPixelT, VariancePixelT>>¶ Public Types
-
template<>
usingargument_type= lsst::afw::image::pixel::SinglePixel<ImagePixelT, MaskPixelT, VariancePixelT>¶
-
template<>
usingresult_type= size_t¶
Public Functions
-
size_t
operator()(argument_type const &obj) const
-
template<>
-
namespace
lsst Class for a simple mapping implementing a generic AstrometryTransform.
Remove all non-astronomical counts from the Chunk Exposure’s pixels.
Forward declarations for lsst::utils::Cache
For details on the Cache class, see the Cache.h file.
It uses a template rather than a pointer so that the derived classes can use the specifics of the transform. The class simplePolyMapping overloads a few routines.
A base class for image defects
Numeric constants used by the Integrate.h integrator routines.
Compute Image Statistics
- Note
Gauss-Kronrod-Patterson quadrature coefficients for use in quadpack routine qng. These coefficients were calculated with 101 decimal digit arithmetic by L. W. Fullerton, Bell Labs, Nov 1981.
- Note
The Statistics class itself can only handle lsst::afw::image::MaskedImage() types. The philosophy has been to handle other types by making them look like lsst::afw::image::MaskedImage() and reusing that code. Users should have no need to instantiate a Statistics object directly, but should use the overloaded makeStatistics() factory functions.
-
namespace
afw -
namespace
image -
namespace
pixel¶ Functions
-
template<typename
ImagePixelT, typenameMaskPixelT, typenameVariancePixelT>
SinglePixel<ImagePixelT, MaskPixelT, VariancePixelT>makeSinglePixel(ImagePixelT x, MaskPixelT m, VariancePixelT v)¶ Return a SinglePixel
This function is useful as function overloading will choose the correct return type (cf. std::make_pair()
-
template<typename
ExprT1>
UnaryExpr<ExprT1, std::negate<typename exprTraits<ExprT1>::ImagePixelT>, noop<typename exprTraits<ExprT1>::MaskPixelT>, noop<typename exprTraits<ExprT1>::VariancePixelT>>operator-(ExprT1 e1)¶ Template for -e1.
-
template<typename
ExprT1, typenameExprT2>
BinaryExpr<ExprT1, ExprT2, std::plus<typename exprTraits<ExprT1>::ImagePixelT>, bitwise_or<typename exprTraits<ExprT1>::MaskPixelT>, variance_plus<typename exprTraits<ExprT1>::VariancePixelT>>operator+(ExprT1 e1, ExprT2 e2)¶ Template for (e1 + e2)
-
template<typename
ExprT1, typenameExprT2>
ExprT1operator+=(ExprT1 &e1, ExprT2 e2)¶ template for e1 += e2
-
template<typename
ExprT1, typenameExprT2>
ExprT1plus(ExprT1 &lhs, ExprT2 const &rhs, float covariance)¶ Like operator+(), but assume that covariance’s 2*alpha*sqrt(vx*vy)
- Parameters
lhs: Left hand valuerhs: Right hand valuecovariance: Assume that covariance is 2*alpha*sqrt(vx*vy) (if variances are known)
-
template<typename
ExprT1, typenameExprT2>
BinaryExpr<ExprT1, ExprT2, std::minus<typename exprTraits<ExprT1>::ImagePixelT>, bitwise_or<typename exprTraits<ExprT1>::MaskPixelT>, variance_plus<typename exprTraits<ExprT1>::VariancePixelT>>operator-(ExprT1 e1, ExprT2 e2)¶ Template to evaluate (e1 - e2)
-
template<typename
ExprT1, typenameExprT2>
ExprT1operator-=(ExprT1 &e1, ExprT2 e2)¶ Template to evaluate e1 -= e2.
-
template<typename
ExprT1, typenameExprT2>
BinaryExpr<ExprT1, ExprT2, std::multiplies<typename exprTraits<ExprT1>::ImagePixelT>, bitwise_or<typename exprTraits<ExprT1>::MaskPixelT>, variance_multiplies<typename exprTraits<ExprT1>::VariancePixelT>>operator*(ExprT1 e1, ExprT2 e2)¶ Template to evaluate (e1 * e2)
-
template<typename
ExprT1, typenameExprT2>
ExprT1operator*=(ExprT1 &e1, ExprT2 e2)¶ Template to evaluate e1 *= e2.
-
template<typename
ExprT1, typenameExprT2>
BinaryExpr<ExprT1, ExprT2, std::divides<typename exprTraits<ExprT1>::ImagePixelT>, bitwise_or<typename exprTraits<ExprT1>::MaskPixelT>, variance_divides<typename exprTraits<ExprT1>::VariancePixelT>>operator/(ExprT1 e1, ExprT2 e2)¶ Template to evaluate (e1 / e2)
-
template<typename
ExprT1, typenameExprT2>
ExprT1operator/=(ExprT1 &e1, ExprT2 e2)¶ Template to evaluate e1 /= e2.
-
template<typename
ImagePixelT, typenameMaskPixelT, typenameVariancePixelT>
std::ostream &operator<<(std::ostream &os, SinglePixel<ImagePixelT, MaskPixelT, VariancePixelT> const &v)¶ Print a SinglePixel.
-
template<typename
ImagePixelT, typenameMaskPixelT, typenameVariancePixelT>
std::ostream &operator<<(std::ostream &os, Pixel<ImagePixelT, MaskPixelT, VariancePixelT> const &v)¶ Print a Pixel.
-
template<typename
ExprT1, typenameExprT2, typenameBinOp, typenameMaskBinOp, typenameVarBinOp>
std::ostream &operator<<(std::ostream &os, BinaryExpr<ExprT1, ExprT2, BinOp, MaskBinOp, VarBinOp> const &v)¶ Evaluate and print a BinaryExpr.
-
template<typename
ExprT1, typenameExprT2, typenameImageBinOp, typenameMaskBinOp, typenameVarianceBinOp>
classBinaryExpr - #include <Pixel.h>
Class for representing binary operations.
Public Types
-
typedef exprTraits<ExprT1>::ImagePixelT
ImagePixelT
-
typedef exprTraits<ExprT1>::MaskPixelT
MaskPixelT
-
typedef exprTraits<ExprT1>::VariancePixelT
VariancePixelT
Public Functions
-
BinaryExpr(ExprT1 e1, ExprT2 e2, ImageBinOp imageOp = ImageBinOp(), MaskBinOp maskOp = MaskBinOp(), VarianceBinOp varOp = VarianceBinOp()) A binary operation, with three functors to represent the image/mask/variance operations.
-
BinaryExpr(ExprT1 e1, ExprT2 e2, double const alpha, ImageBinOp imageOp = ImageBinOp(), MaskBinOp maskOp = MaskBinOp(), VarianceBinOp = VarianceBinOp()) A binary operation, with three functors to represent the image/mask/variance operations and an extra double argument
-
ImagePixelT
image() const evaluate the image part of the expression
-
MaskPixelT
mask() const evaluate the mask part of the expression
-
VariancePixelT
variance() const evaluate the variance part of the expression
-
typedef exprTraits<ExprT1>::ImagePixelT
-
template<typename
ExprT1, typenameImageBinOp, typenameMaskBinOp, typenameVarianceBinOp>
classBinaryExpr<ExprT1, double, ImageBinOp, MaskBinOp, VarianceBinOp> - #include <Pixel.h>
Partial specialization of BinaryExpr when ExprT2 is a double (i.e no mask/variance part)
Public Types
-
typedef exprTraits<ExprT1>::ImagePixelT
ImagePixelT
-
typedef exprTraits<ExprT1>::MaskPixelT
MaskPixelT
-
typedef exprTraits<ExprT1>::VariancePixelT
VariancePixelT
Public Functions
-
BinaryExpr(ExprT1 e1, double e2, ImageBinOp imageOp = ImageBinOp(), MaskBinOp maskOp = MaskBinOp(), VarianceBinOp varOp = VarianceBinOp()) A binary operation, with three functors to represent the image/mask/variance operations.
-
BinaryExpr(ExprT1 e1, double e2, double const alpha, ImageBinOp imageOp = ImageBinOp(), MaskBinOp maskOp = MaskBinOp(), VarianceBinOp = VarianceBinOp()) A binary operation, with three functors to represent the image/mask/variance operations and an extra double argument
-
ImagePixelT
image() const evaluate the image part of the expression
-
MaskPixelT
mask() const evaluate the mask part of the expression
-
VariancePixelT
variance() const evaluate the variance part of the expression
Private Members
-
exprTraits<ExprT1>::expr_type
_expr1
-
double
_expr2
-
ImageBinOp
_imageOp
-
MaskBinOp
_maskOp
-
VarianceBinOp
_varOp
-
typedef exprTraits<ExprT1>::ImagePixelT
-
template<typename
T1>
structbitwise_or: public std::binary_function<T1, T1, T1>¶ - #include <Pixel.h>
bitwise_or doesn’t seem to be in std::
- Note
We provide a single-operand version for when the right-hand-side of an expression is a scalar, not a masked pixel,
-
template<typename
ExprT>
structexprTraits¶ - #include <Pixel.h>
A traits class to return the types of the image/mask/variance.
-
template<>
structexprTraits<double>¶ - #include <Pixel.h>
A specialisation of exprTraits for
doublePublic Types
-
typedef double
ImagePixelT
-
typedef int
MaskPixelT
-
typedef double
VariancePixelT
-
typedef SinglePixel<ImagePixelT, MaskPixelT, VariancePixelT>
expr_type
-
typedef double
-
template<>
structexprTraits<float>¶ - #include <Pixel.h>
A specialisation of exprTraits for
floatPublic Types
-
typedef float
ImagePixelT
-
typedef exprTraits<double>::MaskPixelT
MaskPixelT
-
typedef exprTraits<double>::VariancePixelT
VariancePixelT
-
typedef SinglePixel<ImagePixelT, MaskPixelT, VariancePixelT>
expr_type
-
typedef float
-
template<>
structexprTraits<int>¶ - #include <Pixel.h>
A specialisation of exprTraits for
intPublic Types
-
typedef int
ImagePixelT
-
typedef exprTraits<double>::MaskPixelT
MaskPixelT
-
typedef exprTraits<double>::VariancePixelT
VariancePixelT
-
typedef SinglePixel<ImagePixelT, MaskPixelT, VariancePixelT>
expr_type
-
typedef int
-
template<>
structexprTraits<unsigned short>¶ - #include <Pixel.h>
A specialisation of exprTraits for
unsigned shortPublic Types
-
typedef int
ImagePixelT
-
typedef exprTraits<double>::MaskPixelT
MaskPixelT
-
typedef exprTraits<double>::VariancePixelT
VariancePixelT
-
typedef SinglePixel<ImagePixelT, MaskPixelT, VariancePixelT>
expr_type
-
typedef int
-
template<typename
T1>
structnoop: public std::unary_function<T1, T1>¶ - #include <Pixel.h>
A noop functor (useful for e.g. masks and variances when changing the sign of the image)
Public Functions
-
T1
operator()(const T1 &x) const¶
-
T1
-
template<typename
_ImagePixelT, typename_MaskPixelT, typename_VariancePixelT= double>
classPixel: public lsst::afw::image::detail::MaskedImagePixel_tag - #include <Pixel.h>
A pixel of a MaskedImage.
Public Types
-
typedef _ImagePixelT
ImagePixelT
-
typedef _MaskPixelT
MaskPixelT
-
typedef _VariancePixelT
VariancePixelT
Public Functions
-
Pixel(ImagePixelT const &image, MaskPixelT const &mask = 0x0, VariancePixelT const &variance = 0) Construct a Pixel from references to its image/mask/variance components.
-
Pixel(SinglePixel<ImagePixelT, MaskPixelT, VariancePixelT> &rhs)
-
Pixel(Pixel const &rhs)
-
Pixel(Pixel &&rhs)
-
~Pixel()
-
Pixel
operator=(Pixel const &rhs)
-
template<typename
rhsExpr>
Pixeloperator=(rhsExpr const &rhs) Assign a Pixel by evaluating an expression
We use C++ template expressions to build a compile-time parse tree to evaluate Pixel expressions; this is where we evaluate the rhs and set the Pixel’s values
-
Pixel
operator=(Pixel &&rhs)
-
Pixel
operator=(double const &rhs_image) set the image part of a Pixel to rhs_image (the mask and variance are set to 0)
-
Pixel
operator=(int const &rhs_image) set the image part of a Pixel to rhs_image (the mask and variance are set to 0)
-
ImagePixelT
image() const Return the image part of a Pixel.
-
MaskPixelT
mask() const Return the mask part of a Pixel.
-
VariancePixelT
variance() const Return the variance part of a Pixel.
-
std::size_t
hash_value() const Return a hash of this object.
Friends
-
template<typename
T1>
booloperator==(Pixel const &lhs, T1 const &rhs) Return true iff two pixels are equal (in all three of image, mask, and variance)
-
template<typename
T1>
booloperator!=(Pixel const &lhs, T1 const &rhs) Return true iff two pixels are unequal (in at least one of image, mask, and variance)
-
template<typename
ExprT>
Pixeloperator+=(Pixel const &e1, ExprT const &e2) Evaluate e1 += e2, and return e1.
-
template<typename
ExprT>
Pixeloperator-=(Pixel const &e1, ExprT const &e2) Evaluate e1 -= e2, and return e1.
-
template<typename
ExprT>
Pixeloperator*=(Pixel const &e1, ExprT const &e2) Evaluate e1 *= e2, and return e1.
-
template<typename
ExprT>
Pixeloperator/=(Pixel const &e1, ExprT const &e2) Evaluate e1 /= e2, and return e1.
-
typedef _ImagePixelT
-
template<typename
_ImagePixelT, typename_MaskPixelT, typename_VariancePixelT>
structPixelTypeTraits<SinglePixel<_ImagePixelT, _MaskPixelT, _VariancePixelT>>¶ - #include <Pixel.h>
Specialization for a pixel of a MaskedImage.
Public Types
-
typedef SinglePixel<_ImagePixelT, _MaskPixelT, _VariancePixelT>
PixelT¶
Public Static Functions
-
static const PixelT
padValue() The quantity to use when a pixel value is undefined.
-
typedef SinglePixel<_ImagePixelT, _MaskPixelT, _VariancePixelT>
-
template<typename
_ImagePixelT, typename_MaskPixelT, typename_VariancePixelT= double>
classSinglePixel: public lsst::afw::image::detail::MaskedImagePixel_tag - #include <Pixel.h>
A single pixel of the same type as a MaskedImage.
Public Types
-
typedef _ImagePixelT
ImagePixelT
-
typedef _MaskPixelT
MaskPixelT
-
typedef _VariancePixelT
VariancePixelT
Public Functions
-
SinglePixel(ImagePixelT image, MaskPixelT mask = 0, VariancePixelT variance = 0)
-
template<typename
rhsExpr>SinglePixel(rhsExpr const &rhs, typename std::enable_if<!std::is_fundamental<rhsExpr>::value, void *>::type dummy = nullptr)
-
ImagePixelT
image() const
-
MaskPixelT
mask() const
-
VariancePixelT
variance() const
Private Functions
-
SinglePixel()¶ Default Ctor
Can be called by PixelTypeTraits<SinglePixel>::padValue()
Friends
-
friend
lsst::afw::image::pixel::Pixel Typedefs to be used for pixel values
-
friend
lsst::afw::image::pixel::PixelTypeTraits
-
typedef _ImagePixelT
-
template<typename
ExprT1, typenameImageBinOp, typenameMaskBinOp, typenameVarianceBinOp>
classUnaryExpr - #include <Pixel.h>
Class for representing Unary operations.
Public Types
-
typedef exprTraits<ExprT1>::ImagePixelT
ImagePixelT
-
typedef exprTraits<ExprT1>::MaskPixelT
MaskPixelT
-
typedef exprTraits<ExprT1>::VariancePixelT
VariancePixelT
Public Functions
-
UnaryExpr(ExprT1 e1, ImageBinOp imageOp = ImageBinOp(), MaskBinOp maskOp = MaskBinOp(), VarianceBinOp varOp = VarianceBinOp()) a unary expression, with three functors to represent the image/mask/variance operations
-
ImagePixelT
image() const evaluate the image part of the expression
-
MaskPixelT
mask() const evaluate the mask part of the expression
-
VariancePixelT
variance() const evaluate the variance part of the expression
-
typedef exprTraits<ExprT1>::ImagePixelT
-
template<typename
T1>
structvariance_divides¶ - #include <Pixel.h>
Calculate the variance when we divide two Pixels
- Note
We provide a single-operand version for when the right-hand-side of an expression is a scalar, not a masked pixel,
-
template<typename
T1>
structvariance_multiplies¶ - #include <Pixel.h>
Calculate the variance when we multiply two Pixels
- Note
We provide a single-operand version for when the right-hand-side of an expression is a scalar, not a masked pixel,
-
template<typename
T1>
structvariance_plus¶ - #include <Pixel.h>
Calculate the variance when we add (or subtract) two Pixels
- Note
We provide a single-operand version for when the right-hand-side of an expression is a scalar, not a masked pixel,
-
template<typename
T1>
structvariance_plus_covar¶ - #include <Pixel.h>
The variance of the sum of a pair of correlated pixels
The covariance is modelled as alpha*sqrt(var_x*var_y)
- Note
We provide a single-operand version for when the right-hand-side of an expression is a scalar, not a masked pixel,
Public Functions
-
variance_plus_covar(double alpha = 0)¶
-
T1
operator()(T1 const&, T1 const&, T1 const &vx, T1 const &vy) const¶
-
T1
operator()(T1 const&, T1 const&, T1 const &vx) const¶
Private Members
-
double
_alpha¶
-
template<typename
-
namespace
-
namespace
-
namespace
std -
template<typename
ImagePixelT, typenameMaskPixelT, typenameVariancePixelT>
structhash<lsst::afw::image::pixel::Pixel<ImagePixelT, MaskPixelT, VariancePixelT>> Public Types
-
template<>
usingargument_type= lsst::afw::image::pixel::Pixel<ImagePixelT, MaskPixelT, VariancePixelT>
-
template<>
usingresult_type= size_t
Public Functions
-
size_t
operator()(argument_type const &obj) const
-
template<>
-
template<typename
ImagePixelT, typenameMaskPixelT, typenameVariancePixelT>
structhash<lsst::afw::image::pixel::SinglePixel<ImagePixelT, MaskPixelT, VariancePixelT>> Public Types
-
template<>
usingargument_type= lsst::afw::image::pixel::SinglePixel<ImagePixelT, MaskPixelT, VariancePixelT>
-
template<>
usingresult_type= size_t
Public Functions
-
size_t
operator()(argument_type const &obj) const
-
template<>
-
template<typename