Namespace lsst::afw::image::pixel¶
-
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.
-
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)
-
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
double
-
template<>
structexprTraits
<float> - #include <Pixel.h>
A specialisation of exprTraits for
float
-
template<>
structexprTraits
<int> - #include <Pixel.h>
A specialisation of exprTraits for
int
-
template<>
structexprTraits
<unsigned short> - #include <Pixel.h>
A specialisation of exprTraits for
unsigned short
-
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)
-
template<typename
_ImagePixelT
, typename_MaskPixelT
, typename_VariancePixelT
= double>
classPixel
: public lsst::afw::image::detail::MaskedImagePixel_tag - #include <Pixel.h>
A pixel of a MaskedImage.
-
template<typename
PixelT
>
structPixelTypeTraits
- #include <Pixel.h>
Pixel type traits.
-
template<typename
_ImagePixelT
, typename_MaskPixelT
, typename_VariancePixelT
>
structPixelTypeTraits
<SinglePixel<_ImagePixelT, _MaskPixelT, _VariancePixelT>> - #include <Pixel.h>
Specialization for a pixel of a MaskedImage.
-
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.
-
template<typename
ExprT1
, typenameImageBinOp
, typenameMaskBinOp
, typenameVarianceBinOp
>
classUnaryExpr
- #include <Pixel.h>
Class for representing Unary operations.
-
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,
-
template<typename