LSSTApplications
10.0+286,10.0+36,10.0+46,10.0-2-g4f67435,10.1+152,10.1+37,11.0,11.0+1,11.0-1-g47edd16,11.0-1-g60db491,11.0-1-g7418c06,11.0-2-g04d2804,11.0-2-g68503cd,11.0-2-g818369d,11.0-2-gb8b8ce7
LSSTDataManagementBasePackage
|
Classes to provide utility functions for a "Pixel" to get at image/mask/variance operators. More...
#include <cmath>
#include <iostream>
#include <functional>
Go to the source code of this file.
Namespaces | |
lsst | |
Estimate image backgrounds. | |
lsst::afw | |
lsst::afw::image | |
lsst::afw::image::pixel | |
Functions | |
template<typename ImagePixelT , typename MaskPixelT , typename VariancePixelT > | |
SinglePixel< ImagePixelT, MaskPixelT, VariancePixelT > | lsst::afw::image::pixel::makeSinglePixel (ImagePixelT x, MaskPixelT m, VariancePixelT v) |
template<typename ExprT1 > | |
UnaryExpr< ExprT1, std::negate < typename exprTraits< ExprT1 > ::ImagePixelT >, noop < typename exprTraits< ExprT1 > ::MaskPixelT >, noop< typename exprTraits< ExprT1 > ::VariancePixelT > > | lsst::afw::image::pixel::operator- (ExprT1 e1) |
Template for -e1. More... | |
template<typename ExprT1 , typename ExprT2 > | |
BinaryExpr< ExprT1, ExprT2, std::plus< typename exprTraits < ExprT1 >::ImagePixelT > , bitwise_or< typename exprTraits< ExprT1 > ::MaskPixelT >, variance_plus < typename exprTraits< ExprT1 > ::VariancePixelT > > | lsst::afw::image::pixel::operator+ (ExprT1 e1, ExprT2 e2) |
Template for (e1 + e2) More... | |
template<typename ExprT1 , typename ExprT2 > | |
ExprT1 | lsst::afw::image::pixel::operator+= (ExprT1 &e1, ExprT2 e2) |
template for e1 += e2 More... | |
template<typename ExprT1 , typename ExprT2 > | |
ExprT1 | lsst::afw::image::pixel::plus (ExprT1 &lhs, ExprT2 const &rhs, float covariance) |
Like operator+(), but assume that covariance's 2*alpha*sqrt(vx*vy) More... | |
template<typename ExprT1 , typename ExprT2 > | |
BinaryExpr< ExprT1, ExprT2, std::minus< typename exprTraits< ExprT1 > ::ImagePixelT >, bitwise_or < typename exprTraits< ExprT1 > ::MaskPixelT >, variance_plus < typename exprTraits< ExprT1 > ::VariancePixelT > > | lsst::afw::image::pixel::operator- (ExprT1 e1, ExprT2 e2) |
Template to evaluate (e1 - e2) More... | |
template<typename ExprT1 , typename ExprT2 > | |
ExprT1 | lsst::afw::image::pixel::operator-= (ExprT1 &e1, ExprT2 e2) |
Template to evaluate e1 -= e2. More... | |
template<typename ExprT1 , typename ExprT2 > | |
BinaryExpr< ExprT1, ExprT2, std::multiplies< typename exprTraits< ExprT1 > ::ImagePixelT >, bitwise_or < typename exprTraits< ExprT1 > ::MaskPixelT > , variance_multiplies < typename exprTraits< ExprT1 > ::VariancePixelT > > | lsst::afw::image::pixel::operator* (ExprT1 e1, ExprT2 e2) |
Template to evaluate (e1 * e2) More... | |
template<typename ExprT1 , typename ExprT2 > | |
ExprT1 | lsst::afw::image::pixel::operator*= (ExprT1 &e1, ExprT2 e2) |
Template to evaluate e1 *= e2. More... | |
template<typename ExprT1 , typename ExprT2 > | |
BinaryExpr< ExprT1, ExprT2, std::divides< typename exprTraits< ExprT1 > ::ImagePixelT >, bitwise_or < typename exprTraits< ExprT1 > ::MaskPixelT > , variance_divides< typename exprTraits< ExprT1 > ::VariancePixelT > > | lsst::afw::image::pixel::operator/ (ExprT1 e1, ExprT2 e2) |
Template to evaluate (e1 / e2) More... | |
template<typename ExprT1 , typename ExprT2 > | |
ExprT1 | lsst::afw::image::pixel::operator/= (ExprT1 &e1, ExprT2 e2) |
Template to evaluate e1 /= e2. More... | |
template<typename ImagePixelT , typename MaskPixelT , typename VariancePixelT > | |
std::ostream & | lsst::afw::image::pixel::operator<< (std::ostream &os, SinglePixel< ImagePixelT, MaskPixelT, VariancePixelT > const &v) |
Print a SinglePixel. More... | |
template<typename ImagePixelT , typename MaskPixelT , typename VariancePixelT > | |
std::ostream & | lsst::afw::image::pixel::operator<< (std::ostream &os, Pixel< ImagePixelT, MaskPixelT, VariancePixelT > const &v) |
Print a Pixel. More... | |
template<typename ExprT1 , typename ExprT2 , typename BinOp , typename MaskBinOp , typename VarBinOp > | |
std::ostream & | lsst::afw::image::pixel::operator<< (std::ostream &os, BinaryExpr< ExprT1, ExprT2, BinOp, MaskBinOp, VarBinOp > const &v) |
Evaluate and print a BinaryExpr. More... | |
Classes to provide utility functions for a "Pixel" to get at image/mask/variance operators.
These classes allow us to manipulate the tuples returned by MaskedImage iterators/locators as if they were POD. This provides convenient syntactic sugar, but it also permits us to write generic algorithms to manipulate MaskedImages as well as Images
We need SinglePixel as well as Pixel as the latter is just a reference to a pixel in an image, and we need to be able to build temporary values too
We use C++ template expressions to manipulate Pixel and SinglePixel; this permits us to avoid making SinglePixel inherit from Pixel (or vice versa) and allows the compiler to do a much better job of optimising mixed-mode expressions — basically, it no longer needs to create SinglePixels as Pixels that have their own storage but use the reference members of Pixel to get work done. There may be better ways, but this way works, and g++ 4.0.1 (and maybe other compilers/versions) failed to optimise the previous solution very well.
Definition in file Pixel.h.